Every six months, we get a new Ubuntu release. It helps users get new features, performance improvements, and security patches. In this article, we cover how to check our Ubuntu version using the command line through various methods.
How to check our Ubuntu version using command line
Method I. Check the /etc/lsb-release file
The file contains information about our Ubuntu distribution.
- Open a terminal
- Use the cat command line utility to view the contents of lsb-release file:
cat /etc/lsb-release
And, look for DISTRIB_RELEASE.
Method II. Check the /etc/os-release file
The file apart from Ubuntu distribution information, also contains HOME_URL, SUPPORT_URL, BUG_REPORT_URL, PRIVACY_POLICY_URL data.
- Open a terminal
- Use the cat command line utility to view the contents of os-release file:
cat /etc/os-release
Look for VERSION or VERSION_ID.
Method III. Use lsb_release command
The command mainly helps us fetch LSB (Linux Standard Base) information.
- Open a terminal
- And, issue the following command in the terminal:
lsb_release -a
here, -a is used to provide all of the information that it can provide. Look for the Release entry in the standard output.
In conclusion, the command line utility described above helps us get the Ubuntu version quickly. All we have to do is: just enter any of the commands mentioned above and you will get the result in no time. The terminal helps us get the required information quickly.