Knowledge
How to check Ubuntu version
#Hosting
Learn how to quickly get the Ubuntu version you're running using the command line.
Published by Mark van Eijk on February 8, 2024 · 1 minute read
If you want to know which Ubuntu version your server is running, simply execute the following command using the command line:
lsb_release -a
If you want to get a more specific output, so you only get one of the lines output by the command above. You can use the following parameters, where you'll see that every line has a logical letter corresponding to the label name:
lsb_release -i # Outputs: "Distributor ID: Ubuntu"
lsb_release -d # Outputs: "Description: Ubuntu 18.04.6 LTS"
lsb_release -r # Outputs: "Release: 18.04"
lsb_release -c # Outputs: "Codename: bionic"
If you only want the value and not the label of the output, add the s
parameter to the command:
lsb_release -is # Outputs: "Ubuntu"
lsb_release -ds # Outputs: "Ubuntu 18.04.6 LTS"
lsb_release -rs # Outputs: "18.04"
lsb_release -cs # Outputs: "bionic"
Subscribe to our newsletter
Do you want to receive regular updates with fresh and exclusive content to learn more about web development, hosting, security and performance? Subscribe now!
Related articles
How to get top processes with highest memory usage
Learn how to quickly get the Ubuntu version you're running using the command line.
How to get top processes with highest CPU usage
Learn how to quickly get the Ubuntu version you're running using the command line.