System
# Uname-a # View kernel/OS/CPU information # head-n 1/etc/issue # View OS version # cat/proc/cpuinfo # View CPU information # hostname # view Computer Name # lspci-TV # List all PCI devices # lsusb-TV # List all USB devices # lsmod # List loaded kernel modules # env # View environment variables
# Dmidecode | grep "Product Nmae" # View The Server model
Resources
# Free-m # View memory usage and swap zone usage # df-h # view the usage of each partition # du-sh
<目录名>
# View the size of a specified directory # grep MemTotal/proc/meminfo # view the total memory # grep MemFree/proc/meminfo # view the amount of idle memory # uptime # view the system running time, number of users, and load # cat/proc/loadavg # View system load
Disks and partitions
# Mount | column-t # view the status of the mounted partition # fdisk-l # View All partitions # swapon-s # View all swap partitions # hdparm-I/dev/hda # View disk parameter (applicable only to IDE devices) # dmesg | grep IDE # view the IDE device detection status at startup
Network
# Ifconfig # view the attributes of all network interfaces # iptables-L # View firewall settings # route-n # View route tables # netstat-lntp # View all listening ports # netstat-antp # View all established connection # netstat-s # View network statistics
Process
# Ps-ef # View all processes # top # Display process status in real time
User
# W # View active users # id
<用户名>
# Viewing specified user information # last # viewing user logon logs # cut-d:-f1/etc/passwd # viewing all users in the system # cut-d: -f1/etc/group # View all groups in the system # crontab-l # view the scheduled tasks of the current user
Service
# Chkconfig -- list # list all system Services # chkconfig -- list | grep on # list all started System Services
Program
# Rpm-qa # View all installed software packages