Linux tips and tricks

Learning the Linux Command Line

What version of Linux am I running?

From a shell prompt or terminal window, run one of the following commands.

This should work on all modern versions of Linux:

lsb_release -a

For a compact description on distributions derived from Red Hat:

cat /etc/redhat-release

For a compact description on most distributions:

cat /etc/*-release

Hard Drive Information

Is it a spinning disk or SSD?

cat /sys/block/sda/queue/rotational

Result: 1 is a traditional hard drive; 0 is an SSD.

What is the model of the drive?

Two possibilities:

  • cat /proc/scsi/scsi
  • inxi -D

Check your shell (bash & sh) scripts


Article ID: 1774
Wed 5/27/20 10:57 AM
Mon 8/31/20 9:13 AM