Introduction to commands for viewing hardware and system information in linux

Source: Internet
Author: User
[Root @ yufei ~] # Uname-a # linux system information command for viewing kernel/operating system/CPU information [root @ yufei ~] # Head-n1/etc/issue # view the operating system version, is the number 1 is not the letter L [root @ yufei ~] # Cat/proc/cpuin...

[Root @ yufei ~] # Uname-a # linux system information command for viewing kernel/operating system/CPU information

[Root @ yufei ~] # Head-n 1/etc/issue # view the operating system version. The value is 1, not L.

[Root @ yufei ~] # Cat/proc/cpuinfo # linux system information command for viewing CPU information

[Root @ yufei ~] # Hostname # linux system information command for viewing computer names

[Root @ yufei ~] # Lspci-TV # List all PCI devices

[Root @ yufei ~] # Lsusb-TV # linux system information commands for listing all USB devices

[Root @ yufei ~] # Lsmod # List loaded kernel modules

[Root @ yufei ~] # Env # View environment variable resources

[Root @ yufei ~] # Free-m # View memory usage and swap zone usage

[Root @ yufei ~] # Df-h # view the usage of each partition

[Root @ yufei ~] # Du-sh # view the size of a specified directory

[Root @ yufei ~] # Grep MemTotal/proc/meminfo # View total memory

[Root @ yufei ~] # Grep MemFree/proc/meminfo # view the amount of idle memory

[Root @ yufei ~] # Uptime # View system running time, number of users, and load

[Root @ yufei ~] # Cat/proc/loadavg # View system load disks and partitions

[Root @ yufei ~] # Mount | column-t # view the status of the mounted partition

[Root @ yufei ~] # Fdisk-l # View all partitions

[Root @ yufei ~] # Swapon-s # View all swap partitions

[Root @ yufei ~] # Hdparm-I/dev/hda # View disk parameters (only applicable to IDE devices)

[Root @ yufei ~] # Dmesg | grep IDE # view the network of the IDE device detection status at startup

[Root @ yufei ~] # Ifconfig # view the attributes of all network interfaces

[Root @ yufei ~] # Iptables-L # View firewall settings

[Root @ yufei ~] # Route-n # view the route table

[Root @ yufei ~] # Netstat-lntp # View all listening ports

[Root @ yufei ~] # Netstat-antp # View all established connections

[Root @ yufei ~] # Netstat-s # View network statistics process

[Root @ yufei ~] # Ps-ef # View all processes

[Root @ yufei ~] # Top # real-time display of process status users

[Root @ yufei ~] # W # View active users

[Root @ yufei ~] # Id # View specified user information

[Root @ yufei ~] # Last # View user logon logs

[Root @ yufei ~] # Cut-d:-f1/etc/passwd # View all users in the system

[Root @ yufei ~] # Cut-d:-f1/etc/group # View all groups in the system

[Root @ yufei ~] # Crontab-l # view the scheduled task service of the current user

[Root @ yufei ~] # Chkconfig-list # list all System Services

[Root @ yufei ~] # Chkconfig-list | grep on # list all started System service programs

[Root @ yufei ~] # Rpm-qa # View all installed software packages

[Root @ yufei ~] # Cat/proc/cpuinfo # linux system command for viewing CPU-related parameters

[Root @ yufei ~] # Cat/proc/partitions # command for viewing linux hard disk and partition information

[Root @ yufei ~] # Cat/proc/meminfo # linux system command for viewing linux system memory information

[Root @ yufei ~] # Cat/proc/version # view the version, similar to uname-r

[Root @ yufei ~] # Cat/proc/ioports # view the device's io port

[Root @ yufei ~] # Cat/proc/interrupts # View interruptions

[Root @ yufei ~] # Cat/proc/pci # View pci device information

[Root @ yufei ~] # Cat/proc/swaps # view information about all swap partitions

If the preceding command does not exist, you can use a similar command like yum provides "*/lspci" on RHEL6, and then install the corresponding software package.

Finally, I shared a script for viewing hardware information, which is very powerful and can contain parameters and use-h for detailed help.

As follows:

Download opsers share

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.