Linux has a kernel, there is a desktop manager, a desktop environment, a distribution, and a whole bunch of other stuff. All these things and other things have version numbers and similar information associated with them. If you are a casual user, you probably don’t know the exact version of any or all of these things you are running at any one moment in time. Then, suddenly, you find out that “Version this-or-that of this thing-or-another is out, have you tried it?” or “The whatchamacalit version of the thingimijob is broken, if you have that upgrade or you will all die!!!” or similar. So then, you want to know what version you are running.
Here are a few ways to find out that information.
In KDE, go to the command line and run the command
That will pop up a box with all sorts of information about what you are running, and about hardware, and all sorts of other things. The current version of kinfocenter has the most annoying tool tips on the planet, but otherwise, is useful.
There is a similar thing in Gnome. Go to the standard toolbar on the top and open up the thingie by that looks like an off on switch or audio level adjuster. That will open a spooky looking box that includes the actual audio volume control, an actual on switch, some other stuff, and a toolbox icon. Open the toolbox icon, and in there, click on about. You won’t get as much info as KDE gives you, but you’ll have the desktop name, version, your computer name, and some basic hardware information.
A lot of information is stored inside variables and system files on your computer. There are therefore a large number of different command line ways to access this information. Here are some examples:
I’m running a current version of KDE, so I get this answer:
greg@cj:~$ echo $DESKTOP_SESSION
The type of window manager is stored in the name of a file in a system directory, and you can get that like this:
greg@cj:~$ ls /usr/bin/*session
There is a command called “env” which invokes a long readout of way more information than you will ever want. But you can grep it. For example:
greg@cj:~$ env | grep DESKTOP
This is a command that prints out various system information data about the kernel, the machine, the processor, etc. With no options, or just the -s option, it prints out the kernel name, like this:
greg@cj:~$ uname -s
But you can get much much more
greg@cj:~$ uname -srm
Linux 4.15.0-42-generic x86_64
To see all the options, run “man uname” to see the man page.
The Linux command “cat” prints out a file. There are a few cat tricks you can use.
greg@cj:~$ cat /etc/os-release
VERSION="18.04.1 LTS (Bionic Beaver)"
PRETTY_NAME="Ubuntu 18.04.1 LTS"
greg@cj:~$ cat /etc/issue
Ubuntu 18.04.1 LTS \n \l
There is a command to print out distribution specific information, with the handy -a switch to dump it all to the screen.
greg@cj:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.1 LTS
And finally, the command hostnamectl, which allows you to change the hostname (don’t do this if you don’t know what it is) or get information about the hose.
Static hostname: cj
Icon name: computer-desktop
Machine ID: c9c8b3b223c34d14ae7fcabfbf1f2c1c1ba
Boot ID: 6dba797cc332bbababb58c7373dba9797c
Operating System: Ubuntu 18.04.1 LTS
Kernel: Linux 4.15.0-42-generic
So, now you know how to find out a whole bunch of information you almost never really need, but when you do …