Useful CLI commands that I’ve compiled in order to determine which flavor/version of Linux I’m running.
Kernel: uname -r
Distro: lsb_release -a
Prints certain system information usually related to the kernel (-a is the ALL switch).
1 |
uname -a |
Output:
1 2 |
[/dev] # uname -a Linux BACKUP01 3.4.6 #1 SMP Tue Feb 17 04:58:58 CST 2015 x86_64 unknown |
You can cat the /proc/version file:
1 |
cat /proc/version |
Output:
1 2 |
[/dev] # cat /proc/version Linux version 3.4.6 (root@NasX86Builder) (gcc version 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)) #1 SMP Tue Feb 17 04:58:58 CST 2015 |
cat the /etc/lsb-release
1 2 3 4 5 |
# cat /etc/lsb-release DISTRIB_ID=Ubuntu DISTRIB_RELEASE=9.04 DISTRIB_CODENAME=jaunty DISTRIB_DESCRIPTION="Ubuntu 9.04" |
Debian has /etc/debian_version
1 2 |
# cat /etc/debian_version 5.0.2 |
Fedora has /etc/fedora-release
1 |
# cat /etc/fedora-release |
Red Hat/CentOS has /etc/redhat-release
1 |
# cat /etc/redhat-release |
Gentoo has /etc/gentoo-release
1 2 |
# cat /etc/gentoo-release Gentoo Base System release 1.12.11.1 |
You may be able to try out cat /etc/issue
1 2 3 |
[/dev] # cat /etc/issue Welcome to TS-670(10.0.10.2), QNAP Systems, Inc. |
Latest posts by Mr-Moo (see all)
- Installing ssacli – view raid ESXI 6.5 - December 6, 2017
- Installing hpacucli on Proxmox - December 5, 2017
- Finding your node name Graylog 2.2.x - May 22, 2017