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 variable 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 on Startup network # ifconfig # View All Properties of the network interface
# 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 the network statistics process
# ps-ef # View All Processes
# top # Real-time display of process status users
# 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 the current user's scheduled tasks service
# chkconfig--list # list all system services
# chkconfig--list | grep on # Lists all started system services programs
# 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 ']
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
View hardware information, including BIOS, CPU, memory and other information to 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, Nic and other information Lsnod
View the loaded driver lshw psrinfo-v
View the current processor type and speed (frequency) prtconf-v
Prints the current OBP version number Iostat–e
View hard disk physical information (vendor, RPM, capacity) prtvtoc/dev/rdsk/c0t0d0s
View disk geometry parameters and partition information 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, which 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
Linux common view Hardware Device Information command (reprint)