Commands for viewing hardware device information in linux and for viewing hardware commands in linux

Source: Internet
Author: User
Tags dmesg

Commands for viewing hardware device information in linux and for viewing hardware commands in linux

Reprinted: http://blog.chinaunix.net/uid-26782198-id-3242120.html


# Uname-a # view kernel/operating system/CPU Information
# Head-n 1/etc/issue # view the operating system version
# Cat/proc/cpuinfo # view CPU Information
# Hostname # view the 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 the usage of each partition
# Du-sh <Directory Name> # view the size of a specified directory
# Grep MemTotal/proc/meminfo # view total memory
# Grep MemFree/proc/meminfo # view the Amount of idle memory
# Uptime # view system running time, number of users, and load
# Cat/proc/loadavg # view 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 parameters (only applicable 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 the route 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 # 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

Common commands are as follows:
View the serial number of the motherboard: dmidecode | grep-I 'serial number'

Use the hardware detection program kuduz to detect the new hardware: 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 Board information: cat/proc/pci

View the video/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

View the keyboard and mouse: cat/proc/bus/input/devices

View system hard disk information and usage: fdisk & disk-l & df

View interrupt requests of each device (IRQ): cat/proc/interrupts

View System Architecture: uname-

View and start the 32-bit or 64-bit Kernel Mode of the system: isalist-v [isainfo-v] [isainfo-B]

Dmidecode: displays hardware information, including bios, cpu, and memory.

Measure the refresh frequency of the current monitor:/usr/sbin/ffbconfig-rev \?

View System Configuration:/usr/platform/sun4u/sbin/prtdiag-v

View the patches applied in the current system: showrev-p

Displays the current running level: who-rH

View the current bind version: nslookup-class = chaos-q = txt version. bind

Dmesg | more view hardware information
Lspci displays peripheral information, such as usb and nic.
Lsnod view loaded drivers
Lshw
Psrinfo-v view the type and speed of the current processor (clock speed)
Prtconf-v: print the current OBP version
Iostat-E view Hard Disk Physical information (vendor, RPM, Capacity)
Prtvtoc/dev/rdsk/c0t0d0s view disk geometric parameters and partition information
Df-F ufs-o I shows the number of used and unused I-nodes
Isalist-v

For files in "/proc", you can use the File View command to browse its content. The file contains system-specific information:
CPU info host CPU Information
Dma host DMA channel information
Filesystems File System Information
Interrupts host interruption Information
Ioprots host I/O port number information
Meninfo host memory information
Version Linux memory Version

Note: proc-process information pseudo-filesystem process information disguise File System

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.