{"id":9246,"date":"2021-08-13T11:51:01","date_gmt":"2021-08-13T11:51:01","guid":{"rendered":"https:\/\/linuxways.net\/?p=9246"},"modified":"2021-08-13T11:51:01","modified_gmt":"2021-08-13T11:51:01","slug":"how-to-check-ubuntu-version-from-the-command-line","status":"publish","type":"post","link":"https:\/\/linuxways.net\/de\/ubuntu\/how-to-check-ubuntu-version-from-the-command-line\/","title":{"rendered":"How to Check Ubuntu Version from the Command Line"},"content":{"rendered":"<h2>Introduction<\/h2>\n<p>When you are using any operating system, the minimum is to know the version of the operating system you are using.<\/p>\n<p>This is also necessary to see if the program you want to install matches that version? It also helps with troubleshooting quickly.<\/p>\n<p>Below is the guide on how to check the Ubuntu version by the terminal.<\/p>\n<h2>How to check the Ubuntu Version by the terminal<\/h2>\n<p><strong>1. Check the Ubuntu version by using the lsb_release -a command <\/strong><\/p>\n<pre>$ lsb_release -a<\/pre>\n<p>Output:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1025\" height=\"148\" class=\"wp-image-9247\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/08\/word-image-247.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/08\/word-image-247.png 1025w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/08\/word-image-247-300x43.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/08\/word-image-247-768x111.png 768w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/08\/word-image-247-1020x148.png 1020w\" sizes=\"auto, (max-width: 1025px) 100vw, 1025px\" \/><\/p>\n<p>I\u2019m using Ubuntu 20.04.2 LTS.<\/p>\n<p><strong>2. Check the Ubuntu version by using the \/etc\/issue file<\/strong><\/p>\n<p>The \/etc\/issue file contains the system identifier text. Using cat command to read it:<\/p>\n<pre>$ cat \/etc\/issue<\/pre>\n<p>Output:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1025\" height=\"83\" class=\"wp-image-9248\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/08\/word-image-248.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/08\/word-image-248.png 1025w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/08\/word-image-248-300x24.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/08\/word-image-248-768x62.png 768w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/08\/word-image-248-1020x83.png 1020w\" sizes=\"auto, (max-width: 1025px) 100vw, 1025px\" \/><\/p>\n<p><strong>3. Check the Ubuntu version by using the \/etc\/os-release file<\/strong><\/p>\n<p>The \/etc\/os-release file contains data that identifies the operating system. This option only works at Ubuntu 16.04 or newer. Using cat command to read it:<\/p>\n<pre>$ cat \/etc\/os-release<\/pre>\n<p>Output:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1026\" height=\"289\" class=\"wp-image-9249\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/08\/word-image-249.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/08\/word-image-249.png 1026w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/08\/word-image-249-300x85.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/08\/word-image-249-1024x288.png 1024w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/08\/word-image-249-768x216.png 768w\" sizes=\"auto, (max-width: 1026px) 100vw, 1026px\" \/><\/p>\n<p><strong>4. Check the Ubuntu version by using the hostnamectl command<\/strong><\/p>\n<p>This option only works at Ubuntu 16.04 or newer:<\/p>\n<pre>$ hostnamectl<\/pre>\n<p>Output:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1026\" height=\"226\" class=\"wp-image-9250\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/08\/word-image-250.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/08\/word-image-250.png 1026w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/08\/word-image-250-300x66.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/08\/word-image-250-1024x226.png 1024w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/08\/word-image-250-768x169.png 768w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/08\/word-image-250-1020x226.png 1020w\" sizes=\"auto, (max-width: 1026px) 100vw, 1026px\" \/><\/p>\n<h2>Conclusion<\/h2>\n<p>You\u2019ve already gone through the details of how to check the Ubuntu Version by the terminal.<\/p>\n<p>Thanks for reading.<\/p>","protected":false},"excerpt":{"rendered":"<p>Introduction When you are using any operating system, the minimum is to know the version of the operating system you are using. This is also necessary to see&hellip;<\/p>","protected":false},"author":1,"featured_media":9285,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[479],"class_list":["post-9246","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ubuntu","tag-ubuntu-version"],"_links":{"self":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts\/9246","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/comments?post=9246"}],"version-history":[{"count":0,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts\/9246\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/media\/9285"}],"wp:attachment":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/media?parent=9246"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/categories?post=9246"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/tags?post=9246"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}