Hi, this is Sandra Henry-Stocker, author of the “Unix as a Second Language” blog on NetworkWorld. In this tip, we’re going to look at a couple commands that identify the version of Linux in use on a Linux system – the lsb_release and uname commands. The output from the lsb_release command should look something like this.
The output identifies this system as running Ubuntu 18.10 (Cosmic Cuttlefish) and indicates that the LSB core module has been installed.
The uname command provides related information, but in an entirely different format. When we run this command, we don’t see any references to Ubuntu 18.10, but we do see that we’re running the 4.18 Linux kernel and a lot of other information identifying the system – it’s running Linux, it’s a 64-bit system, the system name is “butterfly” and the release date and time in two formats – the digital year-month-day-time format and the more human-friendly format.
On some systems, you might have to install lsb_release to get that command. The uname command should be included by default on all Linux systems.
Now, let’s run these same two commands on a Fedora system:
If that lsb_release command isn’t one that’s likely to pop into your head when needed, you can easily turn it into an alias! Just don’t forget to add that alias to one of your startup files.
And, in case you’re wondering, LSB stands for “Linux Standard Base”.
That’s your 2-minute Linux tip on two commands for displaying details on your Linux release. If you liked this video, please hit the like and share buttons. For more Linux tips, be sure to follow us on Facebook, YouTube and NetworkWorld.com.