Home Article Using hwinfo Command on aRaspberry Pi

Using hwinfo Command on aRaspberry Pi

by shedboy71

hwinfo is a command line tool that can be used to get details about various hardware components on a system. It provides information about CPU, RAM, disks, network interfaces, USB controllers, etc.

hwinfo was developed for openSUSE but lately was adapted for other Linux distributions such as Ubuntu, Debian, etc.

This tutorial demonstrates how to install hwinfo on Raspberry Pi.

Use SSH to connect to Raspberry Pi. Then run these commands to update the package lists and install hwinfo:

sudo apt update
sudo apt install -y hwinfo

Once the installation is complete, you can check version of the hwinfo with command:

hwinfo --version

Now run the hwinfo command without any arguments to get detailed information about all hardware components:


The same result is provided with –all option as well:

hwinfo --all

Use –short option to get brief information about the hardware components:

hwinfo --short

To get the help about the hwinfo command execute the command given below:

hwinfo --help


Usage: hwinfo [OPTIONS]
Probe for hardware.
        This option can be given more than once. Probe for a particular
        HARDWARE_ITEM. Available hardware items are:
        all, arch, bios, block, bluetooth, braille, bridge, camera,
        cdrom, chipcard, cpu, disk, dsl, dvb, fingerprint, floppy,
        framebuffer, gfxcard, hub, ide, isapnp, isdn, joystick, keyboard,
        memory, mmc-ctrl, modem, monitor, mouse, netcard, network, partition,
        pci, pcmcia, pcmcia-ctrl, pppoe, printer, redasd,
        reallyall, scanner, scsi, smp, sound, storage-ctrl, sys, tape,
        tv, uml, usb, usb-ctrl, vbe, wlan, xen, zip
        Show only a summary. Use this option in addition to a hardware
        probing option.
        Normally hwinfo does not report RAID devices. Add this option to
        see them.
    --only DEVNAME
        This option can be given more than once. If you add this option
        only entries in the device list matching DEVNAME will be shown.
        Note that you also have to specify --<HARDWARE_ITEM> to trigger
        any device probing.
    --save-config SPEC
        Store config for a particular device below /var/lib/hardware.
        SPEC can be a device name, an UDI, or 'all'. This option must be
        given in addition to a hardware probing option.
    --show-config UDI
        Show saved config data for a particular device.
        If disk names have changed (e.g. after a kernel update) this
        prints a list of disk name mappings. Note that you must have
        used --save-config at some point before for this can work.
    --debug N
        Set debug level to N. The 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 (N is a bitmask of individual flags).
        Increase verbosity. Only together with --map.
    --log FILE
        Write log info to FILE.
        Don't forget to also specify --<HARDWARE_ITEM> to trigger any
        device probing.
    --dump-db N
        Dump hardware data base. N is either 0 for the external data
        base in /var/lib/hardware, or 1 for the internal data base.
        Print libhd version.
        Print usage.


Save Information into File

You can save all the information into a file that you displayed by executing the command given below:

hwinfo --all --log hardwareinfo.txt

You may also like

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More