1. Graphics card Information
DMESG | Grep-i VGA
Lspci | grep-i VGA //view video card information
2.
Dmidecode | grep-i ' Serial number 'View motherboard information to view the motherboard serial number
3.CPU Information
#通过/proc File System
Cat/proc/cpuinfo
DMESG | Grep-i CPU
#通过查看开机信息
DMIDECODE-T processor
4. Hard Drive information
FDISK-L//Partition status
DF-H//Size condition
DU-H//Use Cases
DMESG | grep SDA
5. Memory Information
Cat/proc/meminfo
DMESG | grep mem
Free-m
Vmstat
Dmldecode | Grep-i Mem
6. NIC Information
DMESG | Grep-i ETH
Lspci | Grep-i ETH
7. Mouse Keyboard and USB information
Cat/proc/bus/input/devices viewing the keyboard and mouse
Cat/proc/bus/usb/devices Viewing USB devices
Cat/proc/interrupts
8. Sound card information
Lspci | Grep-i VGA
DMESG | Grep-i VGA
9. Other commands
Lspci (Display external device information, such as USB, NIC, etc.)
=================================================================== 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 '
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‘]
To view network card information:
DMESG | grep-i ' ETH '[
Lspci | grep-i ' ETH ']
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
DmidecodeView hardware information, including BIOS, CPU, memory, and more
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
Lsmod Viewing loaded drivers
psrinfo-v View current processor type and speed (frequency)
For files in "/proc", you can use the File View command to browse its contents, and the file contains system-specific information:
CpuinfoHost CPU Information
DMAHost DMA Channel Information
filesystemsFile System Information
InterruptsHost interrupt Information
IoportsHost I/O port number information
MeminfoHost Memory Information
versionLinux Memory version information
Note:
proc–process Information Pseudo-filesystem process information masquerading file system
Linux common view Hardware Device information command