Common command 1 System for viewing Linux system information: # uname-a # view kernel/OS/CPU information # cat/etc/issue # cat/etc/redhat-release # 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 www.2cto.com 2 resources: # free-m # view memory usage and swap zone usage # df-h # view usage of each partition # du-sh <Directory Name> # 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 3 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 Detection Status of the IDE device at startup. 4. 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 five processes: # ps-ef # view all processes # top # display Process status in real time www.2cto.com 6 users: # w # view active users # id <User Name> # view specified user information # last # view User Logon logs # cut-d: -f1/etc/passwd # view 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 for seven services: # chkconfig -- list # list all system services # chkconfig -- list | grep on # list all started system services. Program 8: # rpm-qa # view the rain of all installed software packages written by Beijing