Difference between revisions of "Hwinfo"

From Linuxintro
imported>ThorstenStaerk
imported>ThorstenStaerk
 
(28 intermediate revisions by 4 users not shown)
Line 1: Line 1:
The program hwinfo allows you to gather information about your hardware:
+
<metadesc>Use hwinfo to see everything the kernel knows about your CPU, BIOS, USB devices, hard disks, camera, cdrom, chipcard, dsl, dvb, fingerprint, framebuffer, gfxcard, hub</metadesc>
  
 +
= Overview =
 +
The [[command]] hwinfo prints information about your [[hardware]]:
 +
* [[CPU]]
 +
* [[block devices]] aka hard disk, CD ROM, floppy
 +
* BIOS
 +
* network card
 +
 +
= Install it =
 +
hwinfo should be installed by default. However if it is not [[find out your distribution]] to find out how to install it:
 +
* for SUSE:
 +
<source>
 +
yast -i hwinfo
 +
</source>
 +
* for Debian, Raspbian, Ubuntu, Kubuntu, Flubuntu, Xubuntu, GEUbuntu, Edubuntu, ...:
 +
<source>
 +
apt-get install hwinfo
 +
</source>
 +
* for Fedora, Red Hat, Red Flag, Asianux, ...:
 +
<source>
 +
yum install hwinfo
 +
</source>
 +
 +
= Run it =
 +
To print information about your [[hardware]]:
 +
<source>
 
  # hwinfo --help
 
  # hwinfo --help
 
  Usage: hwinfo [options]
 
  Usage: hwinfo [options]
Line 11: Line 36:
 
   --hw_item      probe for hw_item
 
   --hw_item      probe for hw_item
 
   hw_item is one of:
 
   hw_item is one of:
     all, bios, block, bluetooth, braille, bridge, camera, cdrom, chipcard,
+
     all, bios, [[block]], [[bluetooth]], braille, bridge, camera, cdrom, chipcard,
 
     cpu, disk, dsl, dvb, fingerprint, floppy, framebuffer, gfxcard, hub,
 
     cpu, disk, dsl, dvb, fingerprint, floppy, framebuffer, gfxcard, hub,
 
     ide, isapnp, isdn, joystick, keyboard, memory, modem, monitor, mouse,
 
     ide, isapnp, isdn, joystick, keyboard, memory, modem, monitor, mouse,
 
     netcard, network, partition, pci, pcmcia, pcmcia-ctrl, pppoe, printer,
 
     netcard, network, partition, pci, pcmcia, pcmcia-ctrl, pppoe, printer,
     scanner, scsi, smp, sound, storage-ctrl, sys, tape, tv, usb, usb-ctrl,
+
     [[scanner]], scsi, smp, sound, storage-ctrl, sys, tape, <abbr title="TV cards as long as not connected via USB">tv</abbr>, usb, usb-ctrl,
 
     vbe, [[wlan]], zip
 
     vbe, [[wlan]], zip
 
   
 
   
 
   Note: debug info is shown only in the log file. (If you specify a
 
   Note: debug info is shown only in the log file. (If you specify a
 
   log file the debug level is implicitly set to a reasonable value.)
 
   log file the debug level is implicitly set to a reasonable value.)
 +
</source>
  
 
= Examples =  
 
= Examples =  
 +
 +
== CPU ==
 +
* find out your processor type
 +
<source>
 +
# hwinfo --cpu --short
 +
cpu:                                                           
 +
                        Intel(R) Core(TM) i5-8250U CPU @ 1.60GHz, 1800 MHz
 +
</source>
 +
;Note: If you want to know what your CPU is doing, use the command [[top]].
  
 
== network ==
 
== network ==
 
* find out what eth0, eth1 and the like stands for
 
* find out what eth0, eth1 and the like stands for
 +
<source>
 
  # hwinfo --netcard --short
 
  # hwinfo --netcard --short
 
  network:
 
  network:
Line 30: Line 66:
 
   eth1                D-Link DGE-528T Gigabit Ethernet Adapter
 
   eth1                D-Link DGE-528T Gigabit Ethernet Adapter
 
   wlan0                Ralink 802.11 bg WLAN
 
   wlan0                Ralink 802.11 bg WLAN
 +
</source>
 +
 +
* find out drivers for your network cards:
 +
<source>
 +
# hwinfo --netcard | grep -Ei "model\:|driver\:"
 +
  Model: "Broadcom NetXtreme BCM5764M Gigabit Ethernet PCIe"
 +
  Driver: "tg3"
 +
  Model: "Intel Wireless WiFi Link 5100"
 +
  Driver: "iwlwifi"
 +
</source>
 +
;Note: If you want to know what data is being transmitted over your network, use [[iptraf]] and [[tcpdump]].
  
 
== storage ==
 
== storage ==
 
* find out your hdd controllers
 
* find out your hdd controllers
 +
<source>
 
  hwinfo --storage --short
 
  hwinfo --storage --short
 
  storage:
 
  storage:
Line 38: Line 86:
 
                         Intel 82801I (ICH9 Family) 2 port SATA IDE Controller
 
                         Intel 82801I (ICH9 Family) 2 port SATA IDE Controller
 
                         Intel 82801IR/IO/IH (ICH9R/DO/DH) 4 port SATA IDE Controller
 
                         Intel 82801IR/IO/IH (ICH9R/DO/DH) 4 port SATA IDE Controller
 
+
</source>
 
* find out your harddisks and partitions
 
* find out your harddisks and partitions
 +
<source>
 
  hwinfo --block --short
 
  hwinfo --block --short
 
  disk:
 
  disk:
Line 51: Line 100:
 
   /dev/sr1            TSSTcorp DVD+-RW TS-H653B
 
   /dev/sr1            TSSTcorp DVD+-RW TS-H653B
 
   /dev/sr0            HL-DT-ST DVD-ROM GDRH20N
 
   /dev/sr0            HL-DT-ST DVD-ROM GDRH20N
 +
</source>
 +
;Note: If you want more info on your partitions, you may want to call [https://www.howtogeek.com/106873/how-to-use-fdisk-to-manage-partitions-on-linux/ fdisk].
  
 
= See also =
 
= See also =
* [http://man-wiki.net/index.php/8:hwinfo hwinfo man page]
+
* [http://www.sarata.com/manpages/man8/hwinfo.8.html hwinfo man page]

Latest revision as of 06:40, 12 April 2020


Overview

The command hwinfo prints information about your hardware:

Install it

hwinfo should be installed by default. However if it is not find out your distribution to find out how to install it:

  • for SUSE:

<source>

yast -i hwinfo

</source>

  • for Debian, Raspbian, Ubuntu, Kubuntu, Flubuntu, Xubuntu, GEUbuntu, Edubuntu, ...:

<source>

apt-get install hwinfo

</source>

  • for Fedora, Red Hat, Red Flag, Asianux, ...:

<source>

yum install hwinfo

</source>

Run it

To print information about your hardware: <source>

# hwinfo --help
Usage: hwinfo [options]
Probe for hardware.
  --short        just a short listing
  --log logfile  write info to logfile
  --debug level  set debuglevel
  --version      show libhd version
  --dump-db n    dump hardware data base, 0: external, 1: internal
  --hw_item      probe for hw_item
  hw_item is one of:
   all, bios, block, bluetooth, braille, bridge, camera, cdrom, chipcard,
   cpu, disk, dsl, dvb, fingerprint, floppy, framebuffer, gfxcard, hub,
   ide, isapnp, isdn, joystick, keyboard, memory, modem, monitor, mouse,
   netcard, network, partition, pci, pcmcia, pcmcia-ctrl, pppoe, printer,
   scanner, scsi, smp, sound, storage-ctrl, sys, tape, tv, usb, usb-ctrl,
   vbe, wlan, zip

  Note: debug info is shown only in the log file. (If you specify a
  log file the debug level is implicitly set to a reasonable value.)

</source>

Examples

CPU

  • find out your processor type

<source>

# hwinfo --cpu --short
cpu:                                                            
                       Intel(R) Core(TM) i5-8250U CPU @ 1.60GHz, 1800 MHz

</source>

Note
If you want to know what your CPU is doing, use the command top.

network

  • find out what eth0, eth1 and the like stands for

<source>

# hwinfo --netcard --short
network:
  eth0                 Intel 82562V-2 10/100 Network Connection
  eth1                 D-Link DGE-528T Gigabit Ethernet Adapter
  wlan0                Ralink 802.11 bg WLAN

</source>

  • find out drivers for your network cards:

<source>

# hwinfo --netcard | grep -Ei "model\:|driver\:"
 Model: "Broadcom NetXtreme BCM5764M Gigabit Ethernet PCIe"
 Driver: "tg3"
 Model: "Intel Wireless WiFi Link 5100"
 Driver: "iwlwifi"

</source>

Note
If you want to know what data is being transmitted over your network, use iptraf and tcpdump.

storage

  • find out your hdd controllers

<source>

hwinfo --storage --short
storage:
                       Floppy disk controller
                       Intel 82801I (ICH9 Family) 2 port SATA IDE Controller
                       Intel 82801IR/IO/IH (ICH9R/DO/DH) 4 port SATA IDE Controller

</source>

  • find out your harddisks and partitions

<source>

hwinfo --block --short
disk:
  /dev/sdb             WDC WD3200AAKS-7
  /dev/sda             SAMSUNG HD103UJ
partition:
  /dev/sdb1            Partition
  /dev/sdb2            Partition
  /dev/sda1            Partition
cdrom:
  /dev/sr1             TSSTcorp DVD+-RW TS-H653B
  /dev/sr0             HL-DT-ST DVD-ROM GDRH20N

</source>

Note
If you want more info on your partitions, you may want to call fdisk.

See also