Udgivet i

lshw – Hardware Info

Hardware Lister er et konsol program som udtrækker fyldig information om din hvilke komponenter din computer består af.

Ubuntu installation

Ubuntu har programmet installeret som standard

sudo lshw

Det giver en masse info rullende ned over skærmen. For et overblik over mulighederne

lshw --help
Hardware Lister (lshw) - unknown
usage: lshw [-format] [-options ...]
lshw -version

-version print program version (unknown)

format can be
-html output hardware tree as HTML
-xml output hardware tree as XML
-short output hardware paths
-businfo output bus information
-X use graphical interface

options can be
-class CLASS only show a certain class of hardware
-C CLASS same as '-class CLASS'
-c CLASS same as '-class CLASS'
-disable TEST disable a test (like pci, isapnp, cpuid, etc. )
-enable TEST enable a test (like pci, isapnp, cpuid, etc. )
-quiet don't display status
-sanitize sanitize output (remove sensitive information like serial numbers, etc.)
-numeric output numeric IDs (for PCI, USB, etc.)
-notime exclude volatile attributes (timestamps) from output

Et bedre overblik

sudo lshw -html > ~/sysinfo.html && firefox ~/sysinfo.html

Forklaring:

  • -html angiver at vi vil have information i html format som kan læses i web browser.
  • > fortæller systemet at de uddata programmet afgiver skal sendes et andet sted end standard som er skærmen.
  • ~/sysinfo.html angiver at data skal placeres i en fil placeret i din hjemmemappe og med det angivne navn
  • && angiver til systemet når den forrige kommando er udført uden fejl køres den kommando der er angivet bagefter.
  • firefox ~/sysinfo.html er den instruktion der åbner dit web program og viser dig filen sysinfo.html som netop er dannet i din hjemmemappe.

Manjaro installation

sudo pacman -s lshw

 

Udgivet i

lshw – Hardware Info

Hardware Lister is console app listing system information, listing hardware components etc.

Ubuntu installation

Ubuntu comes default with the application installed so this command will list your what hardware your system contains.

sudo lshw

This command provides an abundance of info printed to your console.

To get an overview of the possbilities use the --help keyword.

lshw --help
Hardware Lister (lshw) - unknown
usage: lshw [-format] [-options ...]
lshw -version

-version print program version (unknown)

format can be
-html output hardware tree as HTML
-xml output hardware tree as XML
-short output hardware paths
-businfo output bus information
-X use graphical interface

options can be
-class CLASS only show a certain class of hardware
-C CLASS same as '-class CLASS'
-c CLASS same as '-class CLASS'
-disable TEST disable a test (like pci, isapnp, cpuid, etc. )
-enable TEST enable a test (like pci, isapnp, cpuid, etc. )
-quiet don't display status
-sanitize sanitize output (remove sensitive information like serial numbers, etc.)
-numeric output numeric IDs (for PCI, USB, etc.)
-notime exclude volatile attributes (timestamps) from output

Get a better overview

sudo lshw -html > ~/sysinfo.html && firefox ~/sysinfo.html

Explanation:

  • -html tells the app we want the info as html which can be viewed in your web browser.
  • > tells the system to send the data to other destination than default which is your console.
  • ~/sysinfo.html provides the system with the destination, which in this case is a file in your homefolder.
  • && informs the system to execute a command if the first command executed without errors – in this case we want to show the content of the file.
  • firefox ~/sysinfo.html is the instruction opening the Firefox webbrowser using the sysinfo.html just generated in your homefolder.

Manjaro installation

Manjaro does not default having this app installed. This is to be done with this command:

sudo pacman -s lshw