The "Ubuntu Version Checker" is a Bash script designed to quickly and reliably determine the version of the Ubuntu operating system installed on a Linux system.
This script is particularly useful for system administrators, developers, and users who need to identify the precise Ubuntu release running on their system.
Download the check_ubuntu_version.sh scriot from here:
Make the script executable by running:
chmod +x ./check_ubuntu_version.sh
- Launch it with:
The script will promptly display the Ubuntu OS name, version/release, and codename, making it easy to identify the specific Ubuntu distribution installed.
The script first checks for the presence of the lsb_release command, a standard utility for obtaining distribution information. If lsb_release is available, it uses this tool to extract the Ubuntu version and codename. If not, it falls back to an alternative method.
The script provides a comprehensive and informative output. It not only displays the OS name, version/release, and codename but also separates each piece of information for clarity.
In the absence of lsb_release, the script reads information from the /etc/os-release file, a widely supported method for retrieving OS details on Linux systems. This ensures compatibility across various Linux distributions.
System administrators can use this script to quickly identify the Ubuntu version on multiple servers, aiding in maintenance and troubleshooting tasks.
Developers and software maintainers can use this script to verify the Ubuntu version on which their software is running to ensure compatibility.
Regular Ubuntu users can run this script to learn more about their system and its release details.
In summary, the "Ubuntu Version Checker" script simplifies the process of determining the Ubuntu version and provides detailed information in a structured format, improving system management and user awareness.