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 of loaded kernel modules
# env # View Environment variables
Resources
# free-m # View memory usage and swap area usage
# df-h # View the usage of each partition
# du-sh < directory name > # View the size of the specified directory
# grep Memtotal/proc/meminfo # View Total Memory
# grep Memfree/proc/meminfo # View the amount of free memory
# uptime # View System uptime, number of users, load
# cat/proc/loadavg # View System load
Disks and partitions
# Mount | COLUMN-T # Viewing the status of a mounted partition
# fdisk-l # View all partitions
# swapon-s # View all swap partitions
# hdparm-i/dev/hda # View disk parameters (for IDE devices only)
# DMESG | grep IDE # View IDE device detection status at startup
Internet
# ifconfig # View the properties of all network interfaces
# iptables-l # View firewall settings
# route-n # View the routing table
# netstat-lntp # View all listening ports
# NETSTAT-ANTP # View all established connections
# netstat-s # View Network statistics
Process
# ps-ef # View All Processes
# top # Real-time display of process status
User
# w # View active Users
# ID < user name > # view specified user information
# last # View user log in log
# cut-d:-f1/etc/passwd # View All users of the system
# cut-d:-f1/etc/group # View all system groups
# crontab-l # View Current user's scheduled tasks
Service
# chkconfig--list # list all system services
# chkconfig--list | grep on # Lists all startup system services
Program
# rpm-qa # View all installed Packages
Common commands are organized as follows:
View the serial number of the motherboard: Dmidecode | Grep-i ' Serial number '
Detecting new hardware with hardware detection program Kuduz: Service kudzu start (or restart)
View CPU information: Cat/proc/cpuinfo [DMESG | grep-i ' CPU '][DMIDECODE-T processor]
View memory information: Cat/proc/meminfo [Free-m][vmstat]
View card information: CAT/PROC/PCI
View video card/sound card information: Lspci |grep-i ' VGA ' [DMESG | grep-i ' VGA ']
View nic Information: DMESG | Grep-i ' ETH ' [cat/etc/sysconfig/hwconf | grep-i eth][lspci | grep-i ' ETH ']
<!--more-->
View PCI information: LSPCI (more intuitive than CAT/PROC/PCI)
View USB devices: Cat/proc/bus/usb/devices
Viewing the keyboard and mouse: Cat/proc/bus/input/devices
View system hard disk information and usage: Fdisk & disk–l & DF
To view interrupt requests (IRQ) for each device: cat/proc/interrupts
View System Architecture: UNAME-A
View and start the system's 32-bit or 64-bit kernel mode: isalist–v [isainfo–v][isainfo–b]
Dmidecode viewing hardware information, including BIOS, CPU, memory, etc.
Determine the current display refresh rate:/usr/sbin/ffbconfig–rev \?
View System configuration:/usr/platform/sun4u/sbin/prtdiag–v
To view patches already applied in the current system: showrev–p
Displays the current runlevel: WHO–RH
View current BIND version information: Nslookup–class=chaos–q=txt Version.bind
DMESG | More View hardware information
LSPCI display peripheral information, such as USB, network card and other information
Lsnod Viewing loaded drivers
Lshw
PSRINFO-V view current processor type and speed (frequency)
Prtconf-v Print the current OBP version number
Iostat–e viewing hard disk physical information (vendor, RPM, capacity)
Prtvtoc/dev/rdsk/c0t0d0s viewing the geometry and partitioning information for a disk
Df–f Ufs–o I shows the number of i-node that have been used and not used
Isalist–v
For files in "/proc", you can use the File View command to browse its contents, and the file contains system-specific information:
Cpuinfo Host CPU Information
DMA Host DMA Channel information
Filesystems File System Information
Interrupts host interrupt Information
Ioprots host I/O port number information
Meninfo Host Memory Information
Version Linux memory release information
Note: proc–process information Pseudo-filesystem process information masquerading file system
Reference http://blog.chinaunix.net/uid-26782198-id-3242120.html