You can use the lsb_release
command to find out which version of Linux you have from the command line. Here’s how:
- Open a terminal window on your Linux system.
- Type the following command and press Enter:
lsb_release -a
This command will display detailed information about your Linux distribution, including the version number.
Alternatively, you can use the following command to display just the version number:
lsb_release -r | awk '{print $2}'
This will display the version number only, without any additional information. Note that if the lsb_release
command is not installed on your system, you can install it using your package manager. For example, on Ubuntu and other Debian-based systems, you can install lsb_release
using the following command:
sudo apt-get install lsb-release
On Red Hat-based systems, you can install lsb_release
using the following command:
sudo yum install redhat-lsb-core
These commands require administrative privileges, so you’ll need to enter your password when prompted.