What
command I need to type to display Linux kernel version and other
information such as Linux distribution name? How do I check Linux kernel
version number?
You need to use the following two commands:[a] uname - Print kernel and system information.
[b] lsb_release - Print distribution-specific information.[c] /proc/version file - Print running kernel information.
Sample outputs:
Sample outputs:
Sample outputs:
Sample outputs:
Sample outputs:
OR
Sample outputs:
Video 01: Find The Linux Kernel Version Command Tutorial
Tweet itFacebook itG+ itDownload PDF versionFound an error/typo on this page?
You need to use the following two commands:[a] uname - Print kernel and system information.
Tutorial details | |
---|---|
Difficulty | Easy (rss) |
Root privileges | No |
Requirements | None |
Estimated completion time | 1m |
[b] lsb_release - Print distribution-specific information.[c] /proc/version file - Print running kernel information.
How to check linux kernel version number?
Open a shell prompt (or a terminal) and type the following command to see your current Linux kernel version:$ uname -r
Sample outputs:
2.6.32-23-generic-paeOr type the following command:
$ uname -mrs
Sample outputs:
Linux 2.6.32-23-generic-pae i686To print all information, enter:
$ uname -a
Sample outputs:
Linux vivek-laptop 2.6.32-23-generic-pae #37-Ubuntu SMP Fri Jun 11 09:26:55 UTC 2010 i686 GNU/LinuxWhere,
- 2.6.32-23 - Linux kernel version number
- pae - pae kernel type indicate that I'm accssing more than 4GB ram using 32 bit kernel.
- SMP - Kernel that supports multi core and multiple cpus.
/proc/version file
Type the following command to see Linux version info:$ cat /proc/version
Sample outputs:
Linux version 3.2.0-0.bpo.1-amd64 (Debian 3.2.4-1~bpo60+1) (ben@decadent.org.uk) (gcc version 4.4.5 (Debian 4.4.5-8) ) #1 SMP Sat Feb 11 08:41:32 UTC 2012The above output identifies the kernel version that is currently running. It includes the contents of /proc/sys/kernel/ostype, /proc/sys/kernel/osrelease, and /proc/sys/kernel/version files. For example:
$ cat /proc/sys/kernel/{ostype,osrelease,version}
Sample outputs:
Linux 3.2.0-0.bpo.1-amd64 #1 SMP Sat Feb 11 08:41:32 UTC 2012
Find Distribution Version
Type the following command:$ cat /etc/*release
OR
$ lsb_release -a
Sample outputs:
No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 10.04 LTS Release: 10.04 Codename: lucidHere is another output from my Debian based server:
lsb_release -a No LSB modules are available. Distributor ID: Debian Description: Debian GNU/Linux 6.0.6 (squeeze) Release: 6.0.6 Codename: squeeze
Related media
This tutorial is also available in a quick video format:Video 01: Find The Linux Kernel Version Command Tutorial
Featured Articles:
- 30 Cool Open Source Software I Discovered in 2013
- 30 Handy Bash Shell Aliases For Linux / Unix / Mac OS X
- Top 30 Nmap Command Examples For Sys/Network Admins
- 25 PHP Security Best Practices For Sys Admins
- 20 Linux System Monitoring Tools Every SysAdmin Should Know
- 20 Linux Server Hardening Security Tips
- Linux: 20 Iptables Examples For New SysAdmins
- Top 20 OpenSSH Server Best Security Practices
- Top 20 Nginx WebServer Best Security Practices
- 20 Examples: Make Sure Unix / Linux Configuration Files Are Free From Syntax Errors
- 15 Greatest Open Source Terminal Applications Of 2012
- My 10 UNIX Command Line Mistakes
- Top 10 Open Source Web-Based Project Management Software
- Top 5 Email Client For Linux, Mac OS X, and Windows Users
- The Novice Guide To Buying A Linux Laptop
Linux pd13027a.symphonyteleca.com 2.6.32-71.el6.x86_64 #1 SMP Wed Sep 1 01:33:01 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux
$ cat /etc/issue
output: Red Hat Enterprise Linux Server release x.x
While we’re at it, what should I do with my life? I know, lazy… ;-)
how to find OS name with service pack in suse linux.. can you please give the command..
Regards
R.Muthukumar
To determine it is SuSE:
cat /proc/version
To check SuSE version:
cat /etc/SuSE-release
SUSE LINUX Enterprise Server 9 (i586)
VERSION = 9
for e.p.– redhat 4.4 , redhat 5.4, redhat 5.9
cat * | wc -l
grep Linux | wc -l
cat * | head | grep Linux