In linux, how does one view hardware information ?, Linux hardware Overview

Source: Internet
Author: User

In linux, how does one view hardware information ?, Linux hardware Overview

Linux displays the hardware information of the system, which is not as intuitive as windows. Here I list the practical commands for viewing the system information, classify them, and explain the examples.

Cpu

The lscpu command displays cpu statistics.

Blue @ blue-pc :~ $ LscpuArchitecture: i686 # cpu architecture CPU op-mode (s): 32-bit, 64-bitByte Order: Little Endian # Small Tail sequence CPU (s ): 4 # A total of 4 cores On-line CPU (s) list: 0-3Thread (s) per core: 1 # Each cpu core can only support one thread, that is, hyper-threading Core (s) per socket: 4 # Each cpu has 4 cores Socket (s): 1 # A total of 1 cpuVendor ID: genuineIntel # intelCPU family: 6 Model: 42 Stepping: 7CPU MHz: 1600.000 BogoMIPS: 5986.12 Virtualization: VT-x # support for cpu Virtualization technology L1d cache: 32KL1i cache: 32KL2 cache: 256KL3 cache: 6144 K

View/proc/cpuinfo to know the information about each cpu, such as the Model and clock speed of each CPU.

#cat /proc/cpuinfoprocessor    : 0vendor_id    : GenuineIntelcpu family    : 6model        : 42model name    : Intel(R) Core(TM) i5-2320 CPU @ 3.00GHz.....

The first cpu information is output above, and three other cpu information is omitted.

Memory

View memory Overview

free -m             total       used       free     shared    buffers     cachedMem:          3926       3651        274          0         12        404-/+ buffers/cache:       3235        691Swap:         9536         31       9505

The unit here is MB, and the total memory is 3926 MB.

View memory usage details

# cat /proc/meminfo MemTotal:        4020868 kBMemFree:          230884 kBBuffers:            7600 kBCached:           454772 kBSwapCached:          836 kB.....

View memory hardware information

dmidecode -t memory# dmidecode 2.11SMBIOS 2.7 present.Handle 0x0008, DMI type 16, 23 bytesPhysical Memory Array    Location: System Board Or Motherboard....    Maximum Capacity: 32 GB....Handle 0x000A, DMI type 17, 34 bytes....Memory Device    Array Handle: 0x0008    Error Information Handle: Not Provided    Total Width: 64 bits    Data Width: 64 bits    Size: 4096 MB.....

My motherboard has four slots, only one slot is used, and a 40, 96 MB memory is inserted on it.

Disk

View disk and Partition Distribution

# lsblkNAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTsda      8:0    0 465.8G  0 disk ├─sda1   8:1    0     1G  0 part /boot├─sda2   8:2    0   9.3G  0 part [SWAP]├─sda3   8:3    0  74.5G  0 part /├─sda4   8:4    0     1K  0 part ├─sda5   8:5    0 111.8G  0 part /home└─sda6   8:6    0 269.2G  0 part 

Intuitive display

If you want to view detailed information about the hard disk and partition

# fdisk -lDisk /dev/sda: 500.1 GB, 500107862016 bytes255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectorsUnits = sectors of 1 * 512 = 512 bytesSector size (logical/physical): 512 bytes / 4096 bytesI/O size (minimum/optimal): 4096 bytes / 4096 bytesDisk identifier: 0x00023728   Device Boot      Start         End      Blocks   Id  System/dev/sda1   *        2048     2148351     1073152   83  Linux/dev/sda2         2148352    21680127     9765888   82  Linux swap / Solaris/dev/sda3        21680128   177930239    78125056   83  Linux/dev/sda4       177932286   976771071   399419393    5  Extended/dev/sda5       177932288   412305407   117186560   83  Linux/dev/sda6       412307456   976771071   282231808   83  Linux
Nic

View network card hardware information

# lspci | grep -i 'eth'02:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 06)

View all network interfaces of the system

# Ifconfig-aeth0 Link encap: Ethernet hardware address b8: 97: 5a: 17: b3: 8f ...... lo Link encap: local loopback .....

Or

ip link show1: lo: 
 
   mtu 16436 qdisc noqueue state DOWN link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:002: eth0: 
  
    mtu 1500 qdisc pfifo_fast state UP qlen 1000link/ether b8:97:5a:17:b3:8f brd ff:ff:ff:ff:ff:ff
  
 

If you want to view detailed information about a network interface, such as detailed parameters and indicators of eth0

# Ethtool eth0Settings for eth0: Supported ports: [tp mii] Supported link modes: 10 baseT/Half 10 baseT/Full 100 baseT/Half 100 baseT/Full 1000 baseT/Half 1000 baseT/Full # support Gigabit Half duplex, Full duplex mode Supported pause frame use: no Supports auto-negotiation: Yes # adaptive mode is supported. Generally, Advertised link modes is supported: 10 baseT/Half 10 baseT/Full 100 baseT/Half 100 baseT/Full 1000 baseT/Half 1000 baseT/Full Advertised pause frame use: Your Ric Receive-only Advertised auto-negotiation: yes # The adaptive mode is used by default. Link partner advertised link modes: 10 baseT/Half 10 baseT/Full 100 baseT/Half 100 baseT/Full ..... speed: 100 Mb/s # The current Speed of the network adapter is 100 Mb, and the network adapter uses the adaptive mode. Therefore, it is assumed that the route is 100 Mb. As a result, the network adapter must support Mbit/s Duplex: full # Full Duplex ..... link detected: yes # indicates a network connection with the route.
Others

View pci information, that is, all hardware slots on the motherboard.

Lspci00: 00.0 Host bridge: Intel Corporation 2nd Generation Core Processor Family DRAM Controller (rev 09) # motherboard chip. 0 VGA compatible controller: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller (rev 09) # Video Card. 0 USB controller: Intel Corporation Panther Point USB xHCI Host Controller (rev 04) # usb controller. 0 Communication controller: Intel Corporation Panther Point MEI Controller #1 (rev 04) 00: 1a. 0 USB controller: Intel Corporation Panther Point USB Enhanced Host Controller #2 (rev 04) 00: 1b. 0 Audio device: Intel Corporation Panther Point High Definition Audio Controller (rev 04) # Sound Card 00: 1c. 0 PCI bridge: Intel Corporation Panther Point PCI Express Root Port 1 (rev c4) # pci slot 00: 1c. 2 PCI bridge: Intel Corporation Panther Point PCI Express Root Port 3 (rev c4) 00: 1c. 3 PCI bridge: Intel Corporation Panther Point PCI Express Root Port 4 (rev c4) 00: 1d. 0 USB controller: Intel Corporation Panther Point USB Enhanced Host Controller #1 (rev 04) 00: 1f. 0 ISA bridge: Intel Corporation Panther Point LPC Controller (rev 04) 00: 1f. 2 IDE interface: Intel Corporation Panther Point 4 port SATA Controller [IDE mode] (rev 04) # hard disk interface 00: 1f. 3 SMBus: Intel Corporation Panther Point SMBus Controller (rev 04) 00: 1f. 5 IDE interface: Intel Corporation Panther Point 2 port SATA Controller [IDE mode] (rev 04) # hard disk interface. 0 Ethernet controller: Realtek semiconduco ., ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 06) # network adapter. 0 PCI bridge: Integrated Technology Express, Inc. device 8893 (rev 41)

For more details: lspci-v or lspci-vv

If you want to view the Device Tree: lscpi-t

View bios Information

# dmidecode -t bios......BIOS Information    Vendor: American Megatrends Inc.    Version: 4.6.5    Release Date: 04/25/2012    .......    BIOS Revision: 4.6......

Dmidecode dumps the DMI (Desktop Management Interface) information of the machine in a readable way. This information includes hardware and BIOS. You can get the current configuration or the maximum configuration supported by the system, such as the maximum memory size supported.

To view all useful information

dmidecode -q

It contains a lot of hardware information.

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.