1 date命令
| Command |
Options |
Parameter |
| date |
/ |
/ |
ubuntu@HMJ:~$ date
2020年 10月 23日 星期五 10:40:56 CST
2 cal命令
| Command |
Options |
Parameter |
| cal |
/ |
/ |
ubuntu@HMJ:~$ cal
十月 2020
日 一 二 三 四 五 六
1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31
3 users命令
| Command |
Options |
Parameter |
| users |
/ |
/ |
ubuntu@HMJ:~$ users
ubuntu ubuntu
4 who命令
| Command |
Options |
Parameter |
| who |
/ |
/ |
ubuntu@HMJ:~$ who
ubuntu :0 2020-10-23 10:19 (:0)
ubuntu pts/1 2020-10-23 10:40 (:0)
显示的信息包括用户名,使用的终端机,登录时间,何处登录。
5 whoami命令
| Command |
Options |
Parameter |
| whoami |
/ |
/ |
ubuntu@HMJ:~$ whoami
ubuntu
6 uname命令
| Command |
Options |
Parameter |
| uname |
-a |
/ |
ubuntu@HMJ:~$ uname -a
Linux HMJ 3.19.0-65-generic #73~14.04.1-Ubuntu SMP Wed Jun 29 21:05:22 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
7 free命令
| Command |
Options |
Parameter |
| free |
-h |
/ |
ubuntu@HMJ:~$ free -h
total used free shared buffers cached
Mem: 3.8G 1.7G 2.2G 8.5M 121M 913M
-/+ buffers/cache: 677M 3.2G
Swap: 2.0G 0B 2.0G
8 ps命令
| Command |
Options |
Parameter |
| ps |
-a -u -x |
/ |
ubuntu@HMJ:~$ ps -aux
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 1 0.0 0.1 33784 4312 ? Ss 10:19 0:02 /sbin/init
root 2 0.0 0.0 0 0 ? S 10:19 0:00 [kthreadd]
root 3 0.0 0.0 0 0 ? S 10:19 0:02 [ksoftirqd/0]
root 5 0.0 0.0 0 0 ? S< 10:19 0:00 [kworker/0:0H]
root 7 0.3 0.0 0 0 ? S 10:19 0:08 [rcu_sched]
9 top命令
| Command |
Options |
Parameter |
| top |
-d |
刷新时间(S) |
- 示例 top -d 2,每隔2秒钟刷新一次进程信息
top - 11:13:30 up 54 min, 2 users, load average: 0.00, 0.01, 0.05
Tasks: 234 total, 1 running, 233 sleeping, 0 stopped, 0 zombie
%Cpu(s): 0.3 us, 1.0 sy, 0.0 ni, 98.7 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
KiB Mem: 4030640 total, 1763812 used, 2266828 free, 124632 buffers
KiB Swap: 2094076 total, 0 used, 2094076 free. 935144 cached Mem
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
1252 root 20 0 341832 72852 29588 S 2.0 1.8 0:22.90 Xorg
9262 ubuntu 20 0 595656 33784 26512 S 1.5 0.8 0:03.31 gnome-terminal
2397 ubuntu 20 0 1320796 93336 59160 S 0.5 2.3 0:18.95 compiz
9310 root 20 0 0 0 0 S 0.5 0.0 0:00.13 kworker/u256:0
10 kill命令
| Command |
Options |
Parameter |
| kill |
-9 |
进程ID |
11 reboot命令
| Command |
Options |
Parameter |
| reboot |
/ |
/ |
12 halt命令
| Command |
Options |
Parameter |
| halt |
/ |
/ |
13 shutdown命令
| Command |
Options |
Parameter |
| shutdown |
-t |
倒计时(S) |
上一篇:1. Linux常用命令(1)
下一篇:3. vi编辑器使用