|
|
TN0006: How to find out relevant versioning information on your Linux system This technical note explains how to find out the name of your Distribution, the kernel version, the glibc version, the XFree86 version, and the gcc compiler version. Kernel version This is, what the command uname is for. Type in uname -s -r, and you have it:
ck@marvin:~ > uname --help
Usage: uname [OPTION]...
Print certain system information. With no OPTION, same as -s.
-a, --all print all information
-m, --machine print the machine (hardware) type
-n, --nodename print the machine's network node hostname
-r, --release print the operating system release
-s, --sysname print the operating system name
-p, --processor print the host processor type
-v print the operating system version
--help display this help and exit
--version output version information and exit
Report bugs to <bug-sh-utils@gnu.org>.
ck@marvin:~ > uname -s -r
Linux 2.4.4-4GB
ck@marvin:~ >
GCC version Use the --version option: ck@marvin:~ > gcc --version 2.95.3 ck@marvin:~ > GLIBC version Call the library as a program:
ck@marvin:~ > /lib/libc.so.6
GNU C Library stable release version 2.2.2, by Roland McGrath et al.
Copyright (C) 1992-1999, 2000, 2001 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
Compiled by GNU CC version 2.95.3 20010315 (SuSE).
Compiled on a Linux 2.4.3 system on 2001-05-11.
Available extensions:
GNU libio by Per Bothner
crypt add-on version 2.1 by Michael Glad and others
Berkeley DB glibc 2.1 compat library by Thorsten Kukuk
linuxthreads-0.9 by Xavier Leroy
NoVersion patch for broken glibc 2.0 binaries
BIND-8.2.3-T5B
libthread_db work sponsored by Alpha Processor Inc
NIS(YP)/NIS+ NSS modules 0.19 by Thorsten Kukuk
Report bugs using the `glibcbug' script to
X Windows version Call the X server with the '-version' option:
ck@marvin:~ > XFree86 -version
XFree86 Version 4.0.3 / X Window System
(protocol Version 11, revision 0, vendor release 6400)
Release Date: 16 March 2001
If the server is older than 6-12 months, or if your card is
newer than the above date, look for a newer version before
reporting problems. (See http://www.XFree86.Org/FAQ)
Operating System: SuSE Linux [ELF] SuSE
Module Loader present
ck@marvin:~ >
If you want to determine the version of an already running XServer, and
you have an XFree system available, you can use the xdpyinfo command that
comes with XFree. This here is the output I get on a current (as of
November 2002) cygwin system:
$ xdpyinfo
name of display: localhost:0.0
version number: 11.0
vendor string: The XFree86 Project, Inc
vendor release number: 40200000
XFree86 version: 4.2.0
maximum request size: 4194300 bytes
motion buffer size: 256
bitmap unit, bit order, padding: 32, LSBFirst, 32
image byte order: LSBFirst
number of supported pixmap formats: 7
supported pixmap formats:
depth 1, bits_per_pixel 1, scanline_pad 32
depth 4, bits_per_pixel 8, scanline_pad 32
depth 8, bits_per_pixel 8, scanline_pad 32
depth 15, bits_per_pixel 16, scanline_pad 32
depth 16, bits_per_pixel 16, scanline_pad 32
depth 24, bits_per_pixel 32, scanline_pad 32
depth 32, bits_per_pixel 32, scanline_pad 32
keycode range: minimum 8, maximum 255
focus: PointerRoot
number of extensions: 21
BIG-REQUESTS
DEC-XTRAP
DOUBLE-BUFFER
Extended-Visual-Information
FontCache
GLX
LBX
MIT-SUNDRY-NONSTANDARD
RECORD
RENDER
SECURITY
SGI-GLX
SHAPE
SYNC
TOG-CUP
XC-APPGROUP
XC-MISC
XFree86-Bigfont
XKEYBOARD
XTEST
XVideo
default screen number: 0
number of screens: 1
screen #0:
dimensions: 1018x706 pixels (345x239 millimeters)
resolution: 75x75 dots per inch
depths (7): 24, 1, 4, 8, 15, 16, 32
root window id: 0x36
depth of root window: 24 planes
number of colormaps: minimum 1, maximum 1
default colormap: 0x20
default number of colormap cells: 256
preallocated pixels: black 0, white 16777215
options: backing-store NO, save-unders NO
largest cursor: 1018x706
current input event mask: 0xd0001d
KeyPressMask ButtonPressMask ButtonReleaseMask
EnterWindowMask SubstructureRedirectMask PropertyChangeMask
ColormapChangeMask
number of visuals: 2
default visual id: 0x22
visual:
visual id: 0x22
class: TrueColor
depth: 24 planes
available colormap entries: 256 per subfield
red, green, blue masks: 0xff0000, 0xff00, 0xff
significant bits in color specification: 8 bits
visual:
visual id: 0x23
class: TrueColor
depth: 24 planes
available colormap entries: 256 per subfield
red, green, blue masks: 0xff0000, 0xff00, 0xff
significant bits in color specification: 8 bits
ck@MAGRATHEA ~
$
Distribution Name and Version This is usually stated when you login. If you are already logged in, try telnet localhost: ck@marvin:~ > telnet marvin Trying xxx.xxx.xxx.xxx... Connected to marvin. Escape character is '^]'. Welcome to SuSE Linux 7.2 (i386) - Kernel 2.4.4-4GB (1). marvin login: ck Password: Last login: Wed Aug 22 18:38:19 from localhost Have a lot of fun... ck@marvin:~ > Other approaches Henning Sprang observed that SuSE distributions write information about themselves into the file /etc/SuSE-release, and that Debian GNU/Linux systems have this information available in /etc/debian_version. On some systems you can use the dmesg command to show the messages that were written to the screen during bootup. As these messages are stored in a ring buffer, this only works when there were not too many kernel messages after the boot occurred. So you might be out of luck if your system has been up for a longer time. On SuSE systems this will generally give you enough information to determine the distribution and the kernel version. Putting it all together So this computer is running SuSE Linux 7.2(i386) with a Kernel 2.4.4-4GB, GCC 2.95.3, and GLIBC 2.2.2. Standard configurations Standard out-of-the box installations of popular distributions contain the following combinations:
Document History First Version: August 22, 2001 Second Version: March 28, 2000: Added X-Server version recognition Third Version: July 30, 2002: Added information provided by Henning Sprang Fourth Version: August 01, 2002: Improved the paragraph about dmesg (thanks again to Henning Sprang) Fifth Version: November 05, 2002: Added xdpyinfo Questions? If you have any questions, please send e-mail to Carsten Kuckuk at . | ||||||||||||||||||||||