Linux查询一台机器的IP地址和其对应的域名
最后更新于:2022-04-01 07:08:25
Linux查询一台机器的IP地址和其对应的域名
~~~
youhaidong@youhaidong-ThinkPad-Edge-E545:~$ nslookup
> 127.0.0.1
Server: 127.0.1.1
Address: 127.0.1.1#53
1.0.0.127.in-addr.arpa name = localhost.
>
~~~
Linux显示登录Shell信息
最后更新于:2022-04-01 07:08:23
Linux显示登录Shell信息
~~~
youhaidong@youhaidong-ThinkPad-Edge-E545:~$ finger -p
Login Name Tty Idle Login Time Office Office Phone
youhaidong youhaidong *:0 Mar 8 22:10 (:0)
youhaidong youhaidong pts/0 Mar 8 22:15 (:0)
youhaidong@youhaidong-ThinkPad-Edge-E545:~$
~~~
Linux显示邮件状态等信息
最后更新于:2022-04-01 07:08:21
Linux显示邮件状态等信息
~~~
youhaidong@youhaidong-ThinkPad-Edge-E545:~$ finger -l
Login: youhaidong Name: youhaidong
Directory: /home/youhaidong Shell: /bin/bash
On since Sun Mar 8 22:10 (CST) on :0 from :0 (messages off)
On since Sun Mar 8 22:15 (CST) on pts/0 from :0
1 second idle
No mail.
No Plan.
youhaidong@youhaidong-ThinkPad-Edge-E545:~$
~~~
Linux显示用户注册名
最后更新于:2022-04-01 07:08:19
Linux显示用户注册名
~~~
youhaidong@youhaidong-ThinkPad-Edge-E545:~$ finger -s
Login Name Tty Idle Login Time Office Office Phone
youhaidong youhaidong *:0 Mar 8 22:10 (:0)
youhaidong youhaidong pts/0 Mar 8 22:15 (:0)
youhaidong@youhaidong-ThinkPad-Edge-E545:~$
~~~
Linux命令之finger
最后更新于:2022-04-01 07:08:16
Linux命令之finger
~~~
youhaidong@youhaidong-ThinkPad-Edge-E545:~$ finger
程序“finger”尚未安装。 您可以使用以下命令安装:
sudo apt-get install finger
youhaidong@youhaidong-ThinkPad-Edge-E545:~$ sudo apt-get install finger
[sudo] password for youhaidong:
正在读取软件包列表... 完成
正在分析软件包的依赖关系树
正在读取状态信息... 完成
下列【新】软件包将被安装:
finger
升级了 0 个软件包,新安装了 1 个软件包,要卸载 0 个软件包,有 102 个软件包未被升级。
需要下载 17.3 kB 的软件包。
解压缩后会消耗掉 68.6 kB 的额外空间。
获取:1 http://cn.archive.ubuntu.com/ubuntu/ trusty/universe finger amd64 0.17-15 [17.3 kB]
下载 17.3 kB,耗时 0秒 (137 kB/s)
Selecting previously unselected package finger.
(正在读取数据库 ... 系统当前共安装有 199181 个文件和目录。)
Preparing to unpack .../finger_0.17-15_amd64.deb ...
Unpacking finger (0.17-15) ...
Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
正在设置 finger (0.17-15) ...
youhaidong@youhaidong-ThinkPad-Edge-E545:~$ ^C
youhaidong@youhaidong-ThinkPad-Edge-E545:~$ ^C
youhaidong@youhaidong-ThinkPad-Edge-E545:~$
<pre name="code" class="plain">youhaidong@youhaidong-ThinkPad-Edge-E545:~$ finger
Login Name Tty Idle Login Time Office Office Phone
youhaidong youhaidong *:0 Mar 8 22:10 (:0)
youhaidong youhaidong pts/0 Mar 8 22:15 (:0)
~~~
Linux显示指定区块大小为1048576字节
最后更新于:2022-04-01 07:08:14
Linux显示指定区块大小为1048576字节
~~~
youhaidong@youhaidong-ThinkPad-Edge-E545:~$ df -m
文件系统 1M-blocks 已用 可用 已用% 挂载点
/dev/sda8 19097 7283 10822 41% /
none 1 0 1 0% /sys/fs/cgroup
udev 1505 1 1505 1% /dev
tmpfs 304 2 302 1% /run
none 5 0 5 0% /run/lock
none 1516 1 1516 1% /run/shm
none 100 1 100 1% /run/user
/dev/sda10 47932 2497 42979 6% /home
/dev/sda9 945 64 817 8% /boot
youhaidong@youhaidong-ThinkPad-Edge-E545:~$ df --megabytes
df: warning: long option '--megabytes' is deprecated and will soon be removed
文件系统 1M-blocks 已用 可用 已用% 挂载点
/dev/sda8 19097 7283 10822 41% /
none 1 0 1 0% /sys/fs/cgroup
udev 1505 1 1505 1% /dev
tmpfs 304 2 302 1% /run
none 5 0 5 0% /run/lock
none 1516 1 1516 1% /run/shm
none 100 1 100 1% /run/user
/dev/sda10 47932 2497 42979 6% /home
/dev/sda9 945 64 817 8% /boot
youhaidong@youhaidong-ThinkPad-Edge-E545:~$
~~~
Linux显示本地端的文件系统
最后更新于:2022-04-01 07:08:12
Linux显示本地端的文件系统
~~~
youhaidong@youhaidong-ThinkPad-Edge-E545:~$ df -l
文件系统 1K-blocks 已用 可用 已用% 挂载点
/dev/sda8 19554840 7456948 11081508 41% /
none 4 0 4 0% /sys/fs/cgroup
udev 1540740 4 1540736 1% /dev
tmpfs 310308 1472 308836 1% /run
none 5120 0 5120 0% /run/lock
none 1551532 156 1551376 1% /run/shm
none 102400 36 102364 1% /run/user
/dev/sda10 49082176 2556324 44009528 6% /home
/dev/sda9 967320 64652 836316 8% /boot
youhaidong@youhaidong-ThinkPad-Edge-E545:~$ df --local
文件系统 1K-blocks 已用 可用 已用% 挂载点
/dev/sda8 19554840 7456948 11081508 41% /
none 4 0 4 0% /sys/fs/cgroup
udev 1540740 4 1540736 1% /dev
tmpfs 310308 1472 308836 1% /run
none 5120 0 5120 0% /run/lock
none 1551532 156 1551376 1% /run/shm
none 102400 36 102364 1% /run/user
/dev/sda10 49082176 2556192 44009660 6% /home
/dev/sda9 967320 64652 836316 8% /boot
youhaidong@youhaidong-ThinkPad-Edge-E545:~$
~~~
Linux显示指定区块大小为1024字节
最后更新于:2022-04-01 07:08:09
Linux显示指定区块大小为1024字节
~~~
youhaidong@youhaidong-ThinkPad-Edge-E545:~$ df -k
文件系统 1K-blocks 已用 可用 已用% 挂载点
/dev/sda8 19554840 7431164 11107292 41% /
none 4 0 4 0% /sys/fs/cgroup
udev 1540740 4 1540736 1% /dev
tmpfs 310308 1472 308836 1% /run
none 5120 0 5120 0% /run/lock
none 1551532 156 1551376 1% /run/shm
none 102400 36 102364 1% /run/user
/dev/sda10 49082176 2556492 44009360 6% /home
/dev/sda9 967320 64652 836316 8% /boot
youhaidong@youhaidong-ThinkPad-Edge-E545:~$ df --kilobytes
df:无法识别的选项“--kilobytes”
Try 'df --help' for more information.
youhaidong@youhaidong-ThinkPad-Edge-E545:~$
~~~
Linux显示inode的信息
最后更新于:2022-04-01 07:08:07
Linux显示inode的信息
~~~
youhaidong@youhaidong-ThinkPad-Edge-E545:~$ df -i
文件系统 Inode 已用(I) 可用(I) 已用(I)% 挂载点
/dev/sda8 1250928 238775 1012153 20% /
none 387883 2 387881 1% /sys/fs/cgroup
udev 385185 575 384610 1% /dev
tmpfs 387883 648 387235 1% /run
none 387883 4 387879 1% /run/lock
none 387883 7 387876 1% /run/shm
none 387883 25 387858 1% /run/user
/dev/sda10 3129344 21280 3108064 1% /home
/dev/sda9 62464 307 62157 1% /boot
youhaidong@youhaidong-ThinkPad-Edge-E545:~$
~~~
Linux显示包含全部的文件系统
最后更新于:2022-04-01 07:08:05
Linux显示包含全部的文件系统
~~~
youhaidong@youhaidong-ThinkPad-Edge-E545:~$ df -a
文件系统 1K-blocks 已用 可用 已用% 挂载点
/dev/sda8 19554840 7331956 11206500 40% /
proc 0 0 0 - /proc
sysfs 0 0 0 - /sys
none 4 0 4 0% /sys/fs/cgroup
none 0 0 0 - /sys/fs/fuse/connections
none 0 0 0 - /sys/kernel/debug
none 0 0 0 - /sys/kernel/security
udev 1540740 4 1540736 1% /dev
devpts 0 0 0 - /dev/pts
tmpfs 310308 1472 308836 1% /run
none 5120 0 5120 0% /run/lock
none 1551532 152 1551380 1% /run/shm
none 102400 36 102364 1% /run/user
none 0 0 0 - /sys/fs/pstore
/dev/sda10 49082176 2554860 44010992 6% /home
/dev/sda9 967320 64652 836316 8% /boot
systemd 0 0 0 - /sys/fs/cgroup/systemd
gvfsd-fuse 0 0 0 - /run/user/1000/gvfs
youhaidong@youhaidong-ThinkPad-Edge-E545:~$ df --all
文件系统 1K-blocks 已用 可用 已用% 挂载点
/dev/sda8 19554840 7379372 11159084 40% /
proc 0 0 0 - /proc
sysfs 0 0 0 - /sys
none 4 0 4 0% /sys/fs/cgroup
none 0 0 0 - /sys/fs/fuse/connections
none 0 0 0 - /sys/kernel/debug
none 0 0 0 - /sys/kernel/security
udev 1540740 4 1540736 1% /dev
devpts 0 0 0 - /dev/pts
tmpfs 310308 1472 308836 1% /run
none 5120 0 5120 0% /run/lock
none 1551532 156 1551376 1% /run/shm
none 102400 36 102364 1% /run/user
none 0 0 0 - /sys/fs/pstore
/dev/sda10 49082176 2556056 44009796 6% /home
/dev/sda9 967320 64652 836316 8% /boot
systemd 0 0 0 - /sys/fs/cgroup/systemd
gvfsd-fuse 0 0 0 - /run/user/1000/gvfs
youhaidong@youhaidong-ThinkPad-Edge-E545:~$
~~~
Linux显示以log结尾的日志文件
最后更新于:2022-04-01 07:08:03
Linux显示以log结尾的日志文件
~~~
youhaidong@youhaidong-ThinkPad-Edge-E545:~$ find -name "*.log"
find: `./.gvfs': 权限不够
./workspace/.metadata/.log
./workspace/.metadata/.plugins/org.eclipse.m2e.logback.configuration/0.log
./workspace/.metadata/.plugins/org.eclipse.rse.ui/.log
./workspace/.metadata/.plugins/org.eclipse.rse.core/.log
find: `./.dbus': 权限不够
./.cache/upstart/gnome-session-Unity.log
./.cache/upstart/dbus.log
./.cache/upstart/unity-panel-service.log
./.cache/software-center/software-center.log
find: `./.cache/dconf': 权限不够
./.cache/sso/sso-client.log
./.cache/sso/sso-client-gui.log
./.local/share/gvfs-metadata/uuid-00072A0E0004874E-93508ac8.log
./.local/share/gvfs-metadata/root-3f78a1f5.log
./.local/share/gvfs-metadata/home-8dd5960f.log
./.local/share/gvfs-metadata/trash:-c590129b.log
./.local/share/gvfs-metadata/recent:-bd38cdef.log
./.longene/qq/winetricks.log
./.longene/qq/drive_c/windows/system32/Macromed/Flash/FlashInstall.log
./.longene/qq/drive_c/users/root/AppData/Tencent/QQ/Misc/com.tencent.qzone/qzonepackage/photo/script/merge.log
youhaidong@youhaidong-ThinkPad-Edge-E545:~$
~~~
Linux显示查看您拥有的仓库
最后更新于:2022-04-01 07:08:00
Linux显示查看您拥有的仓库
~~~
youhaidong@youhaidong-ThinkPad-Edge-E545:~$ yum repolist all
repolist: 0
~~~
Linux显示所有可更新的软件清单命令
最后更新于:2022-04-01 07:07:58
Linux显示所有可更新的软件清单命令
~~~
youhaidong@youhaidong-ThinkPad-Edge-E545:~$ yum check-update
程序“yum”尚未安装。 您可以使用以下命令安装:
sudo apt-get install yum
youhaidong@youhaidong-ThinkPad-Edge-E545:~$ sudo apt-get install yum
[sudo] password for youhaidong:
正在读取软件包列表... 完成
正在分析软件包的依赖关系树
正在读取状态信息... 完成
将会安装下列额外的软件包:
debugedit librpm3 librpmbuild3 librpmio3 librpmsign1 libsqlite0 python-rpm
python-sqlite python-sqlitecachec python-urlgrabber rpm rpm-common rpm2cpio
建议安装的软件包:
rpm-i18n python-sqlite-dbg alien elfutils
下列【新】软件包将被安装:
debugedit librpm3 librpmbuild3 librpmio3 librpmsign1 libsqlite0 python-rpm
python-sqlite python-sqlitecachec python-urlgrabber rpm rpm-common rpm2cpio
yum
升级了 0 个软件包,新安装了 14 个软件包,要卸载 0 个软件包,有 102 个软件包未被升级。
需要下载 1,519 kB 的软件包。
解压缩后会消耗掉 6,400 kB 的额外空间。
您希望继续执行吗? [Y/n] Y
获取:1 http://cn.archive.ubuntu.com/ubuntu/ trusty-updates/main librpmio3 amd64 4.11.1-3ubuntu0.1 [68.6 kB]
获取:2 http://cn.archive.ubuntu.com/ubuntu/ trusty-updates/main debugedit amd64 4.11.1-3ubuntu0.1 [15.6 kB]
获取:3 http://cn.archive.ubuntu.com/ubuntu/ trusty-updates/main librpm3 amd64 4.11.1-3ubuntu0.1 [153 kB]
获取:4 http://cn.archive.ubuntu.com/ubuntu/ trusty-updates/main librpmbuild3 amd64 4.11.1-3ubuntu0.1 [56.3 kB]
获取:5 http://cn.archive.ubuntu.com/ubuntu/ trusty-updates/main librpmsign1 amd64 4.11.1-3ubuntu0.1 [7,890 B]
获取:6 http://cn.archive.ubuntu.com/ubuntu/ trusty/universe libsqlite0 amd64 2.8.17-10ubuntu2 [139 kB]
获取:7 http://cn.archive.ubuntu.com/ubuntu/ trusty/universe python-sqlite amd64 1.0.1-11 [20.7 kB]
获取:8 http://cn.archive.ubuntu.com/ubuntu/ trusty/main python-urlgrabber all 3.9.1-4ubuntu3 [42.3 kB]
获取:9 http://cn.archive.ubuntu.com/ubuntu/ trusty-updates/main rpm-common amd64 4.11.1-3ubuntu0.1 [21.5 kB]
获取:10 http://cn.archive.ubuntu.com/ubuntu/ trusty-updates/main rpm2cpio amd64 4.11.1-3ubuntu0.1 [5,142 B]
获取:11 http://cn.archive.ubuntu.com/ubuntu/ trusty-updates/main rpm amd64 4.11.1-3ubuntu0.1 [114 kB]
获取:12 http://cn.archive.ubuntu.com/ubuntu/ trusty-updates/universe python-rpm amd64 4.11.1-3ubuntu0.1 [32.6 kB]
获取:13 http://cn.archive.ubuntu.com/ubuntu/ trusty/universe python-sqlitecachec amd64 1.1.4-1 [21.4 kB]
获取:14 http://cn.archive.ubuntu.com/ubuntu/ trusty/universe yum all 3.4.3-2ubuntu1 [821 kB]
下载 1,519 kB,耗时 9秒 (161 kB/s)
Selecting previously unselected package librpmio3.
(正在读取数据库 ... 系统当前共安装有 198748 个文件和目录。)
Preparing to unpack .../librpmio3_4.11.1-3ubuntu0.1_amd64.deb ...
Unpacking librpmio3 (4.11.1-3ubuntu0.1) ...
Selecting previously unselected package debugedit.
Preparing to unpack .../debugedit_4.11.1-3ubuntu0.1_amd64.deb ...
Unpacking debugedit (4.11.1-3ubuntu0.1) ...
Selecting previously unselected package librpm3.
Preparing to unpack .../librpm3_4.11.1-3ubuntu0.1_amd64.deb ...
Unpacking librpm3 (4.11.1-3ubuntu0.1) ...
Selecting previously unselected package librpmbuild3.
Preparing to unpack .../librpmbuild3_4.11.1-3ubuntu0.1_amd64.deb ...
Unpacking librpmbuild3 (4.11.1-3ubuntu0.1) ...
Selecting previously unselected package librpmsign1.
Preparing to unpack .../librpmsign1_4.11.1-3ubuntu0.1_amd64.deb ...
Unpacking librpmsign1 (4.11.1-3ubuntu0.1) ...
Selecting previously unselected package libsqlite0.
Preparing to unpack .../libsqlite0_2.8.17-10ubuntu2_amd64.deb ...
Unpacking libsqlite0 (2.8.17-10ubuntu2) ...
Selecting previously unselected package python-sqlite.
Preparing to unpack .../python-sqlite_1.0.1-11_amd64.deb ...
Unpacking python-sqlite (1.0.1-11) ...
Selecting previously unselected package python-urlgrabber.
Preparing to unpack .../python-urlgrabber_3.9.1-4ubuntu3_all.deb ...
Unpacking python-urlgrabber (3.9.1-4ubuntu3) ...
Selecting previously unselected package rpm-common.
Preparing to unpack .../rpm-common_4.11.1-3ubuntu0.1_amd64.deb ...
Unpacking rpm-common (4.11.1-3ubuntu0.1) ...
Selecting previously unselected package rpm2cpio.
Preparing to unpack .../rpm2cpio_4.11.1-3ubuntu0.1_amd64.deb ...
Unpacking rpm2cpio (4.11.1-3ubuntu0.1) ...
Selecting previously unselected package rpm.
Preparing to unpack .../rpm_4.11.1-3ubuntu0.1_amd64.deb ...
Unpacking rpm (4.11.1-3ubuntu0.1) ...
Selecting previously unselected package python-rpm.
Preparing to unpack .../python-rpm_4.11.1-3ubuntu0.1_amd64.deb ...
Unpacking python-rpm (4.11.1-3ubuntu0.1) ...
Selecting previously unselected package python-sqlitecachec.
Preparing to unpack .../python-sqlitecachec_1.1.4-1_amd64.deb ...
Unpacking python-sqlitecachec (1.1.4-1) ...
Selecting previously unselected package yum.
Preparing to unpack .../yum_3.4.3-2ubuntu1_all.deb ...
Unpacking yum (3.4.3-2ubuntu1) ...
Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
正在设置 librpmio3 (4.11.1-3ubuntu0.1) ...
正在设置 debugedit (4.11.1-3ubuntu0.1) ...
正在设置 librpm3 (4.11.1-3ubuntu0.1) ...
正在设置 librpmbuild3 (4.11.1-3ubuntu0.1) ...
正在设置 librpmsign1 (4.11.1-3ubuntu0.1) ...
正在设置 libsqlite0 (2.8.17-10ubuntu2) ...
正在设置 python-sqlite (1.0.1-11) ...
正在设置 python-urlgrabber (3.9.1-4ubuntu3) ...
正在设置 rpm-common (4.11.1-3ubuntu0.1) ...
正在设置 rpm2cpio (4.11.1-3ubuntu0.1) ...
正在设置 rpm (4.11.1-3ubuntu0.1) ...
正在设置 python-rpm (4.11.1-3ubuntu0.1) ...
正在设置 python-sqlitecachec (1.1.4-1) ...
正在设置 yum (3.4.3-2ubuntu1) ...
Processing triggers for libc-bin (2.19-0ubuntu6.4) ...
youhaidong@youhaidong-ThinkPad-Edge-E545:~$ yum check-update
没有已启用的仓库。
执行 "yum repolist all" 查看您拥有的仓库。
您可以用 yum-config-manager --enable <仓库名> 来启用仓库
~~~
Linux显示版本信息并退出
最后更新于:2022-04-01 07:07:56
Linux显示版本信息并退出
~~~
youhaidong@youhaidong-ThinkPad-Edge-E545:~$ cat --version
cat (GNU coreutils) 8.21
Copyright (C) 2013 Free Software Foundation, Inc.
许可证:GPLv3+:GNU 通用公共许可证第3 版或更新版本<http://gnu.org/licenses/gpl.html>。
本软件是自由软件:您可以自由修改和重新发布它。
在法律范围内没有其他保证。
由Torbjörn Granlund 和Richard M. Stallman 编写。
~~~
Linux显示cat帮助信息并退出
最后更新于:2022-04-01 07:07:53
Linux显示cat帮助信息并退出
~~~
youhaidong@youhaidong-ThinkPad-Edge-E545:~$ cat --help
用法:cat [选项]... [文件]...
将[文件]或标准输入组合输出到标准输出。
-A, --show-all 等于-vET
-b, --number-nonblank 对非空输出行编号
-e 等于-vE
-E, --show-ends 在每行结束处显示"$"
-n, --number 对输出的所有行编号
-s, --squeeze-blank 不输出多行空行
-t 与-vT 等价
-T, --show-tabs 将跳格字符显示为^I
-u (被忽略)
-v, --show-nonprinting 使用^ 和M- 引用,除了LFD和 TAB 之外
--help 显示此帮助信息并退出
--version 显示版本信息并退出
如果没有指定文件,或者文件为"-",则从标准输入读取。
示例:
cat f - g 先输出f 的内容,然后输出标准输入的内容,最后输出g 的内容。
cat 将标准输入的内容复制到标准输出。
请向bug-coreutils@gnu.org 报告cat 的错误
GNU coreutils 的主页:<http://www.gnu.org/software/coreutils/>
GNU 软件一般性帮助:<http://www.gnu.org/gethelp/>
请向<http://translationproject.org/team/zh_CN.html> 报告cat 的翻译错误
要获取完整文档,请运行:info coreutils 'cat invocation'
~~~
Linux显示使用者将不能利用交谈式指令来对行程
最后更新于:2022-04-01 07:07:51
Linux显示使用者将不能利用交谈式指令来对行程
~~~
youhaidong@youhaidong-ThinkPad-Edge-E545:~$ top -s
top - 19:23:34 up 52 min, 2 users, load average: 0.11, 0.20, 0.34
Tasks: 196 total, 1 running, 195 sleeping, 0 stopped, 0 zombie
%Cpu(s): 0.9 us, 0.7 sy, 0.0 ni, 98.4 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
KiB Mem: 3103064 total, 1432380 used, 1670684 free, 75104 buffers
KiB Swap: 3998716 total, 0 used, 3998716 free. 661292 cached Mem
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
1268 root 20 0 313584 62732 21624 S 3.0 2.0 2:58.22 Xorg
6585 youhaid+ 20 0 653392 20536 13804 S 2.7 0.7 0:00.50 gnome-term+
2076 youhaid+ 20 0 1287276 81260 41200 S 2.3 2.6 1:28.26 compiz
2313 youhaid+ 20 0 1126156 237752 54244 S 1.0 7.7 7:37.70 firefox
10 root 20 0 0 0 0 S 0.3 0.0 0:02.85 rcuos/2
1858 youhaid+ 20 0 364224 7336 3052 S 0.3 0.2 0:10.79 ibus-daemon
1 root 20 0 33900 3164 1480 S 0.0 0.1 0:01.41 init
2 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kthreadd
3 root 20 0 0 0 0 S 0.0 0.0 0:00.02 ksoftirqd/0
5 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 kworker/0:+
7 root 20 0 0 0 0 S 0.0 0.0 0:05.78 rcu_sched
8 root 20 0 0 0 0 S 0.0 0.0 0:02.48 rcuos/0
9 root 20 0 0 0 0 S 0.0 0.0 0:01.87 rcuos/1
11 root 20 0 0 0 0 S 0.0 0.0 0:01.82 rcuos/3
12 root 20 0 0 0 0 S 0.0 0.0 0:00.00 rcu_bh
13 root 20 0 0 0 0 S 0.0 0.0 0:00.00 rcuob/0
14 root 20 0 0 0 0 S 0.0 0.0 0:00.00 rcuob/1
youhaidong@youhaidong-ThinkPad-Edge-E545:~$ ^C
youhaidong@youhaidong-ThinkPad-Edge-E545:~$ ^C
youhaidong@youhaidong-ThinkPad-Edge-E545:~$ ^C
youhaidong@youhaidong-ThinkPad-Edge-E545:~$
~~~
Linux显示更新十次后退出
最后更新于:2022-04-01 07:07:49
Linux显示更新十次后退出
~~~
youhaidong@youhaidong-ThinkPad-Edge-E545:~$ top -n 10
top - 19:19:21 up 48 min, 2 users, load average: 0.14, 0.32, 0.41
Tasks: 196 total, 1 running, 195 sleeping, 0 stopped, 0 zombie
%Cpu(s): 0.8 us, 0.3 sy, 0.0 ni, 98.9 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
KiB Mem: 3103064 total, 1464684 used, 1638380 free, 74664 buffers
KiB Swap: 3998716 total, 0 used, 3998716 free. 660916 cached Mem
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
2313 youhaid+ 20 0 1122356 246192 54376 S 3.7 7.9 7:06.53 firefox
6311 youhaid+ 20 0 486828 51880 26944 S 1.7 1.7 0:01.81 plugin-con+
6361 youhaid+ 20 0 653164 20400 13828 S 0.3 0.7 0:00.67 gnome-term+
6420 youhaid+ 20 0 29148 1688 1168 R 0.3 0.1 0:00.09 top
1 root 20 0 33900 3164 1480 S 0.0 0.1 0:01.41 init
2 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kthreadd
3 root 20 0 0 0 0 S 0.0 0.0 0:00.02 ksoftirqd/0
5 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 kworker/0:+
7 root 20 0 0 0 0 S 0.0 0.0 0:05.59 rcu_sched
8 root 20 0 0 0 0 S 0.0 0.0 0:02.40 rcuos/0
9 root 20 0 0 0 0 S 0.0 0.0 0:01.78 rcuos/1
10 root 20 0 0 0 0 S 0.0 0.0 0:02.74 rcuos/2
11 root 20 0 0 0 0 S 0.0 0.0 0:01.74 rcuos/3
12 root 20 0 0 0 0 S 0.0 0.0 0:00.00 rcu_bh
13 root 20 0 0 0 0 S 0.0 0.0 0:00.00 rcuob/0
14 root 20 0 0 0 0 S 0.0 0.0 0:00.00 rcuob/1
15 root 20 0 0 0 0 S 0.0 0.0 0:00.00 rcuob/2
youhaidong@youhaidong-ThinkPad-Edge-E545:~$
~~~
Linux显示进程状态
最后更新于:2022-04-01 07:07:47
Linux显示进程状态
~~~
youhaidong@youhaidong-ThinkPad-Edge-E545:~$ top
top - 19:16:36 up 45 min, 2 users, load average: 0.11, 0.43, 0.46
Tasks: 195 total, 3 running, 192 sleeping, 0 stopped, 0 zombie
%Cpu(s): 1.3 us, 0.5 sy, 0.0 ni, 97.8 id, 0.4 wa, 0.0 hi, 0.0 si, 0.0 st
KiB Mem: 3103064 total, 1432100 used, 1670964 free, 74380 buffers
KiB Swap: 3998716 total, 0 used, 3998716 free. 660620 cached Mem
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
2076 youhaid+ 20 0 1287856 80896 41188 S 3.7 2.6 1:20.26 compiz
1268 root 20 0 313584 62732 21624 S 3.0 2.0 2:38.93 Xorg
6204 youhaid+ 20 0 653196 22504 13804 S 3.0 0.7 0:00.37 gnome-term+
2313 youhaid+ 20 0 1105932 237572 54120 S 1.3 7.7 6:40.80 firefox
1949 youhaid+ 20 0 228040 8160 4740 S 0.3 0.3 0:02.51 ibus-engin+
2275 youhaid+ 20 0 410004 7076 5476 S 0.3 0.2 0:00.11 zeitgeist-+
3622 www-data 20 0 360464 4252 712 S 0.3 0.1 0:00.74 apache2
6297 youhaid+ 20 0 29148 1684 1164 R 0.3 0.1 0:00.02 top
1 root 20 0 33900 3164 1480 S 0.0 0.1 0:01.41 init
2 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kthreadd
3 root 20 0 0 0 0 S 0.0 0.0 0:00.02 ksoftirqd/0
5 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 kworker/0:+
7 root 20 0 0 0 0 R 0.0 0.0 0:05.48 rcu_sched
8 root 20 0 0 0 0 S 0.0 0.0 0:02.34 rcuos/0
9 root 20 0 0 0 0 S 0.0 0.0 0:01.72 rcuos/1
10 root 20 0 0 0 0 S 0.0 0.0 0:02.68 rcuos/2
11 root 20 0 0 0 0 S 0.0 0.0 0:01.70 rcuos/3
youhaidong@youhaidong-ThinkPad-Edge-E545:~$ ^C
youhaidong@youhaidong-ThinkPad-Edge-E545:~$
~~~
Linux显示服务器完整的状态信息
最后更新于:2022-04-01 07:07:44
Linux显示服务器完整的状态信息
~~~
youhaidong@youhaidong-ThinkPad-Edge-E545:~$ apachectl [fullstatus]
Usage: /usr/sbin/apache2 [-D name] [-d directory] [-f file]
[-C "directive"] [-c "directive"]
[-k start|restart|graceful|graceful-stop|stop]
[-v] [-V] [-h] [-l] [-L] [-t] [-T] [-S] [-X]
Options:
-D name : define a name for use in <IfDefine name> directives
-d directory : specify an alternate initial ServerRoot
-f file : specify an alternate ServerConfigFile
-C "directive" : process directive before reading config files
-c "directive" : process directive after reading config files
-e level : show startup errors of level (see LogLevel)
-E file : log startup errors to file
-v : show version number
-V : show compile settings
-h : list available command line options (this page)
-l : list compiled in modules
-L : list available configuration directives
-t -D DUMP_VHOSTS : show parsed vhost settings
-t -D DUMP_RUN_CFG : show parsed run settings
-S : a synonym for -t -D DUMP_VHOSTS -D DUMP_RUN_CFG
-t -D DUMP_MODULES : show all loaded modules
-M : a synonym for -t -D DUMP_MODULES
-t : run syntax check for config files
-T : start without DocumentRoot(s) check
-X : debug mode (only one worker, do not detach)
Action '[fullstatus]' failed.
The Apache error log may have more information.
~~~
Linux显示检查设置文件中的语法是否正确
最后更新于:2022-04-01 07:07:42
Linux显示检查设置文件中的语法是否正确
~~~
youhaidong@youhaidong-ThinkPad-Edge-E545:~$ apachectl [conflgtest]
程序“apachectl”尚未安装。 您可以使用以下命令安装:
sudo apt-get install apache2
youhaidong@youhaidong-ThinkPad-Edge-E545:~$ sudo apt-get install apache2
[sudo] password for youhaidong:
E: dpkg 被中断,您必须手工运行 sudo dpkg --configure -a 解决此问题。
youhaidong@youhaidong-ThinkPad-Edge-E545:~$ sudo dpkg --configure -a
正在设置 update-notifier-common (0.154.1ubuntu1) ...
ttf-mscorefonts-installer: downloading http://downloads.sourceforge.net/corefonts/andale32.exe
ttf-mscorefonts-installer: downloading http://downloads.sourceforge.net/corefonts/arial32.exe
ttf-mscorefonts-installer: downloading http://downloads.sourceforge.net/corefonts/arialb32.exe
ttf-mscorefonts-installer: downloading http://downloads.sourceforge.net/corefonts/comic32.exe
ttf-mscorefonts-installer: downloading http://downloads.sourceforge.net/corefonts/courie32.exe
ttf-mscorefonts-installer: downloading http://downloads.sourceforge.net/corefonts/georgi32.exe
ttf-mscorefonts-installer: downloading http://downloads.sourceforge.net/corefonts/impact32.exe
ttf-mscorefonts-installer: downloading http://downloads.sourceforge.net/corefonts/times32.exe
ttf-mscorefonts-installer: downloading http://downloads.sourceforge.net/corefonts/trebuc32.exe
ttf-mscorefonts-installer: downloading http://downloads.sourceforge.net/corefonts/verdan32.exe
ttf-mscorefonts-installer: downloading http://downloads.sourceforge.net/corefonts/webdin32.exe
user did not accept the license
The fonts are NOT installed.
Please run 'dpkg-reconfigure ttf-mscorefonts-installer' to perform the installation again
正在设置 ttf-mscorefonts-installer (3.4+nmu1ubuntu1) ...
user did not accept the mscorefonts-eula license
youhaidong@youhaidong-ThinkPad-Edge-E545:~$ apachectl [conflgtest]
程序“apachectl”尚未安装。 您可以使用以下命令安装:
sudo apt-get install apache2
youhaidong@youhaidong-ThinkPad-Edge-E545:~$ sudo apt-get install apache2
正在读取软件包列表... 完成
正在分析软件包的依赖关系树
正在读取状态信息... 完成
将会安装下列额外的软件包:
apache2-bin apache2-data libapr1 libaprutil1 libaprutil1-dbd-sqlite3
libaprutil1-ldap
建议安装的软件包:
apache2-doc apache2-suexec-pristine apache2-suexec-custom apache2-utils
下列【新】软件包将被安装:
apache2 apache2-bin apache2-data libapr1 libaprutil1 libaprutil1-dbd-sqlite3
libaprutil1-ldap
升级了 0 个软件包,新安装了 7 个软件包,要卸载 0 个软件包,有 6 个软件包未被升级。
需要下载 1,267 kB 的软件包。
解压缩后会消耗掉 5,238 kB 的额外空间。
您希望继续执行吗? [Y/n] Y
获取:1 http://cn.archive.ubuntu.com/ubuntu/ trusty/main libapr1 amd64 1.5.0-1 [85.1 kB]
获取:2 http://cn.archive.ubuntu.com/ubuntu/ trusty/main libaprutil1 amd64 1.5.3-1 [76.4 kB]
获取:3 http://cn.archive.ubuntu.com/ubuntu/ trusty/main libaprutil1-dbd-sqlite3 amd64 1.5.3-1 [10.5 kB]
获取:4 http://cn.archive.ubuntu.com/ubuntu/ trusty/main libaprutil1-ldap amd64 1.5.3-1 [8,634 B]
获取:5 http://cn.archive.ubuntu.com/ubuntu/ trusty-updates/main apache2-bin amd64 2.4.7-1ubuntu4.1 [839 kB]
获取:6 http://cn.archive.ubuntu.com/ubuntu/ trusty-updates/main apache2-data all 2.4.7-1ubuntu4.1 [160 kB]
获取:7 http://cn.archive.ubuntu.com/ubuntu/ trusty-updates/main apache2 amd64 2.4.7-1ubuntu4.1 [87.5 kB]
下载 1,267 kB,耗时 4秒 (283 kB/s)
Selecting previously unselected package libapr1:amd64.
(正在读取数据库 ... 系统当前共安装有 198114 个文件和目录。)
Preparing to unpack .../libapr1_1.5.0-1_amd64.deb ...
Unpacking libapr1:amd64 (1.5.0-1) ...
Selecting previously unselected package libaprutil1:amd64.
Preparing to unpack .../libaprutil1_1.5.3-1_amd64.deb ...
Unpacking libaprutil1:amd64 (1.5.3-1) ...
Selecting previously unselected package libaprutil1-dbd-sqlite3:amd64.
Preparing to unpack .../libaprutil1-dbd-sqlite3_1.5.3-1_amd64.deb ...
Unpacking libaprutil1-dbd-sqlite3:amd64 (1.5.3-1) ...
Selecting previously unselected package libaprutil1-ldap:amd64.
Preparing to unpack .../libaprutil1-ldap_1.5.3-1_amd64.deb ...
Unpacking libaprutil1-ldap:amd64 (1.5.3-1) ...
Selecting previously unselected package apache2-bin.
Preparing to unpack .../apache2-bin_2.4.7-1ubuntu4.1_amd64.deb ...
Unpacking apache2-bin (2.4.7-1ubuntu4.1) ...
Selecting previously unselected package apache2-data.
Preparing to unpack .../apache2-data_2.4.7-1ubuntu4.1_all.deb ...
Unpacking apache2-data (2.4.7-1ubuntu4.1) ...
Selecting previously unselected package apache2.
Preparing to unpack .../apache2_2.4.7-1ubuntu4.1_amd64.deb ...
Unpacking apache2 (2.4.7-1ubuntu4.1) ...
Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
Processing triggers for ureadahead (0.100.0-16) ...
ureadahead will be reprofiled on next reboot
Processing triggers for ufw (0.34~rc-0ubuntu2) ...
正在设置 libapr1:amd64 (1.5.0-1) ...
正在设置 libaprutil1:amd64 (1.5.3-1) ...
正在设置 libaprutil1-dbd-sqlite3:amd64 (1.5.3-1) ...
正在设置 libaprutil1-ldap:amd64 (1.5.3-1) ...
正在设置 apache2-bin (2.4.7-1ubuntu4.1) ...
正在设置 apache2-data (2.4.7-1ubuntu4.1) ...
正在设置 apache2 (2.4.7-1ubuntu4.1) ...
Enabling module mpm_event.
Enabling module authz_core.
Enabling module authz_host.
Enabling module authn_core.
Enabling module auth_basic.
Enabling module access_compat.
Enabling module authn_file.
Enabling module authz_user.
Enabling module alias.
Enabling module dir.
Enabling module autoindex.
Enabling module env.
Enabling module mime.
Enabling module negotiation.
Enabling module setenvif.
Enabling module filter.
Enabling module deflate.
Enabling module status.
Enabling conf charset.
Enabling conf localized-error-pages.
Enabling conf other-vhosts-access-log.
Enabling conf security.
Enabling conf serve-cgi-bin.
Enabling site 000-default.
* Starting web server apache2 AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message
*
Processing triggers for libc-bin (2.19-0ubuntu6.4) ...
Processing triggers for ureadahead (0.100.0-16) ...
Processing triggers for ufw (0.34~rc-0ubuntu2) ...
youhaidong@youhaidong-ThinkPad-Edge-E545:~$ apachectl [conflgtest]
Usage: /usr/sbin/apache2 [-D name] [-d directory] [-f file]
[-C "directive"] [-c "directive"]
[-k start|restart|graceful|graceful-stop|stop]
[-v] [-V] [-h] [-l] [-L] [-t] [-T] [-S] [-X]
Options:
-D name : define a name for use in <IfDefine name> directives
-d directory : specify an alternate initial ServerRoot
-f file : specify an alternate ServerConfigFile
-C "directive" : process directive before reading config files
-c "directive" : process directive after reading config files
-e level : show startup errors of level (see LogLevel)
-E file : log startup errors to file
-v : show version number
-V : show compile settings
-h : list available command line options (this page)
-l : list compiled in modules
-L : list available configuration directives
-t -D DUMP_VHOSTS : show parsed vhost settings
-t -D DUMP_RUN_CFG : show parsed run settings
-S : a synonym for -t -D DUMP_VHOSTS -D DUMP_RUN_CFG
-t -D DUMP_MODULES : show all loaded modules
-M : a synonym for -t -D DUMP_MODULES
-t : run syntax check for config files
-T : start without DocumentRoot(s) check
-X : debug mode (only one worker, do not detach)
Action '[conflgtest]' failed.
The Apache error log may have more information.
~~~