{"id":13868,"date":"2023-08-02T04:35:14","date_gmt":"2023-08-02T04:35:14","guid":{"rendered":"https:\/\/linuxsimply.com\/?p=13868"},"modified":"2024-04-23T06:51:18","modified_gmt":"2024-04-23T06:51:18","slug":"how-to-check-ubuntu-version-in-bash","status":"publish","type":"post","link":"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/basics\/examples\/check-ubuntu-version\/","title":{"rendered":"How to Check Ubuntu Version Using Bash Scripts? [5 Methods]"},"content":{"rendered":"<p style=\"text-align: justify;\">Checking the version of Ubuntu typically refers to determining the specific release version or codename of the Ubuntu operating system installed on a system. To check the version of Ubuntu you&#8217;re running, you can use the following command:<\/p>\n<pre><code class=\"language-bash\" data-line=\"\">lsb_release -a<\/code><\/pre>\n<p style=\"text-align: justify;\">Apart from this, there are several ways to check the Ubuntu version. They are listed below:<\/p>\n<div class=\"su-youtube su-u-responsive-media-yes\"><iframe width=\"600\" height=\"400\" src=\"https:\/\/www.youtube.com\/embed\/I6hzz1J5GOU?\" frameborder=\"0\" allowfullscreen allow=\"autoplay; encrypted-media; picture-in-picture\" title=\"\"><\/iframe><\/div>\n<div class=\"su-button-center\"><a href=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/07\/Check-Ubuntu-version-using-Bash-Scripts.zip\" class=\"su-button su-button-style-default\" style=\"color:#000000;background-color:#E8F9FF;border-color:#bac8cc;border-radius:56px\" target=\"_blank\" rel=\"noopener noreferrer\"><span style=\"color:#000000;padding:8px 26px;font-size:20px;line-height:30px;border-color:#effbff;border-radius:56px;text-shadow:0px 0px 0px #000000\"><i class=\"sui sui-download\" style=\"font-size:20px;color:#1AA1D6\"><\/i>  Download the Bash Files to Check Ubuntu Version <\/span><\/a><\/div>\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_82_2 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 eztoc-toggle-hide-by-default' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/basics\/examples\/check-ubuntu-version\/#1_Check_Ubuntu_Version_Using_%E2%80%9Clsb_release%E2%80%9D_Command\" >1. Check Ubuntu Version Using &#8220;lsb_release&#8221; Command<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/basics\/examples\/check-ubuntu-version\/#2_Check_Ubuntu_Version_Using_%E2%80%9Chostnamectl%E2%80%9D_Command\" >2. Check Ubuntu Version Using &#8220;hostnamectl&#8221; Command<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/basics\/examples\/check-ubuntu-version\/#3_Check_Ubuntu_Version_Using_%E2%80%9Cneofetch%E2%80%9D_Command\" >3. Check Ubuntu Version Using &#8220;neofetch&#8221; Command<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/basics\/examples\/check-ubuntu-version\/#4_Check_Ubuntu_Version_from_the_Issue_File\" >4. Check Ubuntu Version from the Issue File<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/basics\/examples\/check-ubuntu-version\/#5_Check_Ubuntu_Version_from_the_Os-release_File\" >5. Check Ubuntu Version from the Os-release File<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/basics\/examples\/check-ubuntu-version\/#Conclusion\" >Conclusion<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/basics\/examples\/check-ubuntu-version\/#People_Also_Ask\" >People Also Ask<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/basics\/examples\/check-ubuntu-version\/#How_do_I_check_the_Ubuntu_version_in_a_shell\" >How do I check the Ubuntu version in a shell?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/basics\/examples\/check-ubuntu-version\/#How_do_I_check_the_Linux_kernel_version\" >How do I check the Linux kernel version?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-10\" href=\"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/basics\/examples\/check-ubuntu-version\/#How_do_I_check_the_node_version_in_Ubuntu\" >How do I check the node version in Ubuntu?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-11\" href=\"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/basics\/examples\/check-ubuntu-version\/#How_do_I_check_the_WSL_version_on_Ubuntu\" >How do I check the WSL version on Ubuntu?<\/a><\/li><\/ul><\/li><\/ul><\/nav><\/div>\n<h2><span class=\"ez-toc-section\" id=\"1_Check_Ubuntu_Version_Using_%E2%80%9Clsb_release%E2%80%9D_Command\"><\/span>1. Check Ubuntu Version Using &#8220;lsb_release&#8221; Command<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p style=\"text-align: justify;\">The lsb_release is a command used to display Linux Standard Base (LSB) and distribution-specific information about the Linux distribution you are using. You can check the Bash version using the <strong>lsb_release <\/strong>command along with the release option and <code class=\"\" data-line=\"\">-a<\/code> argument:<\/p>\n<pre><code class=\"language-bash\" data-line=\"\">lsb_release -a<\/code><\/pre>\n<p style=\"text-align: justify;\"><img fetchpriority=\"high\" decoding=\"async\" class=\"aligncenter size-full wp-image-41626\" src=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/08\/lsb_release.png\" alt=\"executing lsb_release -a\" width=\"700\" height=\"184\" srcset=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/08\/lsb_release.png 700w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/08\/lsb_release-300x79.png 300w\" sizes=\"(max-width: 700px) 100vw, 700px\" \/>In the image above, running the command gives you the Ubuntu version.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"2_Check_Ubuntu_Version_Using_%E2%80%9Chostnamectl%E2%80%9D_Command\"><\/span>2. Check Ubuntu Version Using &#8220;hostnamectl&#8221; Command<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p style=\"text-align: justify;\">The hostnamectl command is a utility in Linux used for querying and changing the system hostname and related settings. It also\u00a0allows users to view and modify the hostname as well as related settings and <strong>Ubuntu versions.<\/strong><\/p>\n<pre><code class=\"language-bash\" data-line=\"\">hostnamectl<\/code><\/pre>\n<p><img decoding=\"async\" class=\"aligncenter size-full wp-image-41625\" src=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/08\/hostnamectl.png\" alt=\"executing hostnamectl\" width=\"825\" height=\"311\" srcset=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/08\/hostnamectl.png 825w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/08\/hostnamectl-300x113.png 300w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/08\/hostnamectl-768x290.png 768w\" sizes=\"(max-width: 825px) 100vw, 825px\" \/>After running the command, you can see the Ubuntu version on your computer screen.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"3_Check_Ubuntu_Version_Using_%E2%80%9Cneofetch%E2%80%9D_Command\"><\/span>3. Check Ubuntu Version Using &#8220;neofetch&#8221; Command<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p style=\"text-align: justify;\">The <strong>neofetch<\/strong> command is a simple, yet popular, command-line utility used to display system information and details about the operating system in a visually appealing way. You can use it to obtain system information including the version of your Ubuntu:<\/p>\n<pre><code class=\"language-bash\" data-line=\"\">neofetch<\/code><\/pre>\n<p style=\"text-align: justify;\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-41627\" src=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/08\/neofetch.png\" alt=\"executing neofetch command\" width=\"825\" height=\"487\" srcset=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/08\/neofetch.png 825w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/08\/neofetch-300x177.png 300w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/08\/neofetch-768x453.png 768w\" sizes=\"(max-width: 825px) 100vw, 825px\" \/><div class=\"su-note\"  style=\"border-color:#cedfe2;\"><div class=\"su-note-inner su-u-clearfix su-u-trim\" style=\"background-color:#E8F9FC;border-color:#ffffff;color:#333333;\"><strong>Note:<\/strong> By default, neofetch package may not be installed in your system. Follow <a href=\"https:\/\/linuxsimply.com\/neofetch-command-in-linux\/#Installing_the_neofetch_Command_in_Linux\" target=\"_blank\" rel=\"noopener\"><strong>this article<\/strong><\/a> to install the <strong>neofetch<\/strong> command.<\/div><\/div>\n<p style=\"text-align: justify;\">In this picture, you can see the\u00a0system information including the<strong> Ubuntu version<\/strong> is shown in a formatted, colored way.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"4_Check_Ubuntu_Version_from_the_Issue_File\"><\/span>4. Check Ubuntu Version from the Issue File<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p style=\"text-align: justify;\">In Linux, the issue file contains information about the operating system release and version. It is typically located in the<strong> \/etc\/<\/strong> <strong>directory<\/strong>. You can write a <strong>Bash script<\/strong> that will open this file and show you the version of Ubuntu.<\/p>\n<pre><code class=\"language-bash\" data-line=\"\">cat \/etc\/issue<\/code><\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-41623\" src=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/08\/cat-issue.png\" alt=\"previewing issue file\" width=\"700\" height=\"119\" srcset=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/08\/cat-issue.png 700w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/08\/cat-issue-300x51.png 300w\" sizes=\"(max-width: 700px) 100vw, 700px\" \/>As you can see in this image, after running the script, I got the Ubuntu version printed on my screen.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"5_Check_Ubuntu_Version_from_the_Os-release_File\"><\/span>5. Check Ubuntu Version from the Os-release File<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p style=\"text-align: justify;\">The <strong>\/etc\/os-release<\/strong> file in Ubuntu is a vital source of information about the operating system. It provides a variety of information about the Ubuntu distribution, such as the <strong>version, codename,<\/strong> and other crucial characteristics.<\/p>\n<pre><code class=\"language-bash\" data-line=\"\">cat \/etc\/os-release<\/code><\/pre>\n<p style=\"text-align: justify;\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-41624\" src=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/08\/cat-os-release.png\" alt=\"previewing os-release file\" width=\"825\" height=\"320\" srcset=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/08\/cat-os-release.png 825w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/08\/cat-os-release-300x116.png 300w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/08\/cat-os-release-768x298.png 768w\" sizes=\"(max-width: 825px) 100vw, 825px\" \/>Here you can see that running the Bash script printed information of the <strong>os-release file<\/strong>, including the Ubuntu version.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Conclusion\"><\/span>Conclusion<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p style=\"text-align: justify;\">Knowing the <strong>Ubuntu version<\/strong> is an easy task, no matter what process you follow. But checking the version using <strong>Bash scripting <\/strong>is easier because, even if the <strong>version updates<\/strong>, you just have to run a script to check the most recent version. You can do it with just one command in seconds using a bash script. Feel free to let me know if you have further queries on this topic.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"People_Also_Ask\"><\/span>People Also Ask<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<h3 style=\"text-align: justify;\"><span class=\"ez-toc-section\" id=\"How_do_I_check_the_Ubuntu_version_in_a_shell\"><\/span>How do I check the Ubuntu version in a shell?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p style=\"text-align: justify;\">To check the Ubuntu version in the shell you can use the <strong>command line interface<\/strong>, and type any of these commands <code class=\"\" data-line=\"\">lsb_release -a<\/code>, <code class=\"\" data-line=\"\">cat etc\/os-release<\/code><strong>,<\/strong> or <code class=\"\" data-line=\"\">cat \/etc\/issue<\/code>.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"How_do_I_check_the_Linux_kernel_version\"><\/span>How do I check the Linux kernel version?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p style=\"text-align: justify;\">You can use the command <code class=\"\" data-line=\"\">uname -r<\/code> to check the Linux Kernel version that you are using. It will show users the version of Linux kernel as well as some additional information.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"How_do_I_check_the_node_version_in_Ubuntu\"><\/span>How do I check the node version in Ubuntu?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p style=\"text-align: justify;\">If you want to know the node version in Ubuntu, you must have installed the <b>node js<\/b>\u00a0in your system. To install it, run the command <code class=\"\" data-line=\"\">sudo apt install nodejs<\/code>, and then run the command <code class=\"\" data-line=\"\">node -v<\/code>.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"How_do_I_check_the_WSL_version_on_Ubuntu\"><\/span>How do I check the WSL version on Ubuntu?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p style=\"text-align: justify;\">To check the <strong>WSL version<\/strong>, open the <strong>PowerShell<\/strong> or <strong>Windows Command Prompt<\/strong>. Then enter the command <code class=\"\" data-line=\"\">wsl -l -v<\/code> and this will display the WSL version in Ubuntu.<\/p>\n<p><span style=\"font-size: 18pt; color: #003366;\"><strong>Related Articles<\/strong><\/span><\/p>\n<ul>\n<li><strong><a class=\"in-cell-link\" href=\"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/basics\/examples\/get-date\/\" target=\"_blank\" rel=\"noopener\">How to Get Date in Bash [2 Methods with Examples]<\/a><\/strong><\/li>\n<li><strong><a class=\"in-cell-link\" href=\"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/basics\/examples\/print-time\/\" target=\"_blank\" rel=\"noopener\">How to Print Time in Bash [2 Quick Methods]<\/a><\/strong><\/li>\n<li><strong><a class=\"in-cell-link\" href=\"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/basics\/examples\/list-users\/\" target=\"_blank\" rel=\"noopener\">How to List Users in Bash [2 Easy Ways]<\/a><\/strong><\/li>\n<li><strong><a class=\"in-cell-link\" href=\"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/basics\/examples\/current-time\/\" target=\"_blank\" rel=\"noopener\">How to Get Current Time in Bash [4 Practical Cases]<\/a><\/strong><\/li>\n<li><strong><a class=\"in-cell-link\" href=\"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/basics\/examples\/date-format\/\" target=\"_blank\" rel=\"noopener\">How to Use Date Format in Bash [5 Examples]<\/a><\/strong><\/li>\n<li><strong><a class=\"in-cell-link\" href=\"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/basics\/examples\/get-timestamp\/\" target=\"_blank\" rel=\"noopener\">How to Get Timestamp in Bash [2 Practical Cases]<\/a><\/strong><\/li>\n<li><strong><a class=\"in-cell-link\" href=\"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/basics\/examples\/copy-paste\/\" target=\"_blank\" rel=\"noopener\">How to Copy and Paste in Bash [2 Methods &amp; Cases]<\/a><\/strong><\/li>\n<li><strong><a class=\"in-cell-link\" href=\"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/basics\/examples\/read-password\/\" target=\"_blank\" rel=\"noopener\">How to Read Password in Bash [3 Practical Cases]<\/a><\/strong><\/li>\n<li><strong><a class=\"in-cell-link\" href=\"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/basics\/examples\/send-email\/\" target=\"_blank\" rel=\"noopener\">How to Send Email in Bash [2 Easy Methods]<\/a><\/strong><\/li>\n<li><strong><a class=\"in-cell-link\" href=\"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/basics\/examples\/send-email-with-attachment\/\" target=\"_blank\" rel=\"noopener\">Bash Script to Send Email with Attachment [Step-by-Step Guide]<\/a><\/strong><\/li>\n<li><strong><a class=\"in-cell-link\" href=\"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/basics\/examples\/get-ip-address\/\" target=\"_blank\" rel=\"noopener\">How to Get IP Address in Bash [3 Methods]<\/a><\/strong><\/li>\n<li><strong><a class=\"in-cell-link\" href=\"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/basics\/examples\/find-and-replace\/\" target=\"_blank\" rel=\"noopener\">How to Find and Replace String in Bash [5 Methods]<\/a><\/strong><\/li>\n<li><strong><a class=\"in-cell-link\" href=\"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/basics\/examples\/get-script-name\/\" target=\"_blank\" rel=\"noopener\">How to Get Script Name Using Bash Script? [3 Easy Ways]<\/a><\/strong><\/li>\n<li><strong><a class=\"in-cell-link\" href=\"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/basics\/examples\/call-another-script\/\" target=\"_blank\" rel=\"noopener\">How to Call Another Script in Bash [2 Methods]<\/a><\/strong><\/li>\n<li><strong><a class=\"in-cell-link\" href=\"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/basics\/examples\/generate-uuid\/\" target=\"_blank\" rel=\"noopener\">How to Generate UUID in Bash [3 Simple Methods]<\/a><\/strong><\/li>\n<li><strong><a class=\"in-cell-link\" href=\"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/basics\/examples\/write-to-file\/\" target=\"_blank\" rel=\"noopener\">3 Easy Ways to Write to a File in Bash Script<\/a><\/strong><\/li>\n<li><strong><a class=\"in-cell-link\" href=\"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/basics\/examples\/output-to-file\/\" target=\"_blank\" rel=\"noopener\">How to Write the Output to a File in Bash Script [5 Practical Cases]<\/a><\/strong><\/li>\n<li><strong><a class=\"in-cell-link\" href=\"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/basics\/examples\/list-in-bash\/\" target=\"_blank\" rel=\"noopener\">How to Create a List in Bash Scripts? [2 Easy Methods]<\/a><\/strong><\/li>\n<li><strong><a class=\"in-cell-link\" href=\"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/basics\/examples\/clear-history\/\" target=\"_blank\" rel=\"noopener\">How to Clear History in Bash [2 Practical Cases]<\/a><\/strong><\/li>\n<li><strong><a class=\"in-cell-link\" href=\"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/basics\/examples\/clear-screen\/\" target=\"_blank\" rel=\"noopener\">How to Clear Screen Using Bash Script? [2 Effective Methods]<\/a><\/strong><\/li>\n<\/ul>\n<hr \/>\n<p><strong>&lt;&lt; Go Back to <span data-sheets-value=\"{&quot;1&quot;:2,&quot;2&quot;:&quot;28 Essential Bash Script Examples&quot;}\" data-sheets-userformat=\"{&quot;2&quot;:1065857,&quot;3&quot;:{&quot;1&quot;:0},&quot;10&quot;:1,&quot;11&quot;:4,&quot;12&quot;:0,&quot;17&quot;:1,&quot;23&quot;:1}\" data-sheets-hyperlink=\"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/basics\/examples\/\"><a class=\"in-cell-link\" href=\"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/basics\/examples\/\" target=\"_blank\" rel=\"noopener\">Bash Script Examples<\/a> <\/span>| <span data-sheets-value=\"{&quot;1&quot;:2,&quot;2&quot;:&quot;Bash Scripting Basics&quot;}\" data-sheets-userformat=\"{&quot;2&quot;:16768,&quot;10&quot;:1,&quot;11&quot;:4,&quot;17&quot;:1}\" data-sheets-hyperlink=\"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/basics\/\"><a class=\"in-cell-link\" href=\"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/basics\/\" target=\"_blank\" rel=\"noopener\">Bash Scripting Basics<\/a><\/span>\u00a0| <a href=\"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/\" target=\"_blank\" rel=\"noopener\">Bash Scripting Tutorial<\/a><\/strong><br \/>\n<script type=\"application\/ld+json\">\n    {\n      \"@context\": \"https:\/\/schema.org\",\n      \"@type\": \"FAQPage\",\n      \"mainEntity\": [{\n                \"@type\": \"Question\",\n                \"name\": \"How do I check the Ubuntu version in a shell?\",\n                \"acceptedAnswer\": {\n              \"@type\": \"Answer\",\n              \"text\": \"To check the Ubuntu version in the shell you can use the command line interface, and type any of these commands <code class=\"\" data-line=\"\">lsb_release -a<\/code>, <code class=\"\" data-line=\"\">cat etc\/os-release<\/code>, or <code class=\"\" data-line=\"\">cat \/etc\/issue<\/code>.\"\n}\n},{\n                \"@type\": \"Question\",\n                \"name\": \"How do I check the Linux kernel version?\",\n                \"acceptedAnswer\": {\n              \"@type\": \"Answer\",\n              \"text\": \"You can use the command <code class=\"\" data-line=\"\">uname -r<\/code> to check the Linux Kernel version that you are using. It will show users the version of Linux kernel as well as some additional information.\"\n}\n},{\n                \"@type\": \"Question\",\n                \"name\": \"How do I check the node version in Ubuntu?\",\n                \"acceptedAnswer\": {\n              \"@type\": \"Answer\",\n              \"text\": \"If you want to know the node version in Ubuntu, you must have installed the <b>node js<\/b>\u00a0in your system. To install it, run the command <code class=\"\" data-line=\"\">sudo apt install nodejs<\/code>, and then run the command <code class=\"\" data-line=\"\">node -v<\/code>.\"\n}\n},{\n                \"@type\": \"Question\",\n                \"name\": \"How do I check the WSL version on Ubuntu?\",\n                \"acceptedAnswer\": {\n              \"@type\": \"Answer\",\n              \"text\": \"To check the WSL version, open the PowerShell or Windows Command Prompt. Then enter the command <code class=\"\" data-line=\"\">wsl -l -v<\/code> and this will display the WSL version in Ubuntu.\"\n}\n}]\n}\n<\/script><\/p>\n\n\n<div class=\"kk-star-ratings kksr-auto kksr-align-center kksr-valign-bottom\"\n    data-payload='{&quot;align&quot;:&quot;center&quot;,&quot;id&quot;:&quot;13868&quot;,&quot;slug&quot;:&quot;default&quot;,&quot;valign&quot;:&quot;bottom&quot;,&quot;ignore&quot;:&quot;&quot;,&quot;reference&quot;:&quot;auto&quot;,&quot;class&quot;:&quot;&quot;,&quot;count&quot;:&quot;0&quot;,&quot;legendonly&quot;:&quot;&quot;,&quot;readonly&quot;:&quot;&quot;,&quot;score&quot;:&quot;0&quot;,&quot;starsonly&quot;:&quot;&quot;,&quot;best&quot;:&quot;5&quot;,&quot;gap&quot;:&quot;5&quot;,&quot;greet&quot;:&quot;Rate this post&quot;,&quot;legend&quot;:&quot;0\\\/5 - (0 votes)&quot;,&quot;size&quot;:&quot;24&quot;,&quot;title&quot;:&quot;How to Check Ubuntu Version Using Bash Scripts? [5 Methods]&quot;,&quot;width&quot;:&quot;0&quot;,&quot;_legend&quot;:&quot;{score}\\\/{best} - ({count} {votes})&quot;,&quot;font_factor&quot;:&quot;1.25&quot;}'>\n            \n<div class=\"kksr-stars\">\n    \n<div class=\"kksr-stars-inactive\">\n            <div class=\"kksr-star\" data-star=\"1\" style=\"padding-right: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" data-star=\"2\" style=\"padding-right: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" data-star=\"3\" style=\"padding-right: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" data-star=\"4\" style=\"padding-right: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" data-star=\"5\" style=\"padding-right: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n    <\/div>\n    \n<div class=\"kksr-stars-active\" style=\"width: 0px;\">\n            <div class=\"kksr-star\" style=\"padding-right: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" style=\"padding-right: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" style=\"padding-right: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" style=\"padding-right: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" style=\"padding-right: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n    <\/div>\n<\/div>\n                \n\n<div class=\"kksr-legend\" style=\"font-size: 19.2px;\">\n            <span class=\"kksr-muted\">Rate this post<\/span>\n    <\/div>\n    <\/div>\n","protected":false},"excerpt":{"rendered":"<p>Checking the version of Ubuntu typically refers to determining the specific release version or codename of the Ubuntu operating system &#8230; <\/p>\n<p class=\"read-more-container\"><a title=\"How to Check Ubuntu Version Using Bash Scripts? [5 Methods]\" class=\"read-more button\" href=\"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/basics\/examples\/check-ubuntu-version\/#more-13868\" aria-label=\"Read more about How to Check Ubuntu Version Using Bash Scripts? [5 Methods]\">Read more<\/a><\/p>\n","protected":false},"author":314902,"featured_media":13880,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[102],"tags":[114],"class_list":["post-13868","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-bash-scripting","tag-bash-script-examples","generate-columns","tablet-grid-50","mobile-grid-100","grid-parent","grid-33"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to Check Ubuntu Version Using Bash Scripts? [5 Methods] - LinuxSimply<\/title>\n<meta name=\"description\" content=\"From this article you can learn how to check Ubuntu version using Bash scripting. I have demonstrated 2 methods and several examples of it.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/basics\/examples\/check-ubuntu-version\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Check Ubuntu Version Using Bash Scripts? [5 Methods] - LinuxSimply\" \/>\n<meta property=\"og:description\" content=\"From this article you can learn how to check Ubuntu version using Bash scripting. I have demonstrated 2 methods and several examples of it.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/basics\/examples\/check-ubuntu-version\/\" \/>\n<meta property=\"og:site_name\" content=\"LinuxSimply\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/samayra.simi?mibextid=LQQJ4d\" \/>\n<meta property=\"article:published_time\" content=\"2023-08-02T04:35:14+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-04-23T06:51:18+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/07\/6.-How-to-Check-Ubuntu-Version-in-Bash.png\" \/>\n\t<meta property=\"og:image:width\" content=\"400\" \/>\n\t<meta property=\"og:image:height\" content=\"400\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Lamisa Musharrat\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Lamisa Musharrat\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/bash-scripting-tutorial\\\/basics\\\/examples\\\/check-ubuntu-version\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/bash-scripting-tutorial\\\/basics\\\/examples\\\/check-ubuntu-version\\\/\"},\"author\":{\"name\":\"Lamisa Musharrat\",\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/#\\\/schema\\\/person\\\/6c8ce99861d6ee19a49c62dfad934181\"},\"headline\":\"How to Check Ubuntu Version Using Bash Scripts? [5 Methods]\",\"datePublished\":\"2023-08-02T04:35:14+00:00\",\"dateModified\":\"2024-04-23T06:51:18+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/bash-scripting-tutorial\\\/basics\\\/examples\\\/check-ubuntu-version\\\/\"},\"wordCount\":871,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/bash-scripting-tutorial\\\/basics\\\/examples\\\/check-ubuntu-version\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/linuxsimply.com\\\/wp-content\\\/uploads\\\/2023\\\/07\\\/6.-How-to-Check-Ubuntu-Version-in-Bash.png\",\"keywords\":[\"bash script examples\"],\"articleSection\":[\"Bash Scripting\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/linuxsimply.com\\\/bash-scripting-tutorial\\\/basics\\\/examples\\\/check-ubuntu-version\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/bash-scripting-tutorial\\\/basics\\\/examples\\\/check-ubuntu-version\\\/\",\"url\":\"https:\\\/\\\/linuxsimply.com\\\/bash-scripting-tutorial\\\/basics\\\/examples\\\/check-ubuntu-version\\\/\",\"name\":\"How to Check Ubuntu Version Using Bash Scripts? [5 Methods] - LinuxSimply\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/bash-scripting-tutorial\\\/basics\\\/examples\\\/check-ubuntu-version\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/bash-scripting-tutorial\\\/basics\\\/examples\\\/check-ubuntu-version\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/linuxsimply.com\\\/wp-content\\\/uploads\\\/2023\\\/07\\\/6.-How-to-Check-Ubuntu-Version-in-Bash.png\",\"datePublished\":\"2023-08-02T04:35:14+00:00\",\"dateModified\":\"2024-04-23T06:51:18+00:00\",\"description\":\"From this article you can learn how to check Ubuntu version using Bash scripting. I have demonstrated 2 methods and several examples of it.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/bash-scripting-tutorial\\\/basics\\\/examples\\\/check-ubuntu-version\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/linuxsimply.com\\\/bash-scripting-tutorial\\\/basics\\\/examples\\\/check-ubuntu-version\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/bash-scripting-tutorial\\\/basics\\\/examples\\\/check-ubuntu-version\\\/#primaryimage\",\"url\":\"https:\\\/\\\/linuxsimply.com\\\/wp-content\\\/uploads\\\/2023\\\/07\\\/6.-How-to-Check-Ubuntu-Version-in-Bash.png\",\"contentUrl\":\"https:\\\/\\\/linuxsimply.com\\\/wp-content\\\/uploads\\\/2023\\\/07\\\/6.-How-to-Check-Ubuntu-Version-in-Bash.png\",\"width\":400,\"height\":400,\"caption\":\"Check Ubuntu Version Using Bash Scripts\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/bash-scripting-tutorial\\\/basics\\\/examples\\\/check-ubuntu-version\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/linuxsimply.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Bash Scripting Tutorial\",\"item\":\"https:\\\/\\\/linuxsimply.com\\\/bash-scripting-tutorial\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Bash Scripting Basics\",\"item\":\"https:\\\/\\\/linuxsimply.com\\\/bash-scripting-tutorial\\\/basics\\\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Bash Script Examples\",\"item\":\"https:\\\/\\\/linuxsimply.com\\\/bash-scripting-tutorial\\\/basics\\\/examples\\\/\"},{\"@type\":\"ListItem\",\"position\":5,\"name\":\"How to Check Ubuntu Version Using Bash Scripts? [5 Methods]\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/#website\",\"url\":\"https:\\\/\\\/linuxsimply.com\\\/\",\"name\":\"LinuxSimply\",\"description\":\"All About Linux\",\"publisher\":{\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/linuxsimply.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/#organization\",\"name\":\"LinuxSimply\",\"url\":\"https:\\\/\\\/linuxsimply.com\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/linuxsimply.com\\\/wp-content\\\/uploads\\\/2023\\\/09\\\/LinuxSimply-New-Logo-Without-Icon.png\",\"contentUrl\":\"https:\\\/\\\/linuxsimply.com\\\/wp-content\\\/uploads\\\/2023\\\/09\\\/LinuxSimply-New-Logo-Without-Icon.png\",\"width\":355,\"height\":48,\"caption\":\"LinuxSimply\"},\"image\":{\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/#\\\/schema\\\/logo\\\/image\\\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/#\\\/schema\\\/person\\\/6c8ce99861d6ee19a49c62dfad934181\",\"name\":\"Lamisa Musharrat\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/wp-content\\\/uploads\\\/2023\\\/09\\\/Lamisa-Musharrat-II-96x96.png\",\"url\":\"https:\\\/\\\/linuxsimply.com\\\/wp-content\\\/uploads\\\/2023\\\/09\\\/Lamisa-Musharrat-II-96x96.png\",\"contentUrl\":\"https:\\\/\\\/linuxsimply.com\\\/wp-content\\\/uploads\\\/2023\\\/09\\\/Lamisa-Musharrat-II-96x96.png\",\"caption\":\"Lamisa Musharrat\"},\"description\":\"Hello there. My name is Lamisa Musharat, and I'm an Linux Content Developer Executive at SOFTEKO. I earned a bachelor's degree in Naval Architecture and Marine Engineering from Bangladesh University of Engineering and Technology (BUET).I learned Linux out of my curiosity and now I find it useful as automation is easier using Linux. I take great pleasure in assisting others with Linux-related issues. I really want you to enjoy and benefit from my efforts.Read Full Bio\",\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/samayra.simi?mibextid=LQQJ4d\",\"https:\\\/\\\/www.linkedin.com\\\/in\\\/lamisa-musharrat-ba1631250\\\/\"],\"url\":\"https:\\\/\\\/linuxsimply.com\\\/author\\\/siimi\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Check Ubuntu Version Using Bash Scripts? [5 Methods] - LinuxSimply","description":"From this article you can learn how to check Ubuntu version using Bash scripting. I have demonstrated 2 methods and several examples of it.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/basics\/examples\/check-ubuntu-version\/","og_locale":"en_US","og_type":"article","og_title":"How to Check Ubuntu Version Using Bash Scripts? [5 Methods] - LinuxSimply","og_description":"From this article you can learn how to check Ubuntu version using Bash scripting. I have demonstrated 2 methods and several examples of it.","og_url":"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/basics\/examples\/check-ubuntu-version\/","og_site_name":"LinuxSimply","article_author":"https:\/\/www.facebook.com\/samayra.simi?mibextid=LQQJ4d","article_published_time":"2023-08-02T04:35:14+00:00","article_modified_time":"2024-04-23T06:51:18+00:00","og_image":[{"width":400,"height":400,"url":"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/07\/6.-How-to-Check-Ubuntu-Version-in-Bash.png","type":"image\/png"}],"author":"Lamisa Musharrat","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Lamisa Musharrat","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/basics\/examples\/check-ubuntu-version\/#article","isPartOf":{"@id":"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/basics\/examples\/check-ubuntu-version\/"},"author":{"name":"Lamisa Musharrat","@id":"https:\/\/linuxsimply.com\/#\/schema\/person\/6c8ce99861d6ee19a49c62dfad934181"},"headline":"How to Check Ubuntu Version Using Bash Scripts? [5 Methods]","datePublished":"2023-08-02T04:35:14+00:00","dateModified":"2024-04-23T06:51:18+00:00","mainEntityOfPage":{"@id":"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/basics\/examples\/check-ubuntu-version\/"},"wordCount":871,"commentCount":0,"publisher":{"@id":"https:\/\/linuxsimply.com\/#organization"},"image":{"@id":"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/basics\/examples\/check-ubuntu-version\/#primaryimage"},"thumbnailUrl":"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/07\/6.-How-to-Check-Ubuntu-Version-in-Bash.png","keywords":["bash script examples"],"articleSection":["Bash Scripting"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/linuxsimply.com\/bash-scripting-tutorial\/basics\/examples\/check-ubuntu-version\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/basics\/examples\/check-ubuntu-version\/","url":"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/basics\/examples\/check-ubuntu-version\/","name":"How to Check Ubuntu Version Using Bash Scripts? [5 Methods] - LinuxSimply","isPartOf":{"@id":"https:\/\/linuxsimply.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/basics\/examples\/check-ubuntu-version\/#primaryimage"},"image":{"@id":"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/basics\/examples\/check-ubuntu-version\/#primaryimage"},"thumbnailUrl":"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/07\/6.-How-to-Check-Ubuntu-Version-in-Bash.png","datePublished":"2023-08-02T04:35:14+00:00","dateModified":"2024-04-23T06:51:18+00:00","description":"From this article you can learn how to check Ubuntu version using Bash scripting. I have demonstrated 2 methods and several examples of it.","breadcrumb":{"@id":"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/basics\/examples\/check-ubuntu-version\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/linuxsimply.com\/bash-scripting-tutorial\/basics\/examples\/check-ubuntu-version\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/basics\/examples\/check-ubuntu-version\/#primaryimage","url":"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/07\/6.-How-to-Check-Ubuntu-Version-in-Bash.png","contentUrl":"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/07\/6.-How-to-Check-Ubuntu-Version-in-Bash.png","width":400,"height":400,"caption":"Check Ubuntu Version Using Bash Scripts"},{"@type":"BreadcrumbList","@id":"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/basics\/examples\/check-ubuntu-version\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/linuxsimply.com\/"},{"@type":"ListItem","position":2,"name":"Bash Scripting Tutorial","item":"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/"},{"@type":"ListItem","position":3,"name":"Bash Scripting Basics","item":"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/basics\/"},{"@type":"ListItem","position":4,"name":"Bash Script Examples","item":"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/basics\/examples\/"},{"@type":"ListItem","position":5,"name":"How to Check Ubuntu Version Using Bash Scripts? [5 Methods]"}]},{"@type":"WebSite","@id":"https:\/\/linuxsimply.com\/#website","url":"https:\/\/linuxsimply.com\/","name":"LinuxSimply","description":"All About Linux","publisher":{"@id":"https:\/\/linuxsimply.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/linuxsimply.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/linuxsimply.com\/#organization","name":"LinuxSimply","url":"https:\/\/linuxsimply.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/linuxsimply.com\/#\/schema\/logo\/image\/","url":"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/09\/LinuxSimply-New-Logo-Without-Icon.png","contentUrl":"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/09\/LinuxSimply-New-Logo-Without-Icon.png","width":355,"height":48,"caption":"LinuxSimply"},"image":{"@id":"https:\/\/linuxsimply.com\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/linuxsimply.com\/#\/schema\/person\/6c8ce99861d6ee19a49c62dfad934181","name":"Lamisa Musharrat","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/09\/Lamisa-Musharrat-II-96x96.png","url":"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/09\/Lamisa-Musharrat-II-96x96.png","contentUrl":"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/09\/Lamisa-Musharrat-II-96x96.png","caption":"Lamisa Musharrat"},"description":"Hello there. My name is Lamisa Musharat, and I'm an Linux Content Developer Executive at SOFTEKO. I earned a bachelor's degree in Naval Architecture and Marine Engineering from Bangladesh University of Engineering and Technology (BUET).I learned Linux out of my curiosity and now I find it useful as automation is easier using Linux. I take great pleasure in assisting others with Linux-related issues. I really want you to enjoy and benefit from my efforts.Read Full Bio","sameAs":["https:\/\/www.facebook.com\/samayra.simi?mibextid=LQQJ4d","https:\/\/www.linkedin.com\/in\/lamisa-musharrat-ba1631250\/"],"url":"https:\/\/linuxsimply.com\/author\/siimi\/"}]}},"_links":{"self":[{"href":"https:\/\/linuxsimply.com\/wp-json\/wp\/v2\/posts\/13868","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/linuxsimply.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/linuxsimply.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/linuxsimply.com\/wp-json\/wp\/v2\/users\/314902"}],"replies":[{"embeddable":true,"href":"https:\/\/linuxsimply.com\/wp-json\/wp\/v2\/comments?post=13868"}],"version-history":[{"count":0,"href":"https:\/\/linuxsimply.com\/wp-json\/wp\/v2\/posts\/13868\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/linuxsimply.com\/wp-json\/wp\/v2\/media\/13880"}],"wp:attachment":[{"href":"https:\/\/linuxsimply.com\/wp-json\/wp\/v2\/media?parent=13868"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/linuxsimply.com\/wp-json\/wp\/v2\/categories?post=13868"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/linuxsimply.com\/wp-json\/wp\/v2\/tags?post=13868"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}