On a Linux system one sometimes needs to check on the version numbers of installed software. Here are a few quick methods for doing so, followed by a sample script indicating the sorts of responses which might be obtained.
For information on your operating system, kernel version, and processor
To interpret the output of the above command
To see your version of RedHat Linux
rpm -q redhat-release
to see your version of the linux kernel
rpm -q kernel
For information on your GNU C library version
To see your version of the glibc
To see a list of your environment variables and their values
To learn the directory containing the java executible
To see a list of all the installed rpm packages and their versions
To ask an application to give you its version number the flag -v is sometimes helpful.
Here is an edited transcript illustrating the output of some of the above commands:
$ uname -a Linux calypso.sewanee.edu 2.2.14-5.0 #1 Tue Mar 7 21:07:39 EST 2000 i686 unknown $ rpm -q redhat-release redhat-release-6.2-1 $ rpm -q kernel kernel-2.2.14-5.0 $ set AUTOBOOT=YES BASH=/bin/bash BASH_ENV=/home/parrish/.bashrc BASH_VERSION=1.14.7(1) BOOT_IMAGE=linux COLORTERM= ... (lots more) $ rpm -qa ElectricFence-2.1-3 setup-2.1.8-1 filesystem-1.3.5-1 basesystem-6.0-4 ldconfig-1.9.5-16 ImageMagick-4.2.9-3 glibc-2.1.3-159 ... redhat-release-6.2-1 ... (lots more) $ ls /lib/libc-* /lib/libc-2.1.3.so $ /lib/libc.so.6 GNU C Library stable release version 2.1.3, by Roland McGrath et al. ...blah blah blah