Find out exactly what devices are inside your Linux computer or connected to it. We’ll cover 12 commands for listing your connected devices.
Why 12 Commands?
However many ways there are to skin a cat, I’d be willing to bet that there are more ways to list the devices that are connected to, or housed inside of, your Linux computer. We’re going to show you 12 of them. And that’s not all of them!
Inevitably, there’s a lot of overlap in the information that you can get out of these commands, so why bother describing this many of them?
Well, for one thing, the variations in content and detail make them sufficiently different that some people will prefer one method over another. The output format of one command might lend itself particularly well to a specific use case. The format of another command might be ideally suited to its being piped through grep
, or another method of further processing.
Primarily though, it is to make the article as general as possible. Rather than decide which commands are going to be of interest or use to our readership, we’d rather provide a broad sample of the commands that are available and have our readers choose which ones they will use and which ones they will leave untouched.
Some Installation Required
Most of these commands are included within your Linux distribution by default. Ubuntu, Fedora, and Manjaro were used as a representative sample of distributions from the main branches of the Debian, Red Hat and Arch families.
All three distributions needed to install procinfo
, which provides the lsdev
command. The lsscsi
command also needed to be installed on all three.
To install lsdev
and lsscsi
, use these commands.
Ubuntu:
sudo apt-get install procinf
sudo apt-get install lsscsi
Read the remaining 112 paragraphs
Source : How to List Your Computer’s Devices From the Linux Terminal