Get computer info from Terminal

Linux has several tools to get computer information from Terminal, including over SSH.

USB device lists are available to detect newly plugged or existing devices.

General computer info is obtained by:

dmidecode

dmidecode gives useful computer information from the Linux terminal, including over SSH. dmidecode can help in remote asset tracking and verification of Linux computers.

-t
selects type of dmidecode info. See man dmidecode for more categories 0-255.
  • Motherboard model # and serial #: dmidecode -t 2
  • BIOS version: dmidecode -t 0
  • CPU capabilities: dmidecode -t 4
  • CPU cache memory: dmidecode -t 7
  • RAM capability (maximum RAM): dmidecode -t 16
  • RAM installed: dmidecode -t 17

To determine CPU speed on Linux use powertop and tab over to frequency stats to see percent of time overall CPU and each core is in a particular speed and state. Getting point measurements isn’t as useful to me as modern CPUs are constantly switching state.

For BSD, get reports of CPU temperature and current speed with

systemctl dev.cpu

Storage info is revealed by

lsblk

lsblk gives a tree view of connected storage, including: hard drives, SD cards, DVD/CD, USB drives, etc. This includes drives that are not mounted. Use lsblk when writing an SD card to setup a Raspberry Pi for example.

On BSD,

camcontrol devlist

gives hard drive device names like lsblk on Linux. /dev/ada0 is a common BSD HDD name.

To control HDD spindown time,

ataidle -I 30 /dev/ada0

-I 30 sets spindown time (after HDD unused this many minutes, spindown, here 30 minutes)

Shows basic status for WiFi:

iwconfig

iw dev wlan0 station dump

gives more advanced information. wlan0 is the Wifi card interface name Typically, wireless cards including WiFi are on the PCI bus. Unless of course you have a USB WiFi adapter. The wireless/WiFi chipsets can typically be identified by

lspci | grep -i wireless