You definitely need a command to check the release and version of Linux on your server. The keywords you use to find the answer are probably:
- how to check the release version of linux
- how to check the redhat release
- how to check the kernel release in redhat linux
- how to check the os release in linux
- linux release command
- linux os name and version
- check linux os name
- check linux version
- find linux version
- show linux version
- how to know linux version
There are several commands to find the release and the version:
cat /etc/issue
CentOS release 6.5 (Final)
Kernel \r on an \m
cat /etc/redhat-release
CentOS release 6.5 (Final)
cat /proc/version
uname -m
This is the command to find the CPU architecture ( 32bit or 64 bit).
Here is a script to check the release name and bit
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
check_sys(){ if [[ -f /etc/redhat-release ]]; then release="centos" elif cat /etc/issue | grep -q -E -i "debian"; then release="debian" elif cat /etc/issue | grep -q -E -i "ubuntu"; then release="ubuntu" elif cat /etc/issue | grep -q -E -i "centos|red hat|redhat"; then release="centos" elif cat /proc/version | grep -q -E -i "debian"; then release="debian" elif cat /proc/version | grep -q -E -i "ubuntu"; then release="ubuntu" elif cat /proc/version | grep -q -E -i "centos|red hat|redhat"; then release="centos" fi bit=`uname -m` } check_sys echo "Linux:$release, bit:$bit" |