系统信息命令

df - 显示磁盘空间

The df command displays filesystem disk space usage for all partitions. (df stands for disk free).

df -h

will give information using megabytes (M) and gigabytes (G) instead of blocks (-h means human readable).

free - 显示空闲和已使用的内存

The free command displays the amount of free and used memory in the system.

free -m

will give the information using megabytes, which is probably the most useful for current computers.

top - 显示最占用资源的进程

The top command displays information on the Linux system - processes that are running, system resources including CPU, RAM & swap usage, and the total number of tasks being run. To exit top, press q.

uname - 打印当前计算机的细节

The uname command with the -a options displays all system information, including machine name, kernel name & version, and other details. This command is useful for checking which kernel is in use. (uname is short for unix name).

lsb_release - 打印当前 Linux 发布版的细节

The lsb_release with the -a option prints version information for the Linux release in use. For example, typing:

lsb_release -a

will display:

No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 11.10
Release:        11.10
Codename:       oneiric