Command for viewing computer hardware device properties in CentOS

Source: Internet
Author: User
Tags dmesg

How to view computer hardware device properties in linux

# 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 loaded kernel modules # env # view environment variable resources # free-m # view memory usage and swap zone usage # df-h # view the usage of each partition # du-sh # view the size of the specified directory # grep MemTotal/proc/meminfo # view the total memory # grep memFree/proc/meminfo # view the Amount of idle memory # uptime # view the system running time, number of users, and load # cat/proc/loadavg # view the system load disk and partition # mount | c Olumn-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 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 # Real-Time display Process status user # w # view active users # id # 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 system groups # crontab-l # view the scheduled Task Service of the current user # chkconfig-list # list all system services # chkconfig-list | grep on # list all started system service programs # rpm-qa # view all installed software packages cat/proc/cpuinfo: view CPU-related parameters cat/proc/partitions: View hard disk and partition cat/proc/meminfo: view memory information cat/proc/version: View version, similar to uname-rcat/proc/ioports: view the device io port cat/proc/interrupts: view the interrupt cat/proc/pci: view the information of the pci device cat/proc/swaps: view the information of all swap partitions to know what hardware devices the system has. Method 1: Use the lsdev command to display the devices and features in the system. For example: lsdev-C, but this command may not be available on the general system. For example, the ora command I installed does not exist. Method 2: display the/proc/dev file, which records some hardware information of the system, for example: cat/proc/dev method 3: to find a specific usb device, you can use the lsusb command to list all usb devices. If you want to find a specific pcmcia device, you can use the lspcmcia command to list all pcmcia devices. If you want to find a specific pci device, you can use the lspci command to list all pcm devices. In Linux, Check hardware information and drive devices. Use the hardware detection program kudzu to test new hardware: service kudzu start (or restart). View CPU information: cat/proc/cpuinfo. view Board information: cat/proc/pci view PCI information: lspci (more intuitive than cat/proc/pci) view memory information: cat/proc/meminfo view USB device: cat/proc/bus/usb/devices view 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-a development of drivers in LINUX environment, first, we need to detect new hardware, and then develop the driver. Common commands are as follows: Use the hardware detection program kudzu to detect new hardware: service kudzu start (or restart) to view CPU information: cat/proc/cpuinfo to view Board information: cat/proc/pci view PCI information: lspci (more intuitive than cat/proc/pci) view memory information: cat/proc/meminfo view USB device: cat/proc/bus/usb/devices view 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-a dmidecode view hardware information, including bios, cpu, memory and other information dmesg | more view hardware information for "/proc" files can be viewed using the file command Browse its content. The file 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 Version information display PCI device details currently many common Hardware is PCI (Peripheral Component Interconnect) devices, such as sound cards, NICS, and USB controllers, are generally PCI devices. You may need to view the details of the PCI device because you want to install the driver or others. The lspci command facilitates this. The simplest way to use lspci is: lspci, which shows the most useful information for us. For more details, you can: lspci-vlspci-vvlspci-vvv. If some projects cannot translate texts that can be understood by adults, you can update-pciids to use this function. Make sure that you are connected to the Internet and can access a foreign network.


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.