In Unix/Linux, you can use the uname
command to find the operating system release and version number. Here’s how to do it:
- Open a terminal window.
- Type the following command and press Enter:
uname -a
This will display a long list of system information, including the operating system release and version number.
- Look for the operating system release and version number in the output. The output will typically look something like this:
Linux myserver 4.15.0-143-generic #147-Ubuntu SMP Wed Apr 14 16:10:11 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
In this example, the operating system release is “Ubuntu” and the version number is “4.15.0-143-generic”.
Alternatively, you can use the cat
command to view the contents of the /etc/*-release
file, which contains information about the operating system release and version. For example, to view the contents of the /etc/os-release
file, you can use the following command:
cat /etc/os-release
This will display the contents of the file, which typically includes information about the operating system release and version number.