Learning Center
Linux

How to Find Out My Linux Distribution Name and Version

1 Feb 2024
Hostman Team
Hostman Team

Understanding and identifying your Linux distribution name and version is fundamental for several reasons in the realm of system administration. Firstly, it provides crucial information about the underlying operating system, which is essential for troubleshooting and applying the correct configurations. Different Linux distributions may have variations in package management systems, directory structures, and default configurations, and knowing the specifics ensures accurate and effective system management.

Using the lsb_release Command
Copy link

  1. Open your terminal.

  2. Type the following command and press Enter:

lsb_release -a
  1. The output will display information about your Linux distribution, including the name and version.

Example Output:

Distributor ID: Ubuntu
Description:    Ubuntu 20.04.3 LTS
Release:          20.04
Codename:    focal

Checking the /etc/os-release file
Copy link

  1. Open your terminal.

  2. Type the following command and press Enter:

cat /etc/os-release
  1. Look for the PRETTY_NAME and VERSION_ID fields to find your distribution name and version.

PRETTY_NAME="Ubuntu 20.04.3 LTS"
VERSION_ID="20.04"

Conclusion
Copy link

That's it! You've successfully found out your Linux distribution name and version. Whether you're using the terminal or your Hostman panel, knowing your system details is crucial for effective system administration.