自拍偷在线精品自拍偷,亚洲欧美中文日韩v在线观看不卡

Linux下收集系統(tǒng)和硬件信息的10個(gè)實(shí)用命令

譯文
系統(tǒng) Linux 系統(tǒng)運(yùn)維
知道Linux系統(tǒng)在什么樣的硬件部件上運(yùn)行始終是個(gè)好的做法,這可以幫助你在系統(tǒng)上安裝程序包和驅(qū)動(dòng)程序時(shí),處理兼容問題。本文介紹幾個(gè)實(shí)用命令幫助你獲取關(guān)于Linux系統(tǒng)和硬件部件的信息。

  【51CTO.com快譯】知道Linux系統(tǒng)在什么樣的硬件部件上運(yùn)行始終是個(gè)好的做法,這可以幫助你在系統(tǒng)上安裝程序包和驅(qū)動(dòng)程序時(shí),處理兼容問題。

  圖1:Linux下檢查硬件和系統(tǒng)信息的10個(gè)命令

  因此在這篇技巧文章中,我們將介紹幾個(gè)實(shí)用命令,它們可以幫助你獲取關(guān)于Linux系統(tǒng)和硬件部件的信息。

  1.如何查看Linux系統(tǒng)的信息

  如果僅僅想知道系統(tǒng)名稱,你可以使用不帶任何參數(shù)選項(xiàng)符的uname命令(會(huì)輸出系統(tǒng)信息),或者使用uname -s命令(輸出系統(tǒng)的內(nèi)核名稱)。

 

  1. tecmint@tecmint ~ $ uname 
  2.  
  3. Linux 

  想查看網(wǎng)絡(luò)主機(jī)名稱,使用帶“-n”參數(shù)選項(xiàng)符的uname命令,如下所示。

 

  1. tecmint@tecmint ~ $ uname -n 
  2.  
  3. tecmint.com 

  想獲得關(guān)于內(nèi)核版本的信息,使用“-v”參數(shù)選項(xiàng)符。

 

  1. tecmint@tecmint ~ $ uname -v 
  2.  
  3. #64-Ubuntu SMP Mon Sep 22 21:28:38 UTC 2014 

  想獲得關(guān)于內(nèi)核發(fā)行版的信息,使用“-r”參數(shù)選項(xiàng)符。

 

  1. tecmint@tecmint ~ $ uname -r 
  2.  
  3. 3.13.0-37-generic 

  想輸出你系統(tǒng)的硬件名稱,使用“-m”參數(shù)選項(xiàng)符:

 

  1. tecmint@tecmint ~ $ uname -m 
  2.  
  3. x86_64 

  只要運(yùn)行“uname -a”命令,所有這些信息可以一下子輸出,所下所示。

 

  1. tecmint@tecmint ~ $ uname -a 
  2.  
  3. Linux tecmint.com 3.13.0-37-generic #64-Ubuntu SMP Mon 
  4.  
  5. Sep 22 21:28:38 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux 

  2.如何查看Linux系統(tǒng)的硬件信息

  你在這里可以使用lshw工具,收集關(guān)于硬件部件(比如處理器、磁盤、內(nèi)存和USB控制器等)的大量信息。

  lshw是一個(gè)比較小巧的工具,你在獲取信息時(shí),沒有幾個(gè)選項(xiàng)需要結(jié)合使用。lshw提供的信息從不同的/proc文件收集而來。

  請(qǐng)注意:務(wù)必要記住一點(diǎn),lshw命令只能由超級(jí)用戶(根用戶)或sudo用戶來執(zhí)行。

  想輸出關(guān)于你Linux系統(tǒng)硬件的信息,運(yùn)行這個(gè)命令。

  1. tecmint@tecmint ~ $ sudo lshw 
  2.  
  3. tecmint.com                
  4.     description: Notebook 
  5.     product: 20354 (LENOVO_MT_20354_BU_idea_FM_Lenovo Z50-70) 
  6.     vendor: LENOVO 
  7.     version: Lenovo Z50-70 
  8.     serial: 1037407803441 
  9.     width: 64 bits 
  10.     capabilities: smbios-2.7 dmi-2.7 vsyscall32 
  11.     configuration: administrator_password=disabled boot=normal chassis=notebook family=IDEAPAD frontpanel_password=disabled keyboard_password=disabled power-on_password=disabled sku=LENOVO_MT_20354_BU_idea_FM_Lenovo Z50-70 uuid=E4B1D229-D237-E411-9F6E-28D244EBBD98 
  12.   *-core 
  13.        description: Motherboard 
  14.        product: Lancer 5A5 
  15.        vendor: LENOVO 
  16.        physical id: 0 
  17.        version: 31900059WIN 
  18.        serial: YB06377069 
  19.        slot: Type2 - Board Chassis Location 
  20.      *-firmware 
  21.           description: BIOS 
  22.           vendor: LENOVO 
  23.           physical id: 0 
  24.           version: 9BCN26WW 
  25.           date: 07/31/2014 
  26.           size: 128KiB 
  27.           capacity: 4032KiB 
  28.           capabilities: pci upgrade shadowing cdboot bootselect edd int13floppynec int13floppytoshiba int13floppy360 int13floppy1200 int13floppy720 int13floppy2880 int9keyboard int10video acpi usb biosbootspecification uefi 
  29. ...... 

 

  如果使用-short選項(xiàng),可以輸出硬件信息的摘要。

 

  1. tecmint@tecmint ~ $ sudo lshw -short 
  2.  
  3. H/W path       Device      Class          Description 
  4. ===================================================== 
  5.                            system         20354 (LENOVO_MT_20354_BU_idea_FM_Lenovo Z50-70) 
  6. /0                         bus            Lancer 5A5 
  7. /0/0                       memory         128KiB BIOS 
  8. /0/4                       processor      Intel(R) Core(TM) i5-4210U CPU @ 1.70GHz 
  9. /0/4/b                     memory         32KiB L1 cache 
  10. /0/4/c                     memory         256KiB L2 cache 
  11. /0/4/d                     memory         3MiB L3 cache 
  12. /0/a                       memory         32KiB L1 cache 
  13. /0/12                      memory         8GiB System Memory 
  14. /0/12/0                    memory         DIMM [empty] 
  15. /0/12/1                    memory         DIMM [empty] 
  16. /0/12/2                    memory         8GiB SODIMM DDR3 Synchronous 1600 MHz (0.6 ns) 
  17. /0/12/3                    memory         DIMM [empty] 
  18. /0/100                     bridge         Haswell-ULT DRAM Controller 
  19. /0/100/2                   display        Haswell-ULT Integrated Graphics Controller 
  20. /0/100/3                   multimedia     Haswell-ULT HD Audio Controller 
  21. ... 

  如果你想將輸出生成為一個(gè)html文件,可以使用選項(xiàng)-html。

  1. tecmint@tecmint ~ $ sudo lshw -html > lshw.html 

  

圖2:生成HTML格式的Linux硬件信息

#p#

  3.如何查看Linux處理器的信息

  想查看關(guān)于處理器的信息,可使用lscpu命令,因?yàn)樗@示了來自sysfs和/proc/cpuinfo的關(guān)于處理器架構(gòu)的信息,比如處理器數(shù)量、核心、處理器系列型號(hào)、處理器緩存和線程等。

 

  1. tecmint@tecmint ~ $ lscpu 
  2.  
  3. Architecture:          x86_64 
  4. CPU op-mode(s):        32-bit, 64-bit 
  5. Byte Order:            Little Endian 
  6. CPU(s):                4 
  7. On-line CPU(s) list:   0-3 
  8. Thread(s) per core:    2 
  9. Core(s) per socket:    2 
  10. Socket(s):             1 
  11. NUMA node(s):          1 
  12. Vendor ID:             GenuineIntel 
  13. CPU family:            6 
  14. Model:                 69 
  15. Stepping:              1 
  16. CPU MHz:               768.000 
  17. BogoMIPS:              4788.72 
  18. Virtualization:        VT-x 
  19. L1d cache:             32K 
  20. L1i cache:             32K 
  21. L2 cache:              256K 
  22. L3 cache:              3072K 
  23. NUMA node0 CPU(s):     0-3 

  4.如何收集Linux塊設(shè)備的信息

  塊設(shè)備是硬盤和閃驅(qū)等之類的存儲(chǔ)設(shè)備。lsblk命令可以用來報(bào)告關(guān)于塊設(shè)備的信息,如下所示。

 

  1. tecmint@tecmint ~ $ lsblk 
  2.  
  3. NAME    MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT 
  4. sda       8:0    0 931.5G  0 disk  
  5. ├─sda1    8:1    0  1000M  0 part  
  6. ├─sda2    8:2    0   260M  0 part /boot/efi 
  7. ├─sda3    8:3    0  1000M  0 part  
  8. ├─sda4    8:4    0   128M  0 part  
  9. ├─sda5    8:5    0 557.1G  0 part  
  10. ├─sda6    8:6    0    25G  0 part  
  11. ├─sda7    8:7    0  14.7G  0 part  
  12. ├─sda8    8:8    0     1M  0 part  
  13. ├─sda9    8:9    0 324.5G  0 part / 
  14. └─sda10   8:10   0   7.9G  0 part [SWAP] 
  15. sr0      11:0    1  1024M  0 rom  

  如果你想查看系統(tǒng)上的所有塊設(shè)備,那么加上-a選項(xiàng)。

 

  1. tecmint@tecmint ~ $ lsblk -a 
  2.  
  3. NAME    MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT 
  4. sda       8:0    0 931.5G  0 disk  
  5. ├─sda1    8:1    0  1000M  0 part  
  6. ├─sda2    8:2    0   260M  0 part /boot/efi 
  7. ├─sda3    8:3    0  1000M  0 part  
  8. ├─sda4    8:4    0   128M  0 part  
  9. ├─sda5    8:5    0 557.1G  0 part  
  10. ├─sda6    8:6    0    25G  0 part  
  11. ├─sda7    8:7    0  14.7G  0 part  
  12. ├─sda8    8:8    0     1M  0 part  
  13. ├─sda9    8:9    0 324.5G  0 part / 
  14. └─sda10   8:10   0   7.9G  0 part [SWAP] 
  15. sdb       8:16   1         0 disk  
  16. sr0      11:0    1  1024M  0 rom   
  17. ram0      1:0    0    64M  0 disk  
  18. ram1      1:1    0    64M  0 disk  
  19. ram2      1:2    0    64M  0 disk  
  20. ram3      1:3    0    64M  0 disk  
  21. ram4      1:4    0    64M  0 disk  
  22. ram5      1:5    0    64M  0 disk  
  23. ram6      1:6    0    64M  0 disk  
  24. ram7      1:7    0    64M  0 disk  
  25. ram8      1:8    0    64M  0 disk  
  26. ram9      1:9    0    64M  0 disk  
  27. loop0     7:0    0         0 loop  
  28. loop1     7:1    0         0 loop  
  29. loop2     7:2    0         0 loop  
  30. loop3     7:3    0         0 loop  
  31. loop4     7:4    0         0 loop  
  32. loop5     7:5    0         0 loop  
  33. loop6     7:6    0         0 loop  
  34. loop7     7:7    0         0 loop  
  35. ram10     1:10   0    64M  0 disk  
  36. ram11     1:11   0    64M  0 disk  
  37. ram12     1:12   0    64M  0 disk  
  38. ram13     1:13   0    64M  0 disk  
  39. ram14     1:14   0    64M  0 disk  
  40. ram15     1:15   0    64M  0 disk  

  5.如何輸出USB控制器的信息

  lsusb命令可用于報(bào)告關(guān)于USB控制器及與之相連的所有設(shè)備的信息。

 

  1. tecmint@tecmint ~ $ lsusb 
  2.  
  3. Bus 001 Device 002: ID 8087:8000 Intel Corp.  
  4. Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub 
  5. Bus 003 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub 
  6. Bus 002 Device 005: ID 0bda:b728 Realtek Semiconductor Corp.  
  7. Bus 002 Device 004: ID 5986:0249 Acer, Inc  
  8. Bus 002 Device 003: ID 0bda:0129 Realtek Semiconductor Corp. RTS5129 Card Reader Controller 
  9. Bus 002 Device 002: ID 045e:00cb Microsoft Corp. Basic Optical Mouse v2.0 
  10. Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub 

  你可以使用-v選項(xiàng),生成關(guān)于每個(gè)USB設(shè)備的詳細(xì)信息。

  1. tecmint@tecmint ~ $ lsusb -v 

  6.如何輸出PCI設(shè)備的信息

  PCI設(shè)備可能包括USB端口、顯卡和網(wǎng)絡(luò)適配器等。lspci工具用來生成關(guān)于你系統(tǒng)上所有PCI控制器以及與之相連的設(shè)備的信息。

  想輸出關(guān)于PCI設(shè)備的信息,可運(yùn)行下面這個(gè)命令。

 

  1. tecmint@tecmint ~ $ lspci 
  2.  
  3. 00:00.0 Host bridge: Intel Corporation Haswell-ULT DRAM Controller (rev 0b) 
  4. 00:02.0 VGA compatible controller: Intel Corporation Haswell-ULT Integrated Graphics Controller (rev 0b) 
  5. 00:03.0 Audio device: Intel Corporation Haswell-ULT HD Audio Controller (rev 0b) 
  6. 00:14.0 USB controller: Intel Corporation Lynx Point-LP USB xHCI HC (rev 04) 
  7. 00:16.0 Communication controller: Intel Corporation Lynx Point-LP HECI #0 (rev 04) 
  8. 00:1b.0 Audio device: Intel Corporation Lynx Point-LP HD Audio Controller (rev 04) 
  9. 00:1c.0 PCI bridge: Intel Corporation Lynx Point-LP PCI Express Root Port 3 (rev e4) 
  10. 00:1c.3 PCI bridge: Intel Corporation Lynx Point-LP PCI Express Root Port 4 (rev e4) 
  11. 00:1c.4 PCI bridge: Intel Corporation Lynx Point-LP PCI Express Root Port 5 (rev e4) 
  12. 00:1d.0 USB controller: Intel Corporation Lynx Point-LP USB EHCI #1 (rev 04) 
  13. 00:1f.0 ISA bridge: Intel Corporation Lynx Point-LP LPC Controller (rev 04) 
  14. 00:1f.2 SATA controller: Intel Corporation Lynx Point-LP SATA Controller 1 [AHCI mode] (rev 04) 
  15. 00:1f.3 SMBus: Intel Corporation Lynx Point-LP SMBus Controller (rev 04) 
  16. 01:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 10) 
  17. 02:00.0 Network controller: Realtek Semiconductor Co., Ltd. RTL8723BE PCIe Wireless Network Adapter 
  18. 03:00.0 3D controller: NVIDIA Corporation GM108M [GeForce 840M] (rev a2) 

  使用-t選項(xiàng),生成樹狀格式的輸出。

 

  1. tecmint@tecmint ~ $ lspci -t 
  2.  
  3. -[0000:00]-+-00.0 
  4.            +-02.0 
  5.            +-03.0 
  6.            +-14.0 
  7.            +-16.0 
  8.            +-1b.0 
  9.            +-1c.0-[01]----00.0 
  10.            +-1c.3-[02]----00.0 
  11.            +-1c.4-[03]----00.0 
  12.            +-1d.0 
  13.            +-1f.0 
  14.            +-1f.2 
  15.            \-1f.3 

  使用-v選項(xiàng),生成關(guān)于每個(gè)所連接設(shè)備的詳細(xì)信息。

 

  1. tecmint@tecmint ~ $ lspci -v 
  2.  
  3. 00:00.0 Host bridge: Intel Corporation Haswell-ULT DRAM Controller (rev 0b) 
  4.     Subsystem: Lenovo Device 3978 
  5.     Flags: bus master, fast devsel, latency 0 
  6.     Capabilities:  
  7.  
  8. 00:02.0 VGA compatible controller: Intel Corporation Haswell-ULT Integrated Graphics Controller (rev 0b) (prog-if 00 [VGA controller]) 
  9.     Subsystem: Lenovo Device 380d 
  10.     Flags: bus master, fast devsel, latency 0, IRQ 62 
  11.     Memory at c3000000 (64-bit, non-prefetchable) [size=4M] 
  12.     Memory at d0000000 (64-bit, prefetchable) [size=256M] 
  13.     I/O ports at 6000 [size=64] 
  14.     Expansion ROM at  [disabled] 
  15.     Capabilities:  
  16.     Kernel driver in use: i915 
  17. ..... 

  #p#

7.如何輸出SCSI設(shè)備的信息

  想查看你的所有SCSI/SATA設(shè)備,使用lsscsi命令,如下所示。如果你沒有安裝lsscsi工具,運(yùn)行下面這個(gè)命令即可安裝它。

 

  1. $ sudo apt-get install lsscsi        [on Debian derivatives] 
  2. # yum install lsscsi                 [On RedHat based systems] 
  3. # dnf install lsscsi                 [On Fedora 21+ Onwards] 

  安裝完畢后,運(yùn)行l(wèi)sscsi命令,如下所示:

 

  1. tecmint@tecmint ~ $ lsscsi 
  2.  
  3. [0:0:0:0]    disk    ATA      ST1000LM024 HN-M 2BA3  /dev/sda  
  4. [1:0:0:0]    cd/dvd  PLDS     DVD-RW DA8A5SH   RL61  /dev/sr0  
  5. [4:0:0:0]    disk    Generic- xD/SD/M.S.       1.00  /dev/sdb  

  使用-s選項(xiàng),顯示設(shè)備的大小。

 

  1. tecmint@tecmint ~ $ lsscsi -s 
  2.  
  3. [0:0:0:0]    disk    ATA      ST1000LM024 HN-M 2BA3  /dev/sda   1.00TB 
  4. [1:0:0:0]    cd/dvd  PLDS     DVD-RW DA8A5SH   RL61  /dev/sr0        - 
  5. [4:0:0:0]    disk    Generic- xD/SD/M.S.       1.00  /dev/sdb        - 

  8.如何輸出關(guān)于SATA設(shè)備的信息

  你可以使用hdparm實(shí)用工具,找到關(guān)于系統(tǒng)上SATA設(shè)備的一些信息,如下所示。在下面這個(gè)例子中,我使用了實(shí)為系統(tǒng)上硬盤的塊設(shè)備/dev/sda1。

 

  1. tecmint@tecmint ~ $ sudo hdparm /dev/sda1 
  2.  
  3. /dev/sda1: 
  4.  multcount     =  0 (off
  5.  IO_support    =  1 (32-bit
  6.  readonly      =  0 (off
  7.  readahead     = 256 (on
  8.  geometry      = 56065/255/63, sectors = 2048000, start = 2048 

  想輸出關(guān)于設(shè)備結(jié)構(gòu)在柱面、磁頭、扇區(qū)、大小和起始偏移量等方面的信息,使用-g選項(xiàng)。

 

  1. tecmint@tecmint ~ $ sudo hdparm -g /dev/sda1 
  2.  
  3. /dev/sda1: 
  4.  geometry      = 56065/255/63, sectors = 2048000, start = 2048 

  9.如何輸出Linux文件系統(tǒng)的信息

  想收集關(guān)于文件系統(tǒng)分區(qū)的信息,可以使用fdisk命令。雖然fdisk命令的主要功能是改動(dòng)文件系統(tǒng)分區(qū),但是它也可以用來查看關(guān)于文件系統(tǒng)上不同分區(qū)的信息。

  你可以輸出分區(qū)信息,如下所示。記得以超級(jí)用戶的身份運(yùn)行該命令,否則你看不到任何輸出。

 

  1. tecmint@tecmint ~ $ sudo fdisk -l 
  2.  
  3. WARNING: GPT (GUID Partition Table) detected on '/dev/sda'! The util fdisk doesn't support GPT. Use GNU Parted. 
  4.  
  5.  
  6. Disk /dev/sda: 1000.2 GB, 1000204886016 bytes 
  7. 255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors 
  8. Units = sectors of 1 * 512 = 512 bytes 
  9. Sector size (logical/physical): 512 bytes / 4096 bytes 
  10. I/O size (minimum/optimal): 4096 bytes / 4096 bytes 
  11. Disk identifier: 0xcee8ad92 
  12.  
  13.    Device Boot      Start         End      Blocks   Id  System 
  14. /dev/sda1               1  1953525167   976762583+  ee  GPT 
  15. Partition 1 does not start on physical sector boundary. 

  10.如何獲取關(guān)于硬件部件的信息

  你還可以使用dmidecode實(shí)用工具來獲取硬件信息,只要從DMI表讀取數(shù)據(jù)。

  想輸出關(guān)于內(nèi)存的信息,以超級(jí)用戶的身份運(yùn)行該命令。

 

  1. tecmint@tecmint ~ $ sudo dmidecode -t memory 
  2.  
  3. # dmidecode 2.12 
  4. # SMBIOS entry point at 0xaaebef98 
  5. SMBIOS 2.7 present. 
  6.  
  7. Handle 0x0005, DMI type 5, 24 bytes 
  8. Memory Controller Information 
  9.     Error Detecting Method: None 
  10.     Error Correcting Capabilities: 
  11.         None 
  12.     Supported Interleave: One-way Interleave 
  13.     Current Interleave: One-way Interleave 
  14.     Maximum Memory Module Size: 8192 MB 
  15.     Maximum Total Memory Size: 32768 MB 
  16.     Supported Speeds: 
  17.         Other 
  18.     Supported Memory Types: 
  19.         Other 
  20.     Memory Module Voltage: Unknown 
  21.     Associated Memory Slots: 4 
  22.         0x0006 
  23.         0x0007 
  24.         0x0008 
  25.         0x0009 
  26.     Enabled Error Correcting Capabilities: 
  27.         None 
  28. ... 

  想輸出關(guān)于系統(tǒng)的信息,運(yùn)行該命令。

 

  1. tecmint@tecmint ~ $ sudo dmidecode -t system 
  2.  
  3. # dmidecode 2.12 
  4. # SMBIOS entry point at 0xaaebef98 
  5. SMBIOS 2.7 present. 
  6.  
  7. Handle 0x0001, DMI type 1, 27 bytes 
  8. System Information 
  9.     Manufacturer: LENOVO 
  10.     Product Name: 20354 
  11.     Version: Lenovo Z50-70 
  12.     Serial Number: 1037407803441 
  13.     UUID: 29D2B1E4-37D2-11E4-9F6E-28D244EBBD98 
  14.     Wake-up Type: Power Switch 
  15.     SKU Number: LENOVO_MT_20354_BU_idea_FM_Lenovo Z50-70 
  16.     Family: IDEAPAD 
  17. ... 

  想輸出關(guān)于BIOS的信息,運(yùn)行該命令。

 

  1. tecmint@tecmint ~ $ sudo dmidecode -t bios 
  2.  
  3. # dmidecode 2.12 
  4. # SMBIOS entry point at 0xaaebef98 
  5. SMBIOS 2.7 present. 
  6.  
  7. Handle 0x0000, DMI type 0, 24 bytes 
  8. BIOS Information 
  9.     Vendor: LENOVO 
  10.     Version: 9BCN26WW 
  11.     Release Date: 07/31/2014 
  12.     Address: 0xE0000 
  13.     Runtime Size: 128 kB 
  14.     ROM Size: 4096 kB 
  15.     Characteristics: 
  16.         PCI is supported 
  17.         BIOS is upgradeable 
  18.         BIOS shadowing is allowed 
  19.         Boot from CD is supported 
  20.         Selectable boot is supported 
  21.         EDD is supported 
  22.         Japanese floppy for NEC 9800 1.2 MB is supported (int 13h) 
  23.         Japanese floppy for Toshiba 1.2 MB is supported (int 13h) 
  24.         5.25"/360 kB floppy services are supported (int 13h) 
  25.         5.25"/1.2 MB floppy services are supported (int 13h) 
  26.         3.5"/720 kB floppy services are supported (int 13h) 
  27.         3.5"/2.88 MB floppy services are supported (int 13h) 
  28.         8042 keyboard services are supported (int 9h) 
  29.         CGA/mono video services are supported (int 10h) 
  30.         ACPI is supported 
  31.         USB legacy is supported 
  32.         BIOS boot specification is supported 
  33.         Targeted content distribution is supported 
  34.         UEFI is supported 
  35.     BIOS Revision: 0.26 
  36.     Firmware Revision: 0.26 
  37. ... 

  想輸出關(guān)于處理器的信息,運(yùn)行該命令。

 

  1. tecmint@tecmint ~ $ sudo dmidecode -t processor 
  2.  
  3. # dmidecode 2.12 
  4. # SMBIOS entry point at 0xaaebef98 
  5. SMBIOS 2.7 present. 
  6.  
  7. Handle 0x0004, DMI type 4, 42 bytes 
  8. Processor Information 
  9.     Socket Designation: U3E1 
  10.     Type: Central Processor 
  11.     Family: Core i5 
  12.     Manufacturer: Intel(R) Corporation 
  13.     ID: 51 06 04 00 FF FB EB BF 
  14.     Signature: Type 0, Family 6, Model 69, Stepping 1 
  15.     Flags: 
  16. ... 

  結(jié)束語

  你可以使用另外許多方法來獲取關(guān)于系統(tǒng)硬件部件的信息。這些命令大都使用/proc目錄中的文件來獲取系統(tǒng)信息。

  但愿你覺得本文很實(shí)用,如果你想添加更多的信息,或者在使用上述命令中遇到了什么困難,歡迎留言交流。

原文標(biāo)題:10 Useful Commands to Collect System and Hardware Information in Linux,作者:Aaron Kili

【51CTO譯稿,合作站點(diǎn)轉(zhuǎn)載請(qǐng)注明原文譯者和出處為51CTO.com】

責(zé)任編輯:火鳳凰 來源: 51CTO.com
相關(guān)推薦

2015-12-03 09:46:50

收集硬件Linux命令

2014-05-15 10:49:09

Linux 硬件信息Linux 命令

2015-10-29 13:10:08

passwd命令Linux

2014-03-18 14:00:19

Linux監(jiān)控命令

2023-11-06 18:02:28

Linux實(shí)用命令

2014-08-13 10:15:00

Linuxdmesg命令

2020-09-28 15:14:31

Linux常用命令實(shí)用命令

2018-01-08 15:50:21

Linux命令系統(tǒng)和硬件

2014-03-17 17:27:51

Linux mvLinux 命令

2024-05-28 08:00:00

Python操作系統(tǒng)命令

2021-04-09 11:42:16

Linux 系統(tǒng)硬件操作系統(tǒng)

2015-05-25 19:37:17

InxiLinux

2014-05-04 10:34:32

Linux硬件信息Linux命令

2015-07-27 09:22:53

Unix文件系統(tǒng)命令

2015-10-19 09:11:01

系統(tǒng)管理員命令Linux

2016-01-04 15:17:50

Linux命令行硬件

2018-08-06 08:51:32

Linux命令cut

2020-10-29 18:42:26

Linux命令操作系統(tǒng)

2010-12-17 09:52:32

bash命令

2015-10-27 14:50:39

技術(shù)周刊
點(diǎn)贊
收藏

51CTO技術(shù)棧公眾號(hào)