What is the version of my debian system?
Solution 1:
Simply run "lsb_release -a" from the command line or "cat /etc/lsb-release"
Solution 2:
If you know that you are on a Debian or derivative, check the file /etc/debian_version
. This will have the version number of the currently installed system.
If you want something more generic, look at (particularly) the PRETTY_NAME
, NAME
, VERSION
and VERSION_ID
values in /etc/os-release
. This file is actually a shell script that you can source into your own scripts, to do things differently on different distributions.
On "true" Debian, both of the above are provided by the base-files
package. Derivatives may be different.
Again if you know you are on a Debian system, you can also check the output of apt-cache show base-files
to see which version of the base-files
package is installed. This also might not work on Debian derivatives.
If you want to know the version of the kernel that is currently running, you can use uname
for that. For example, uname -a
to print all information, or uname -rv
to print the specific kernel version with little extra information. In many cases, you should not need to do this, as what you do should not depend on the specific kernel version installed.