Monday, July 28, 2008

Linux: Check Linux Version

Here are the commands which can be used to check Linux version:

$cat /proc/version
Linux version 2.6.18-128.4.1.el5 (mockbuild@hs20-bc1-7.build.redhat.com) (gcc version 4.1.2 20080704 (Red Hat 4.1.2-44)) #1 SMP Thu Jul 23 19:59:19 EDT 2009

$uname –a
Linux host.domain.net 2.6.9-78.0.1.ELsmp #1 SMP Tue Jul 22 18:11:48 EDT 2008 i686 i686 i386 GNU/Linux

Check 32 vs 64 bits

$>uname –m

i686

$>file /usr/bin/file
/usr/bin/file: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.2.5, dynamically linked (uses shared libs), stripped


No comments: