17

While troubleshooting a problem with my ethernet card, I've found that the driver I'm currently using may have some issues with old kernel versions. What command can I use to check the kernel version I am currently running ?

13

You can execute:

uname -r

It will display something like

3.13.0-62-generic

Found on https://askubuntu.com/questions/359574/how-do-i-find-out-the-kernel-version-i-am-running (view that QA to learn other commands you could use)

| improve this answer | |
3

For Ubuntu

enter the command

# uname -r

will Print the kernel name

# uname -a 

Will Print all Information

or else we can check with cat /proc/version

For Redhat and centos

# cat /etc/redhat-release

# lsb_release –a
| improve this answer | |
2
dmesg | grep Linux

This command reads boot logs as it startup.

Output:

[ 0.000000] Linux version 4.9.0-8-amd64 (debian-kernel@lists.debian.org) (gcc version 6.3.0 20170516 (Debian 6.3.0-18+deb9u1) ) #1 SMP Debian 4.9.110-3+deb9u4 (2018-08-21)

| improve this answer | |
1

uname -r for exact version of the kernel or uname -a for information in the kernel AND information about your distro.

| improve this answer | |
1
uname -rv

gives both, revision and version. This works on all UNIX platforms since ~1982, except for AIX (Alien UNIX ;-) because IBM implemented AIX after reading the man pages and confused -r with -v and vice versa ;-)

| improve this answer | |
1

/etc/redhat-release gives only current version

Red Hat Enterprise Linux Server release 7.2 (Maipo)

To get kernel details in Redhat use /proc/version.

cat /proc/version

Linux version 3.10.0-327.el7.x86_64 (mockbuild@x86-034.build.eng.bos.redhat.com) (gcc version 4.8.3 20140911 (Red Hat 4.8.3-9) (GCC) ) #1 SMP Thu Oct 29 17:29:29 EDT 2015

OR

uname -a

Linux 3.10.0-327.el7.x86_64 #1 SMP Thu Oct 29 17:29:29 EDT 2015 x86_64 x86_64 x86_64 GNU/Linux

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.