LINUX View hardware configuration commands

Source: Internet
Author: User
Tags bind memory usage port number dmesg

System

# uname-a # View kernel/operating system/CPU information

# head-n 1/etc/issue # View operating system 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 the 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 Idle memory

# uptime # View system run time, number of users, load

# cat/proc/loadavg # View System load

Disks and partitions

# Mount | COLUMN-T # View the partition status of the hook

# fdisk-l # View all partitions

# swapon-s # View all swap partitions

# hdparm-i/dev/hda # View disk parameters (IDE devices only)

# DMESG | grep IDE # View IDE Device detection status at startup

Internet

# ifconfig # View 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 connections that have been established

# 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 login log

# cut-d:-f1/etc/passwd # View All users of the system

# cut-d:-f1/etc/group # View all groups of the system

# crontab-l # View scheduled tasks for the current user

Service

# chkconfig--list # list all system services

# chkconfig--list | grep on # Lists all initiated system services

Program

# rpm-qa # View all installed Packages

Other common commands are sorted as follows:

To view the motherboard serial number: Dmidecode | Grep-i ' Serial number '

Detecting new hardware with hardware detection program Kuduz: Service kudzu start (or restart)

Viewing CPU information: Cat/proc/cpuinfo [DMESG | grep-i ' CPU '][DMIDECODE-T processor]

Viewing memory information: Cat/proc/meminfo [Free-m][vmstat]

View board Information: CAT/PROC/PCI

View video card/sound card information: Lspci |grep-i ' VGA ' [DMESG | grep-i ' VGA ']

View network card information: DMESG | Grep-i ' ETH ' [cat/etc/sysconfig/hwconf | grep-i eth][lspci | grep-i ' ETH ']

Viewing PCI information: LSPCI (more intuitive than CAT/PROC/PCI)

Viewing USB devices: Cat/proc/bus/usb/devices

View keyboard and mouse: Cat/proc/bus/input/devices

View system hard drive information and usage: Fdisk & disk–l & DF

To view interrupt requests (IRQ) for each device: cat/proc/interrupts

View System Architecture: UNAME-A

To view and start the system's 32-bit or 64-bit kernel mode: isalist–v [isainfo–v][isainfo–b]

View hardware information, including BIOS, CPU, memory, and more: Dmidecode

Determine the current display refresh rate:/usr/sbin/ffbconfig–rev?

View System configuration:/usr/platform/sun4u/sbin/prtdiag–v

To view patches that have been applied in the current system: showrev–p

Displays the current run level: WHO–RH

To view the current BIND version information: Nslookup–class=chaos–q=txt Version.bind

View hardware information: DMESG | More

Display peripheral information, such as USB, Nic and other information: LSPCI

To view loaded drivers:

Lsnod

Lshw

View the current processor type and speed (frequency): Psrinfo-v

Print the current OBP version number: Prtconf-v

View hard disk physical information (vendor, RPM, Capacity): Iostat–e

To view the geometry parameters and partition information for a disk: prtvtoc/dev/rdsk/c0t0d0s

Displays the number of i-node that have been used and not used:

Df–f Ufs–o I

Isalist–v

For files in '/proc ', you can use the File View command to browse their contents and include system-specific information in the file:

Host CPU Information: Cpuinfo

Host DMA Channel information: DMA

File System Information: filesystems

Host Interrupt information: interrupts

Host I/O port number information: Ioprots

Host Memory Information: Meninfo

Linux Memory release information: version

Note: proc–process information Pseudo-filesystem Process information Camouflage file system

Related Article

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.