How it works...

After running the cat /etc/*-release command, press Enter and you will get the output according to your Linux distribution. In my case, the output is as follows:

DISTRIB_ID=UbuntuDISTRIB_RELEASE=16.04DISTRIB_CODENAME=xenialDISTRIB_DESCRIPTION="Ubuntu 16.04.4 LTS"NAME="Ubuntu"VERSION="16.04.4 LTS (Xenial Xerus)"ID=ubuntuID_LIKE=DebianPRETTY_NAME="Ubuntu 16.04.4 LTS"VERSION_ID="16.04"HOME_URL="http://www.ubuntu.com/"SUPPORT_URL="http://help.ubuntu.com/"BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"VERSION_CODENAME=xenialUBUNTU_CODENAME=xenial

There is an alternate way to get system information. You can get the system information by running a version file from the /proc directory. After running the command, press Enter, and ...

Get Bash Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.