Identify Linux Distribution, Code Refer As Well As Version Info
How create you lot lay the Linux distribution, the specific code mention in addition to version number that is running on a machine?
Below are several ways.
- lsb_release
$ lsb_release -a No LSB modules are available. Distributor ID: Debian Description: Debian GNU/Linux 7.4 (wheezy) Release: 7.4 Codename: wheezy
If lsb_release is non installed past times default on your machine, install it every bit follows.
- For Fedora, Centos, in addition to Red Hat Enterprise Linux
$ sudo yum install redhat-lsb-core
- For Debian in addition to its derivatives.
$ sudo apt-get update $ sudo apt-get install lsb-release
- For Fedora, Centos, in addition to Red Hat Enterprise Linux
- Examine the distro loose file (/etc/*release).
The loose file of a distribution contains the data nosotros want. The specific loose file mention may vary past times distribution, merely the file is normally located inward the /etc directory.
$ ls /etc/*release /etc/os-release $ truthful cat /etc/os-release PRETTY_NAME="Debian GNU/Linux seven (wheezy)" NAME="Debian GNU/Linux" VERSION_ID="7" VERSION="7 (wheezy)" ID=debian ANSI_COLOR="1;31" HOME_URL="http://www.debian.org/" SUPPORT_URL="http://www.debian.org/support/" BUG_REPORT_URL="http://bugs.debian.org/"
- /etc/issue
$ truthful cat /etc/issue Fedora loose xix (Schrödinger sec Cat) Kernel \r on an \m (\l)
This method is less reliable than the commencement 2 methods. The /etc/issue file contains the text to survive displayed every bit business office of the login prompt.
The default file content varies from distro to distro. Also, the organisation administrator may bring customized the file content.
For default Debian wheezy, the file does non let on the code mention or the tike version number (the 4 inward 7.4):
$ truthful cat /etc/issue Debian GNU/Linux seven \n \l
0 Response to "Identify Linux Distribution, Code Refer As Well As Version Info"
Post a Comment