Difference between revisions of "Determining Your Linux Version"

From Free Knowledge Base- The DUCK Project: information for everyone
Jump to: navigation, search
m (Linux Distribution Specific)
m (System Information Tools (general))
 
(10 intermediate revisions by 2 users not shown)
Line 13: Line 13:
 
=== glibc ===
 
=== glibc ===
 
Q: how can I tell what glibc version I have?<BR>
 
Q: how can I tell what glibc version I have?<BR>
A: type '/lib/libc.so.6'
+
A: type '/lib/libc.so.6' or you may have to supply a different path, for example '/lib/x86_64-linux-gnu/libc.so.6' to find the path simply 'locate libc.so.6'
 +
 
 +
=== Bootloader ===
 +
Determine bootloader and version.  Try each until you get a hit
 +
lilo -V
 +
or
 +
grub-install --version
  
 
== Xwindows / XFree86 / and Windows Managers ==
 
== Xwindows / XFree86 / and Windows Managers ==
Line 23: Line 29:
  
 
=== GNome ===
 
=== GNome ===
 +
 +
=== Cinnamon ===
 +
From console type:
 +
  cinnamon --version
  
 
== Linux Distribution Specific ==
 
== Linux Distribution Specific ==
Line 32: Line 42:
 
* Many distributions create a 'release' text file in /etc.  Try typing 'ls -a /etc |grep -i release'
 
* Many distributions create a 'release' text file in /etc.  Try typing 'ls -a /etc |grep -i release'
 
* Or try: 'cat /etc/*release' or 'cat /etc/*version'.  Many have a file '/etc/os-release'.
 
* Or try: 'cat /etc/*release' or 'cat /etc/*version'.  Many have a file '/etc/os-release'.
 +
 +
An amazing and useful tool is inxi which is installed on mint and probably ubuntu by default. For any debian system to install type:
 +
sudo apt install inxi
 +
Useful command line switches included in this run example:
 +
inxi -Fxz
  
 
=== CentOS ===
 
=== CentOS ===
Line 48: Line 63:
 
=== Mint ===
 
=== Mint ===
 
at the shell type:  cat /etc/apt/sources.list
 
at the shell type:  cat /etc/apt/sources.list
 +
 +
inxi should be installed by default, for a pretty formatted display of system information type:
 +
inxi -Fxz
  
 
=== Redhat ===
 
=== Redhat ===
Line 56: Line 74:
  
 
=== Ubuntu ===
 
=== Ubuntu ===
at the shell type: sudo nano /etc/apt/sources.list<BR>
+
at the shell type: cat /etc/apt/sources.list<BR>
 +
or type: cat /etc/issue<BR>
 
or within the GUI, System > About Ubuntu<BR>
 
or within the GUI, System > About Ubuntu<BR>
 
or at the shell type: lsb_release -a<BR>
 
or at the shell type: lsb_release -a<BR>
 
or at the shell type: sudo cat /etc/apt/sources.list|grep Release
 
or at the shell type: sudo cat /etc/apt/sources.list|grep Release
 +
 +
== System Information Tools (general) ==
 +
=== inxi ===
 +
Instantly deduce user system configuration and hardware information.  Tool provides output of system information (similar to Micro$oft systeminfo.exe).  inxi was created by someone that wanted a way for a brief system summary for users seeking help via linux groups on IRC.
 +
sudo apt-get install inxi  [On Debian/Ubuntu/Linux Mint]
 +
sudo yum install inxi      [On CentOs/RHEL/Fedora]
 +
Example Usage:
 +
inxi -Fi
 +
inxi -Fxz
 +
 +
=== lspci ===
 +
lspci is a utility for displaying information about PCI buses in the system and devices connected to them.  Should already be on your system.  Example:
 +
lspci|grep -i vga
 +
will show your video card driver information attached video card
 +
 +
=== hostnamectl ===
 +
This is a command line utility.  Simply type"
 +
hostnamectl
 +
Sample Output:
 +
$ hostnamectl
 +
  Static hostname: nicolespc
 +
        Icon name: computer-desktop
 +
          Chassis: desktop
 +
      Machine ID: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
 +
          Boot ID: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
 +
Operating System: Linux Mint 21.1               
 +
          Kernel: Linux 5.15.0-70-generic
 +
    Architecture: x86-64
 +
  Hardware Vendor: Dell Inc.
 +
  Hardware Model: Inspiron 3847
 +
  
 
&nbsp;
 
&nbsp;

Latest revision as of 21:01, 10 September 2023

With Microsoft Windows it is easy to determine the version of the MS Windows Operating system currently installed. With Linux it is easy to determine the version of the Linux kernel you are running. However, the distribution version is determined differently depending on which distribution you are using. Also, further component version information depends on distribution and kernel.

[Krissy's Question and Answer] addresses the issue of determining installed version information briefly. Here we explore it in greater detail.

Linux Kernel

Q: how can I tell what linux kernel version I have?
A: type 'uname -s -r'

Linux Components

gcc compiler

Q: how can I tell what gcc version I have?
A: type 'gcc --version'

glibc

Q: how can I tell what glibc version I have?
A: type '/lib/libc.so.6' or you may have to supply a different path, for example '/lib/x86_64-linux-gnu/libc.so.6' to find the path simply 'locate libc.so.6'

Bootloader

Determine bootloader and version. Try each until you get a hit

lilo -V

or

grub-install --version

Xwindows / XFree86 / and Windows Managers

XFree86

Q: how can I tell what vesion of xwindows I have?
A: type 'XFree86 -version' or 'xdpyinfo'

KDE

GNome

Cinnamon

From console type:

 cinnamon --version

Linux Distribution Specific

There is no one super command to accomplish this. Instead you will need to make some observations.

  • Use 'dmesg' to see if system displayed distro during boot.
  • Check for presence of certail signature distro files,
  • You may also check the issue or issue.net file. type 'cat /etc/issue'
  • Many distributions create a 'release' text file in /etc. Try typing 'ls -a /etc |grep -i release'
  • Or try: 'cat /etc/*release' or 'cat /etc/*version'. Many have a file '/etc/os-release'.

An amazing and useful tool is inxi which is installed on mint and probably ubuntu by default. For any debian system to install type:

sudo apt install inxi

Useful command line switches included in this run example:

inxi -Fxz

CentOS

CentOS creates '/etc/centos-release'

Debian

Debian creates '/etc/debian_version'

Knoppix

With the CD in the drive (doesn't work for disk installation) type: strings /mnt/cdrom/KNOPPIX/boot.img | grep BETA
for installed knoppix, at the shell type: /etc/knoppix-version

Mandrake

at the shell type: cat /etc/mandrake-release

Mint

at the shell type: cat /etc/apt/sources.list

inxi should be installed by default, for a pretty formatted display of system information type:

inxi -Fxz

Redhat

Redhat creates '/etc/redhat-release'

SuSE

SuSE creates '/etc/SuSE-release'

Ubuntu

at the shell type: cat /etc/apt/sources.list
or type: cat /etc/issue
or within the GUI, System > About Ubuntu
or at the shell type: lsb_release -a
or at the shell type: sudo cat /etc/apt/sources.list|grep Release

System Information Tools (general)

inxi

Instantly deduce user system configuration and hardware information. Tool provides output of system information (similar to Micro$oft systeminfo.exe). inxi was created by someone that wanted a way for a brief system summary for users seeking help via linux groups on IRC.

sudo apt-get install inxi   [On Debian/Ubuntu/Linux Mint]
sudo yum install inxi       [On CentOs/RHEL/Fedora]

Example Usage:

inxi -Fi
inxi -Fxz

lspci

lspci is a utility for displaying information about PCI buses in the system and devices connected to them. Should already be on your system. Example:

lspci|grep -i vga

will show your video card driver information attached video card

hostnamectl

This is a command line utility. Simply type"

hostnamectl

Sample Output:

$ hostnamectl
 Static hostname: nicolespc
       Icon name: computer-desktop
         Chassis: desktop
      Machine ID: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
         Boot ID: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Operating System: Linux Mint 21.1                 
          Kernel: Linux 5.15.0-70-generic
    Architecture: x86-64
 Hardware Vendor: Dell Inc.
  Hardware Model: Inspiron 3847