{"id":34489,"date":"2021-09-13T13:21:29","date_gmt":"2021-09-13T13:21:29","guid":{"rendered":"https:\/\/linuxiac.com\/?p=34489"},"modified":"2022-04-12T13:10:22","modified_gmt":"2022-04-12T13:10:22","slug":"what-linux-version","status":"publish","type":"post","link":"https:\/\/linuxiac.com\/what-linux-version\/","title":{"rendered":"What Linux Version Am I Running? Here&#8217;s How to Find Out"},"content":{"rendered":"\n<p>There are various reasons why you might want to find which Linux distribution you are using or the OS version of your Linux system.<\/p>\n\n\n\n<p><strong>Related: <a href=\"https:\/\/linuxiac.com\/what-is-linux-operating-system\/\">What Is Linux? A Guide for Non-technical Users<\/a><\/strong><\/p>\n\n\n\n<p>When most people talk of Linux, they are usually referr to a Linux distribution, but this is not the case. Above all, &#8220;<strong>What Linux version am I running?<\/strong>&#8221; can mean two different things.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">1. Linux Kernel<\/h3>\n\n\n\n<p>Most people think of Linux as an operating system, but it is a kernel. A kernel is the lowest level of software that can interface with computer hardware.<\/p>\n\n\n\n<p>In other words, the kernel is a bridge between the software and hardware of a computer.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">2. Linux OS<\/h3>\n\n\n\n<p>On the other side, Linux-based operating systems are called <a href=\"https:\/\/linuxiac.com\/category\/distributions\/\">Linux distributions<\/a> which usually include the Linux kernel and software package managers, software, and graphical user interface.<\/p>\n\n\n\n<p>Generally speaking, Linux operating system has primarily three components:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>The kernel<\/strong> is a program at the heart of the Linux operating system that takes care of fundamental stuff, like letting hardware communicate with software.<\/li>\n\n\n\n<li><strong>System Libraries<\/strong> are special functions or programs using which application programs or system utilities access the kernel&#8217;s features. These libraries implement most of the functionalities of the operating system.<\/li>\n\n\n\n<li><strong>System Utility<\/strong> programs are responsible for doing specialized, individual-level tasks.<\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-what-linux-version-am-i-running\">What Linux Version Am I Running?<\/h2>\n\n\n\n<p>Let&#8217;s find out now how to check what Linux distribution and kernel version is installed on your system using the command line.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">How to Find Out Linux Distribution Name and Its Release Version<\/h3>\n\n\n\n<p>There are several ways to determine what distribution and its version number are running on a system. Below we will show you the three most commonly used approaches.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">1. Displaying the contents of the \/etc\/os-release file<\/h4>\n\n\n\n<p>Open the terminal and type the following command:<\/p>\n\n\n<pre class=\"wp-block-code\"><span><code lang=\"bash\" class=\"hljs language-bash\">cat \/etc\/os-release<\/code><\/span><\/pre>\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>Here is what the output of the command looks like in Debian:<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><a href=\"https:\/\/linuxiac.com\/wp-content\/uploads\/2021\/09\/os-release1.png\"><img decoding=\"async\" width=\"887\" height=\"331\" src=\"https:\/\/linuxiac.com\/wp-content\/uploads\/2021\/09\/os-release1.png\" alt=\"What Linux Version Am I Running?\" class=\"wp-image-44490\" srcset=\"https:\/\/linuxiac.com\/wp-content\/uploads\/2021\/09\/os-release1.png 887w, https:\/\/linuxiac.com\/wp-content\/uploads\/2021\/09\/os-release1-380x142.png 380w, https:\/\/linuxiac.com\/wp-content\/uploads\/2021\/09\/os-release1-768x287.png 768w\" sizes=\"(max-width: 887px) 100vw, 887px\" \/><\/a><\/figure>\n\n\n\n<p>And here&#8217;s what it looks like in an RHEL-based distribution, in this case, AlmaLinux:<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><a href=\"https:\/\/linuxiac.com\/wp-content\/uploads\/2021\/09\/os-release2.png\"><img decoding=\"async\" width=\"877\" height=\"509\" src=\"https:\/\/linuxiac.com\/wp-content\/uploads\/2021\/09\/os-release2.png\" alt=\"What Linux Version Am I Running?\" class=\"wp-image-44493\" srcset=\"https:\/\/linuxiac.com\/wp-content\/uploads\/2021\/09\/os-release2.png 877w, https:\/\/linuxiac.com\/wp-content\/uploads\/2021\/09\/os-release2-380x221.png 380w, https:\/\/linuxiac.com\/wp-content\/uploads\/2021\/09\/os-release2-768x446.png 768w\" sizes=\"(max-width: 877px) 100vw, 877px\" \/><\/a><\/figure>\n\n\n\n<p>As you can see, the&nbsp;<code>\/etc\/os-release<\/code>&nbsp;file contains operating system identification data, including information about the distribution and its release version.<\/p>\n\n\n\n<p>This file is part of the systemd package and should be present on all modern Linux distributions running systemd.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">2. Displaying the contents of the \/etc\/issue file<\/h4>\n\n\n\n<p>For a more straightforward response to your request for a Linux OS version number, try this <code>cat<\/code> command:<\/p>\n\n\n<pre class=\"wp-block-code\"><span><code lang=\"bash\" class=\"hljs language-bash\">cat \/etc\/issue<\/code><\/span><\/pre>\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><a href=\"https:\/\/linuxiac.com\/wp-content\/uploads\/2021\/09\/etc-issue.png\"><img decoding=\"async\" width=\"887\" height=\"189\" src=\"https:\/\/linuxiac.com\/wp-content\/uploads\/2021\/09\/etc-issue.png\" alt=\"Displaying the contents of the \/etc\/issue file\" class=\"wp-image-44499\" srcset=\"https:\/\/linuxiac.com\/wp-content\/uploads\/2021\/09\/etc-issue.png 887w, https:\/\/linuxiac.com\/wp-content\/uploads\/2021\/09\/etc-issue-380x81.png 380w, https:\/\/linuxiac.com\/wp-content\/uploads\/2021\/09\/etc-issue-768x164.png 768w\" sizes=\"(max-width: 887px) 100vw, 887px\" \/><\/a><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\">3. Using the lsb_release command<\/h4>\n\n\n\n<p>The <code>lsb_release<\/code> command is a helpful utility to find out information about your Linux installation. It displays LSB (<a href=\"https:\/\/en.wikipedia.org\/wiki\/Linux_Standard_Base\" target=\"_blank\" rel=\"noreferrer noopener\">Linux Standard Base<\/a>) information about the Linux distribution.<\/p>\n\n\n\n<p>The syntax is:<\/p>\n\n\n<pre class=\"wp-block-code\"><span><code lang=\"bash\" class=\"hljs language-bash\">lsb_release -a<\/code><\/span><\/pre>\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><a href=\"https:\/\/linuxiac.com\/wp-content\/uploads\/2021\/09\/lsb-release.png\"><img decoding=\"async\" width=\"886\" height=\"258\" src=\"https:\/\/linuxiac.com\/wp-content\/uploads\/2021\/09\/lsb-release.png\" alt=\"Using the lsb_releas to check the Linux OS version\" class=\"wp-image-44502\" srcset=\"https:\/\/linuxiac.com\/wp-content\/uploads\/2021\/09\/lsb-release.png 886w, https:\/\/linuxiac.com\/wp-content\/uploads\/2021\/09\/lsb-release-380x111.png 380w, https:\/\/linuxiac.com\/wp-content\/uploads\/2021\/09\/lsb-release-768x224.png 768w\" sizes=\"(max-width: 886px) 100vw, 886px\" \/><\/a><\/figure>\n\n\n\n<p>The <code>lsb_release<\/code> command should work on every Linux distribution, as long as you\u2019ve installed the <code>lsb-release<\/code> package.<\/p>\n\n\n\n<p>For more about the&nbsp;<code>lsb_release<\/code>&nbsp;command in Linux, consult its&nbsp;<a href=\"https:\/\/linux.die.net\/man\/1\/lsb_release\" target=\"_blank\" rel=\"noreferrer noopener\">manual page<\/a>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">How to Check Linux Kernel Version<\/h3>\n\n\n\n<p>If you\u2019d like to know which version of the Linux kernel you\u2019re using, type the following command into the terminal and press enter:<\/p>\n\n\n<pre class=\"wp-block-code\"><span><code lang=\"bash\" class=\"hljs language-bash\">uname -a<\/code><\/span><\/pre>\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><a href=\"https:\/\/linuxiac.com\/wp-content\/uploads\/2021\/09\/uname.png\"><img decoding=\"async\" width=\"976\" height=\"189\" src=\"https:\/\/linuxiac.com\/wp-content\/uploads\/2021\/09\/uname.png\" alt=\"How to Check Linux Kernel Version\" class=\"wp-image-44505\" srcset=\"https:\/\/linuxiac.com\/wp-content\/uploads\/2021\/09\/uname.png 976w, https:\/\/linuxiac.com\/wp-content\/uploads\/2021\/09\/uname-380x74.png 380w, https:\/\/linuxiac.com\/wp-content\/uploads\/2021\/09\/uname-768x149.png 768w\" sizes=\"(max-width: 976px) 100vw, 976px\" \/><\/a><\/figure>\n\n\n\n<p>The command <code>uname -a<\/code> shows the version of the Linux kernel you\u2019re using and additional details.<\/p>\n\n\n\n<p>To obtain <strong>more detailed Linux kernel information<\/strong>, you can also read the <meta http-equiv=\"content-type\" content=\"text\/html; charset=utf-8\">contents of the <code>\/proc\/version<\/code> file.<\/p>\n\n\n<pre class=\"wp-block-code\"><span><code lang=\"bash\" class=\"hljs language-bash\">cat \/proc\/version<\/code><\/span><\/pre>\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><a href=\"https:\/\/linuxiac.com\/wp-content\/uploads\/2021\/09\/proc-version.png\"><img decoding=\"async\" width=\"989\" height=\"215\" src=\"https:\/\/linuxiac.com\/wp-content\/uploads\/2021\/09\/proc-version.png\" alt=\"How to Check Linux Kernel Version\" class=\"wp-image-44508\" srcset=\"https:\/\/linuxiac.com\/wp-content\/uploads\/2021\/09\/proc-version.png 989w, https:\/\/linuxiac.com\/wp-content\/uploads\/2021\/09\/proc-version-380x83.png 380w, https:\/\/linuxiac.com\/wp-content\/uploads\/2021\/09\/proc-version-768x167.png 768w\" sizes=\"(max-width: 989px) 100vw, 989px\" \/><\/a><\/figure>\n\n\n\n<p>As you can see, the <code>\/proc\/version<\/code> file specifies the version of the Linux kernel, the version of GCC used to compile the kernel and the kernel compilation time. It also contains the kernel compiler\u2019s user name.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n\n\n<p>Now you know how to check what Linux version you&#8217;re running. From all the information mentioned above, I hope you can now find the installed version of any Linux distribution.<\/p>\n\n\n\n<p>If you feel any difficulty related to the ways mentioned above, then let us know via your feedback in the comments. We will welcome your queries.<\/p>\n\n\n\n<p>Are you new to Linux? Here is the <a href=\"https:\/\/linuxiac.com\/basic-linux-commands\/\">list of basic Linux commands<\/a> containing all the common commands you\u2019ll need to know to get you started.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Here&#8217;s how to find out what Linux kernel version and distribution your system is running.<\/p>\n","protected":false},"author":10,"featured_media":34495,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8,4417],"tags":[40,4396],"class_list":["post-34489","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tips","category-linux-knowledge","tag-kernel","tag-linux-operating-system"],"blocksy_meta":{"styles_descriptor":{"styles":{"desktop":"","tablet":"","mobile":""},"google_fonts":[],"version":6},"post_title_panel":"","has_hero_section":"default","506197ce96bbcb6d3890a0cfc252c6e1":"","hero_section":"type-2","hero_elements":[{"id":"custom_title","enabled":true,"heading_tag":"h1","title":"Home","__id":"86FT4mCk-QXAIp6UICvvm"},{"id":"custom_description","enabled":false,"description_visibility":{"desktop":true,"tablet":true,"mobile":false},"__id":"ev3qVhnIOdrdUR_Szp45r"},{"id":"custom_meta","enabled":true,"meta_elements":[{"id":"author","enabled":true,"label":"By","has_author_avatar":"yes","avatar_size":50,"__id":"AVFVivu_kQvXiOQBWec_V"},{"id":"post_date","enabled":false,"label":"On","date_format_source":"default","date_format":"M j, Y","__id":"0lZGpq7oStvqDVHEFiEOS"},{"id":"updated_date","enabled":true,"label":"Updated","date_format_source":"default","date_format":"M j, Y","__id":"uYMYVSK3KL5C7mpSqZ4dA"},{"id":"categories","enabled":false,"label":"In","style":"simple","__id":"Po7cG2OFYaM9Hlk6bCfA_"},{"id":"comments","enabled":true,"__id":"gvMjlgeyfKVarYK7DK4RA"}],"page_meta_elements":{"joined":true,"articles_count":true,"comments":true},"__id":"YimLbq4-ifRHIycCHkiWg","meta_divider":"circle","meta_type":"label"},{"id":"breadcrumbs","enabled":false,"__id":"FvC27H1a5WkHR1tEHPORX"}],"9d3ee01d7ff9d549735db0bcecbe470c":"","hero_alignment1":"CT_CSS_SKIP_RULE","hero_margin":40,"hero_alignment2":"center","hero_vertical_alignment":"center","1655848f0f4e46f325973052d6acaee4":"","hero_structure":"normal","79bddf5b3846d1841b9977b502a3d394":"","page_title_bg_type":"custom_image","custom_hero_background":{"attachment_id":42864,"url":"https:\/\/linuxiac.com\/wp-content\/uploads\/2021\/09\/what-linux-version-header-1024x248.png"},"parallax":{"desktop":false,"tablet":false,"mobile":false},"8b72fc522892096c5ae832d49c7c6363":"","hero_height":"250px","pageTitleFont":{"family":"Default","variation":"Default","size":{"desktop":"2.8em","tablet":"2.8em","mobile":"2.8em","__changed":[]},"line-height":"CT_CSS_SKIP_RULE","letter-spacing":"CT_CSS_SKIP_RULE","text-transform":"CT_CSS_SKIP_RULE","text-decoration":"CT_CSS_SKIP_RULE"},"pageTitleFontColor":{"default":{"color":"CT_CSS_SKIP_RULEDEFAULT"}},"pageMetaFont":{"family":"Default","variation":"n6","size":"12px","line-height":"1.3","letter-spacing":"CT_CSS_SKIP_RULE","text-transform":"uppercase","text-decoration":"CT_CSS_SKIP_RULE"},"pageMetaFontColor":{"default":{"color":"CT_CSS_SKIP_RULEDEFAULT"},"hover":{"color":"CT_CSS_SKIP_RULEDEFAULT"}},"page_meta_button_type_font_colors":{"default":{"color":"CT_CSS_SKIP_RULEDEFAULT"},"hover":{"color":"CT_CSS_SKIP_RULEDEFAULT"}},"page_meta_button_type_background_colors":{"default":{"color":"CT_CSS_SKIP_RULEDEFAULT"},"hover":{"color":"CT_CSS_SKIP_RULEDEFAULT"}},"pageExcerptFont":{"family":"Default","variation":"Default","size":"CT_CSS_SKIP_RULE","line-height":"CT_CSS_SKIP_RULE","letter-spacing":"CT_CSS_SKIP_RULE","text-transform":"CT_CSS_SKIP_RULE","text-decoration":"CT_CSS_SKIP_RULE"},"pageExcerptColor":{"default":{"color":"CT_CSS_SKIP_RULEDEFAULT"}},"breadcrumbsFont":{"family":"Default","variation":"Default","size":"CT_CSS_SKIP_RULE","line-height":"CT_CSS_SKIP_RULE","letter-spacing":"CT_CSS_SKIP_RULE","text-transform":"CT_CSS_SKIP_RULE","text-decoration":"CT_CSS_SKIP_RULE"},"breadcrumbsFontColor":{"default":{"color":"CT_CSS_SKIP_RULEDEFAULT"},"initial":{"color":"CT_CSS_SKIP_RULEDEFAULT"},"hover":{"color":"CT_CSS_SKIP_RULEDEFAULT"}},"pageTitleOverlay":{"background_type":"color","background_pattern":"type-1","background_image":{"attachment_id":null,"x":0,"y":0},"gradient":"linear-gradient(135deg,rgba(6,147,227,1) 0%,rgb(155,81,224) 100%)","background_repeat":"repeat","background_size":"auto","background_attachment":"scroll","patternColor":{"default":{"color":"#e5e7ea"}},"overlayColor":{"default":{"color":"CT_CSS_SKIP_RULE"}},"backgroundColor":{"default":{"color":"CT_CSS_SKIP_RULE"}}},"pageTitleBackground":{"background_type":"color","background_pattern":"type-1","background_image":{"attachment_id":null,"x":0,"y":0},"gradient":"linear-gradient(135deg,rgba(6,147,227,1) 0%,rgb(155,81,224) 100%)","background_repeat":"repeat","background_size":"auto","background_attachment":"scroll","patternColor":{"default":{"color":"#e5e7ea"}},"overlayColor":{"default":{"color":"CT_CSS_SKIP_RULE"}},"backgroundColor":{"default":{"color":"var(--theme-palette-color-6)"}}},"pageTitlePadding":{"top":"50px","bottom":"50px","left":"auto","right":"auto","linked":true},"3add9994f63046f4ef70a17a1b1f2a6d":"","page_structure_type":"default","35a297f2da57e8fa8e026de79041a823":"","content_style_source":"inherit","content_style":"wide","c32bdcf461205f7d2f45974db8529288":"","vertical_spacing_source":"inherit","content_area_spacing":"both","background":{"background_type":"color","background_pattern":"type-1","background_image":{"attachment_id":null,"x":0,"y":0},"gradient":"linear-gradient(135deg,rgba(6,147,227,1) 0%,rgb(155,81,224) 100%)","background_repeat":"repeat","background_size":"auto","background_attachment":"scroll","patternColor":{"default":{"color":"#e5e7ea"}},"overlayColor":{"default":{"color":"CT_CSS_SKIP_RULE"}},"backgroundColor":{"default":{"color":"CT_CSS_SKIP_RULE"}}},"content_background":{"background_type":"color","background_pattern":"type-1","background_image":{"attachment_id":null,"x":0,"y":0},"gradient":"linear-gradient(135deg,rgba(6,147,227,1) 0%,rgb(155,81,224) 100%)","background_repeat":"repeat","background_size":"auto","background_attachment":"scroll","patternColor":{"default":{"color":"#e5e7ea"}},"overlayColor":{"default":{"color":"CT_CSS_SKIP_RULE"}},"backgroundColor":{"default":{"color":"var(--theme-palette-color-8)"}}},"content_boxed_shadow":{"inherit":false,"blur":18,"spread":-6,"v_offset":12,"h_offset":0,"inset":false,"enable":true,"color":{"color":"rgba(34, 56, 101, 0.04)"}},"boxed_content_spacing":{"desktop":{"top":"40px","bottom":"40px","left":"40px","right":"40px","linked":true},"tablet":{"top":"35px","bottom":"35px","left":"35px","right":"35px","linked":true},"mobile":{"top":"20px","bottom":"20px","left":"20px","right":"20px","linked":true}},"content_boxed_radius":{"top":"3px","bottom":"3px","left":"3px","right":"3px","linked":true},"2eda53cd79c25d8e810c7d1d633fb6ae":"","disable_featured_image":"no","disable_post_tags":"no","disable_share_box":"no","disable_author_box":"no","disable_posts_navigation":"no","disable_subscribe_form":"no","70f05b43ec4067943d1b91b83cf2db2a":"","disable_related_posts":"no","disable_header":"no","disable_footer":"no","7908b2df6ad36e669cb40026595226f3":"","header_footer_scripts_panel":"","header_scripts":"","614c3e2c80ec7685e98a603b6c477b45":"","header_after_body_scripts":"","60c9aa4d3714df2b100d01a9dfd3e064":"","footer_scripts":"","a1ab396c1f98940d94a444e40998003e":"","7070403dd33d87fcff0ef80858f6ef6d":"","e0ae28878080bdcdff5b8631b6a10fde":"","bf76309bb55abfc49439571dc1a27043":"","page_title_image_size":"full","a52e4bcb08ec4f4c75db8f163b833a4d":"","f4c9a26ab7e3ac7050bb8b6e7ae3d9e1":"","130750739f60674dee1b890ae13648cd":"","b8247a473e497101b48dc2e7ff209471":"","652b4973057790f7ac0e34cf5af2b48e":"","aeb8de17b0d5cf46bf39496b11c02f96":"","a99634d6451b425324c840c96b9eba9e":"","fa3ad94d190285b91db24c7815f2fcde":"","b2e6eeebf4f301c81105e1ad2b75f413":""},"_links":{"self":[{"href":"https:\/\/linuxiac.com\/wp-json\/wp\/v2\/posts\/34489","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/linuxiac.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/linuxiac.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/linuxiac.com\/wp-json\/wp\/v2\/users\/10"}],"replies":[{"embeddable":true,"href":"https:\/\/linuxiac.com\/wp-json\/wp\/v2\/comments?post=34489"}],"version-history":[{"count":0,"href":"https:\/\/linuxiac.com\/wp-json\/wp\/v2\/posts\/34489\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/linuxiac.com\/wp-json\/wp\/v2\/media\/34495"}],"wp:attachment":[{"href":"https:\/\/linuxiac.com\/wp-json\/wp\/v2\/media?parent=34489"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/linuxiac.com\/wp-json\/wp\/v2\/categories?post=34489"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/linuxiac.com\/wp-json\/wp\/v2\/tags?post=34489"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}