Xin Xing sorts out common query commands in Linux, and Xin Xing sorts out linux commands.
View version, operating system, or cpu Information
File:/etc/issue view OS version/proc/cpuinfo view cpu Information
Command: hostname to view the computer name uname to view the operating system information lspci to list all pci devices
Lsusb list all usb devices lsmod list to load modules
View system resource usage
File:/proc/meminfo view memory information/proc/loadavg to view system load
Command: free view memory use df view partition status du view directory size
Fdisk view all partitions swapon view swap partition dmesg view system startup information
View mount information by uptime running time, user, and load mount
View Process Information
File:/proc to view information about all processes
Command: ps view process information top Real-Time View Process Information pstree view process relationship information
View Network Information
Command: ifconfig view network interface properties iptables view firewall settings route view route information
Netstat view Network Connections
View user information
File:/etc/passwd view all users of the system/etc/group view all groups of the system
Command: w view active user last view recently logged on user
View service information:
Command chkconfig to view system services