Linux System Information view command Overview
Copyright Notice: It can be reproduced at will, but the original author charlee and original link http://tech.idv2.com/2008/01/11/linux-sysinfo-cmds/must be indicated in a timely manner.
I recently read some Linux Command LineArticleYou have learned a lot about how to view system information. I think of an article I wrote earlier. In fact, Linux is easier to use. I can also summarize a small article about how to view the system information.
The main method used to view the Linux system version. Log on to the server and execute lsb_release-a to list all version information. Log on to Linux and run CAT/etc/RedHat-release, or log on to Linux and run rpm-Q RedHat-release. In addition, there are many commands for reference.
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
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 the 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 <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
Service
# Chkconfig -- list # list all system services # chkconfig -- list | grep on # list all started system services
Program
# Rpm-Qa # view all installed software packages