{"id":4142,"date":"2023-01-22T08:14:57","date_gmt":"2023-01-22T08:14:57","guid":{"rendered":"https:\/\/linuxsimply.com\/?p=4142"},"modified":"2023-08-31T07:13:31","modified_gmt":"2023-08-31T07:13:31","slug":"dmesg-command-in-linux","status":"publish","type":"post","link":"https:\/\/linuxsimply.com\/dmesg-command-in-linux\/","title":{"rendered":"The \u201cdmesg\u201d Command in Linux [7+ Practical Examples]"},"content":{"rendered":"<p style=\"text-align: justify;\">The <strong>dmesg <\/strong>command in <strong>Linux <\/strong>\u00a0is used to display and control the <strong>Kernel Ring Buffer <\/strong>messages. You can use this command to monitor the <strong>device driver <\/strong>and <strong>hardware <\/strong>messages to find faults in your system. In this article, you will find the most useful applications of the <strong>dmesg <\/strong>command with practical examples.<\/p>\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' ><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/linuxsimply.com\/dmesg-command-in-linux\/#The_Kernel_Ring_Buffer_in_Linux\" >The Kernel Ring Buffer in Linux<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/linuxsimply.com\/dmesg-command-in-linux\/#A_Description\" >A. Description<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/linuxsimply.com\/dmesg-command-in-linux\/#B_Syntax\" >B. Syntax<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/linuxsimply.com\/dmesg-command-in-linux\/#C_Options\" >C. Options<\/a><\/li><\/ul><\/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\/dmesg-command-in-linux\/#Removing_non-root_User_Restriction_of_%E2%80%9Cdmesg%E2%80%9D_Command\" >Removing non-root User Restriction of \u201cdmesg\u201d Command<\/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\/dmesg-command-in-linux\/#Practical_Examples_of_the_%E2%80%9Cdmesg%E2%80%9D_Command_in_Linux\" >Practical Examples of the \u201cdmesg\u201d Command in Linux<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/linuxsimply.com\/dmesg-command-in-linux\/#Example_1_Displaying_All_the_Messages_From_the_Kernel_Ring_Buffer_Using_the_%E2%80%9Cdmesg%E2%80%9D_Command_in_Linux\" >Example 1: Displaying All the Messages From the Kernel Ring Buffer Using the \u201cdmesg\u201d Command in Linux<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/linuxsimply.com\/dmesg-command-in-linux\/#Example_2_EnablingDisabling_Coloured_Output_Using_the_%E2%80%9Cdmesg%E2%80%9D_Command_in_Linux\" >Example 2: Enabling\/Disabling Coloured Output Using the \u201cdmesg\u201d Command in Linux<\/a><ul class='ez-toc-list-level-4' ><li class='ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/linuxsimply.com\/dmesg-command-in-linux\/#Case_A_Disabling_Colored_Output_Using_the_%E2%80%9Cdmesg%E2%80%9D_Command_in_Linux\" >Case A: Disabling Colored Output Using the \u201cdmesg\u201d Command in Linux<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-10\" href=\"https:\/\/linuxsimply.com\/dmesg-command-in-linux\/#Case_B_Enabling_Colored_Output_Using_the_%E2%80%9Cdmesg%E2%80%9D_Command_in_Linux\" >Case B: Enabling Colored Output Using the \u201cdmesg\u201d Command in Linux<\/a><\/li><\/ul><\/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\/dmesg-command-in-linux\/#Example_3_Displaying_the_Kernel_Ring_Buffer_Messages_in_Human-Readable_Format\" >Example 3: Displaying the Kernel Ring Buffer Messages in Human-Readable Format<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-12\" href=\"https:\/\/linuxsimply.com\/dmesg-command-in-linux\/#Example_4_Enabling_Human-Readable_Timestamps_Using_the_%E2%80%9Cdmesg%E2%80%9D_Command_in_Linux\" >Example 4: Enabling Human-Readable Timestamps Using the \u201cdmesg\u201d Command in Linux<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-13\" href=\"https:\/\/linuxsimply.com\/dmesg-command-in-linux\/#Example_5_Filtering_Ring_Buffer_Messages_Using_the_%E2%80%9Cdmesg%E2%80%9D_Command_in_Linux\" >Example 5: Filtering Ring Buffer Messages Using the \u201cdmesg\u201d Command in Linux<\/a><ul class='ez-toc-list-level-4' ><li class='ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-14\" href=\"https:\/\/linuxsimply.com\/dmesg-command-in-linux\/#Case_A_Filter_Output_by_Specified_Facilities_Using_the_%E2%80%9Cdmesg%E2%80%9D_Command_in_Linux\" >Case A: Filter Output by Specified Facilities Using the \u201cdmesg\u201d Command in Linux<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-15\" href=\"https:\/\/linuxsimply.com\/dmesg-command-in-linux\/#Case_B_Filter_Output_by_Specified_Log_Levels_Using_the_%E2%80%9Cdmesg%E2%80%9D_Command_in_Linux\" >Case B: Filter Output by Specified Log Levels Using the \u201cdmesg\u201d Command in Linux<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-16\" href=\"https:\/\/linuxsimply.com\/dmesg-command-in-linux\/#Example_6_Monitoring_New_Messages_Using_the_%E2%80%9Cdmesg%E2%80%9D_Command_in_Linux\" >Example 6: Monitoring New Messages Using the \u201cdmesg\u201d Command in Linux<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-17\" href=\"https:\/\/linuxsimply.com\/dmesg-command-in-linux\/#Example_7_Clearing_Message_Logs_Using_the_%E2%80%9Cdmesg%E2%80%9D_Command_in_Linux\" >Example 7: Clearing Message Logs Using the \u201cdmesg\u201d Command in Linux<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-18\" href=\"https:\/\/linuxsimply.com\/dmesg-command-in-linux\/#Conclusion\" >Conclusion<\/a><\/li><\/ul><\/nav><\/div>\n<h3><span class=\"ez-toc-section\" id=\"The_Kernel_Ring_Buffer_in_Linux\"><\/span>The Kernel Ring Buffer in Linux<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p style=\"text-align: justify;\">A <strong>Ring Buffer<\/strong> is a fixed-sized space on the system reserved for storing messages. It is called a <strong>Ring Buffer<\/strong> because it overwrites old messages with new ones when the space is full. Similarly, the <strong>Kernel Ring Buffer<\/strong> is a kind of <strong>Ring Buffer<\/strong> that stores the startup messages of device drivers, hardwares and Kernel modules. As it reserves the startup messages, the <strong>Kernel Ring Buffer <\/strong>is utilized to investigate system issues.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"A_Description\"><\/span>A. Description<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>The <strong>dmesg <\/strong>command in <strong>Linux <\/strong>enables users to examine and control the <strong>Kernel Ring Buffer<\/strong>.<\/p>\n<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;\">\n<strong>Note:<\/strong> In some machines, <strong>non-root<\/strong> users may not have permission to use this command. In that case, you can remove this <strong>non-root<\/strong> user restriction. You will find the process of enabling the <strong>dmesg <\/strong>permissions in the<strong> <a href=\"#removing-non-root-user-restriction\">next section<\/a>.<\/strong><br \/>\n<\/div><\/div>\n<h3><span class=\"ez-toc-section\" id=\"B_Syntax\"><\/span>B. Syntax<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>The syntax for the <strong>at<\/strong> command in <strong>Linux<\/strong> simply contains the command itself and then desired options.<\/p>\n<pre><code class=\"language-bash\" data-line=\"\">dmesg [OPTION]...<\/code><\/pre>\n<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>In the above syntax<strong> OPTION<\/strong> enclosed by square brackets and followed by <strong>3 dots<\/strong> represents that multiple options can be utilized simultaneously.<\/div><\/div>\n<h3><span class=\"ez-toc-section\" id=\"C_Options\"><\/span>C. Options<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p style=\"text-align: justify;\">The <strong>dmesg<\/strong> command in <strong>Linux <\/strong>offers several <strong>options<\/strong> to modify your experience. However, you will find the most useful one\u2019s here for your convenience. For any further features, you can always look at the <strong>man page.<\/strong><\/p>\n<pre><code class=\"language-bash\" data-line=\"\">man dmesg<\/code><\/pre>\n<p><span style=\"color: #800080;\"><strong>Useful Options<\/strong><\/span><\/p>\n<div class=\"su-list\" style=\"margin-left:20px\">\n<ul>\n<li><i class=\"sui sui-arrow-right\" style=\"color:#000000\"><\/i> <strong>-c: <\/strong>Clears the Ring Buffer.<\/li>\n<li><i class=\"sui sui-arrow-right\" style=\"color:#000000\"><\/i> <strong>-C: <\/strong>Clears the Ring Buffer after printing its contents on the terminal.<\/li>\n<li><i class=\"sui sui-arrow-right\" style=\"color:#000000\"><\/i> <strong>-D: <\/strong>Disables showing messages in the terminal.<\/li>\n<li><i class=\"sui sui-arrow-right\" style=\"color:#000000\"><\/i> <strong>-E: <\/strong>Enables showing messages in the terminal.<\/li>\n<li><i class=\"sui sui-arrow-right\" style=\"color:#000000\"><\/i> <strong>-f: <\/strong>Restricts the output to specified facilities (i.e. kern, daemon etc).<\/li>\n<li><i class=\"sui sui-arrow-right\" style=\"color:#000000\"><\/i> <strong>-H: <\/strong>Displays messages in a human-readable format.<\/li>\n<li><i class=\"sui sui-arrow-right\" style=\"color:#000000\"><\/i> <strong>-k: <\/strong>Displays kernel messages.<\/li>\n<li><i class=\"sui sui-arrow-right\" style=\"color:#000000\"><\/i> <strong>-l: <\/strong>Restricts the output to specified log levels (i.e. err, info etc).<\/li>\n<li><i class=\"sui sui-arrow-right\" style=\"color:#000000\"><\/i> <strong>-L\/&#8211;color: <\/strong>Colorizes output.<\/li>\n<li><i class=\"sui sui-arrow-right\" style=\"color:#000000\"><\/i> <strong>-T: <\/strong>Displays messages in human-readable Timestamps.<\/li>\n<li><i class=\"sui sui-arrow-right\" style=\"color:#000000\"><\/i> <strong>-w\/&#8211;follow: <\/strong>Waits for new messages.<\/li>\n<\/ul>\n<\/div>\n<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;\">\n<strong>NB:<\/strong> The <strong>options<\/strong> in <strong>Linux<\/strong> <a href=\"https:\/\/linuxsimply.com\/cli-in-linux\/\" target=\"_blank\" rel=\"noopener\"><strong>CLI (Command Line Interface)<\/strong><\/a> are all <strong>case-sensitive<\/strong>, So be cautious while using them.<\/div><\/div>\n<h2><span class=\"ez-toc-section\" id=\"Removing_non-root_User_Restriction_of_%E2%80%9Cdmesg%E2%80%9D_Command\"><\/span><a id=\"removing-non-root-user-restriction\"><\/a>Removing non-root User Restriction of \u201cdmesg\u201d Command<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p style=\"text-align: justify;\">In most of the systems, all users have permission to run the <strong>dmesg <\/strong>command. However, in some machines, the command may be restricted to <strong>non-root<\/strong> users. You can check whether you are allowed to use the command as a <strong>non-root<\/strong> user by simply typing the command.<\/p>\n<pre><code class=\"language-bash\" data-line=\"\">dmesg<\/code><\/pre>\n<p>You will get the following message on your <strong>terminal<\/strong> if it is <strong>restricted<\/strong>:<img decoding=\"async\" class=\"aligncenter size-full wp-image-4144\" src=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/dmesg-command-in-linux-1.png\" alt=\"Restriction message of non-root user for using dmesg command.\" width=\"700\" height=\"54\" srcset=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/dmesg-command-in-linux-1.png 700w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/dmesg-command-in-linux-1-300x23.png 300w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/dmesg-command-in-linux-1-1024x79.png 1024w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/dmesg-command-in-linux-1-765x59.png 765w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/dmesg-command-in-linux-1-1536x118.png 1536w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/dmesg-command-in-linux-1-2048x158.png 2048w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/dmesg-command-in-linux-1-1944x150.png 1944w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/dmesg-command-in-linux-1-100x8.png 100w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/dmesg-command-in-linux-1-788x60.png 788w\" sizes=\"(max-width: 700px) 100vw, 700px\" \/><\/p>\n<p>In this case, don\u2019t be overwhelmed. You can easily remove the restriction within a minute by following the instructions below.<\/p>\n<p><span style=\"color: #800080;\"><strong>Steps to Follow &gt;<br \/>\n<\/strong><\/span><\/p>\n<p>\u278a\u00a0 At first open the <strong>Ubuntu Terminal<\/strong><\/p>\n<p>\u278b\u00a0\u00a0 Type the following in your command prompt:<\/p>\n<pre><code class=\"language-bash\" data-line=\"\">sudo sysctl -w kernel.dmesg_restrict=0<\/code><\/pre>\n<p>\u278c Type your<strong> password<\/strong><\/p>\n<p>\u278d Now, press <strong>ENTER<\/strong><\/p>\n<p><span style=\"color: #800080;\"><strong>Output &gt;<br \/>\n<\/strong><\/span><\/p>\n<p style=\"text-align: justify;\">Upon completion of these four steps, you will be able to run the <strong>dmesg<\/strong> command on your machine without <strong>root<\/strong> <strong>permission<\/strong>.<img fetchpriority=\"high\" decoding=\"async\" class=\"aligncenter size-full wp-image-4145\" src=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/dmesg-command-in-linux-2.png\" alt=\"Enabling non-root user to use dmesg command in linux.\" width=\"700\" height=\"77\" srcset=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/dmesg-command-in-linux-2.png 700w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/dmesg-command-in-linux-2-300x33.png 300w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/dmesg-command-in-linux-2-1024x113.png 1024w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/dmesg-command-in-linux-2-764x84.png 764w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/dmesg-command-in-linux-2-1536x169.png 1536w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/dmesg-command-in-linux-2-2048x225.png 2048w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/dmesg-command-in-linux-2-1364x150.png 1364w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/dmesg-command-in-linux-2-100x11.png 100w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/dmesg-command-in-linux-2-788x86.png 788w\" sizes=\"(max-width: 700px) 100vw, 700px\" \/><\/p>\n<h2><span class=\"ez-toc-section\" id=\"Practical_Examples_of_the_%E2%80%9Cdmesg%E2%80%9D_Command_in_Linux\"><\/span>Practical Examples of the \u201cdmesg\u201d Command in Linux<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>The <strong>diff <\/strong>command in <strong>Linux<\/strong> is a convenient command to monitor <strong>Kernel <\/strong>messages and find issues. Some of the most helpful applications of the <strong>dmesg <\/strong>command have been illustrated below.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Example_1_Displaying_All_the_Messages_From_the_Kernel_Ring_Buffer_Using_the_%E2%80%9Cdmesg%E2%80%9D_Command_in_Linux\"><\/span>Example 1: Displaying All the Messages From the Kernel Ring Buffer Using the \u201cdmesg\u201d Command in Linux<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>You can view all the <strong>Kernel Ring Buffer<\/strong> messages using the <strong>dmesg <\/strong>\u00a0command in <strong>Linux.<\/strong> In this example, I will show you all the <strong>Ring Buffer <\/strong>messages on my machine. You can do the same by following the steps below.<\/p>\n<p><span style=\"color: #800080;\"><strong>Steps to Follow &gt;<br \/>\n<\/strong><\/span><\/p>\n<p>\u278a At first open the <strong>Ubuntu Terminal<\/strong>.<\/p>\n<p>\u278b Type the following command in the command prompt:<\/p>\n<pre><code class=\"language-bash\" data-line=\"\">dmesg<\/code><\/pre>\n<p>\u278c Press the <strong>ENTER<\/strong> button.<\/p>\n<p><span style=\"color: #0000ff;\"><strong><span style=\"color: #800080;\">Output &gt;<\/span> <\/strong><\/span><\/p>\n<p>In the image below, you can see that I have shown all the <strong>Kernel Ring Buffer <\/strong>messages of my system.<img decoding=\"async\" class=\"aligncenter size-full wp-image-4146\" src=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/dmesg-command-in-linux-3.png\" alt=\"Displaying the Kernel Ring Buffer \u00a0messages of system using dmesg command in linux.\" width=\"825\" height=\"306\" srcset=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/dmesg-command-in-linux-3.png 825w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/dmesg-command-in-linux-3-300x111.png 300w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/dmesg-command-in-linux-3-1024x380.png 1024w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/dmesg-command-in-linux-3-766x284.png 766w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/dmesg-command-in-linux-3-1536x570.png 1536w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/dmesg-command-in-linux-3-2048x760.png 2048w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/dmesg-command-in-linux-3-404x150.png 404w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/dmesg-command-in-linux-3-100x37.png 100w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/dmesg-command-in-linux-3-944x350.png 944w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/dmesg-command-in-linux-3-788x292.png 788w\" sizes=\"(max-width: 825px) 100vw, 825px\" \/><\/p>\n<hr \/>\n<p><span style=\"color: #000080; font-size: 18pt;\"><strong>Similar Readings<\/strong><\/span><\/p>\n<ul>\n<li><strong><a class=\"in-cell-link\" href=\"https:\/\/linuxsimply.com\/time-command-in-linux\/\" target=\"_blank\" rel=\"noopener\">The \u201ctime\u201d Command in Linux [4 Practical Examples]<\/a><\/strong><\/li>\n<li><strong><a class=\"in-cell-link\" href=\"https:\/\/linuxsimply.com\/tty-command-in-linux\/\" target=\"_blank\" rel=\"noopener\">The \u201ctty\u201d Command in Linux [4 Practical Examples]<\/a><\/strong><\/li>\n<li><strong><a class=\"in-cell-link\" href=\"https:\/\/linuxsimply.com\/uptime-command-in-linux\/\" target=\"_blank\" rel=\"noopener\">The \u201cuptime\u201d Command in Linux [5 Practical Examples]<\/a><\/strong><\/li>\n<li><strong><a class=\"in-cell-link\" href=\"https:\/\/linuxsimply.com\/vmstat-command-in-linux\/\" target=\"_blank\" rel=\"noopener\">The \u201cvmstat\u201d Command in Linux [6 Practical Examples]<\/a><\/strong><\/li>\n<li><strong><a class=\"in-cell-link\" href=\"https:\/\/linuxsimply.com\/uname-command-in-linux\/\" target=\"_blank\" rel=\"noopener\">The \u201cuname\u201d Command in Linux [11 Practical Examples]<\/a><\/strong><\/li>\n<li><strong><a class=\"in-cell-link\" href=\"https:\/\/linuxsimply.com\/apt-get-command-in-linux\/\" target=\"_blank\" rel=\"noopener\">The \u201capt-get\u201d Command in Linux [10 Practical Examples]<\/a><\/strong><\/li>\n<\/ul>\n<hr \/>\n<h3><span class=\"ez-toc-section\" id=\"Example_2_EnablingDisabling_Coloured_Output_Using_the_%E2%80%9Cdmesg%E2%80%9D_Command_in_Linux\"><\/span>Example 2: Enabling\/Disabling Coloured Output Using the \u201cdmesg\u201d Command in Linux<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p style=\"text-align: justify;\">You can <strong>remove <\/strong>colors from your output or <strong>colorize <\/strong>the messages using the <strong>dmesg <\/strong>command in <strong>Linux<\/strong>. The <strong>option &#8211;color<\/strong> is used to colorize or remove the colors whereas the <strong>option -L<\/strong> <strong>\u00a0<\/strong>will only generate colored output. You will find the uses of these options below.<\/p>\n<h4><span class=\"ez-toc-section\" id=\"Case_A_Disabling_Colored_Output_Using_the_%E2%80%9Cdmesg%E2%80%9D_Command_in_Linux\"><\/span>Case A: Disabling Colored Output Using the \u201cdmesg\u201d Command in Linux<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<p>To remove colors from messages follow the given steps.<\/p>\n<p><span style=\"color: #800080;\"><strong>Steps to Follow &gt;<br \/>\n<\/strong><\/span><\/p>\n<p>\u278a At first, launch the <strong>Ubuntu Terminal<\/strong>.<\/p>\n<p>\u278b Write the following command in the command line:<\/p>\n<pre><code class=\"language-bash\" data-line=\"\">dmesg --color=never<\/code><\/pre>\n<p>\u278c Now, hit the <strong>ENTER<\/strong> button.<\/p>\n<p><span style=\"color: #0000ff;\"><strong><span style=\"color: #800080;\">Output &gt;<\/span> <\/strong><\/span><\/p>\n<p>In the given image, you can see that I have <strong>removed <\/strong>colors from the out.<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-4147\" src=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/dmesg-command-in-linux-4.png\" alt=\"Removing color of the Kernel Ring Buffer \u00a0messages.\" width=\"825\" height=\"394\" srcset=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/dmesg-command-in-linux-4.png 825w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/dmesg-command-in-linux-4-300x143.png 300w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/dmesg-command-in-linux-4-1024x489.png 1024w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/dmesg-command-in-linux-4-766x366.png 766w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/dmesg-command-in-linux-4-1536x734.png 1536w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/dmesg-command-in-linux-4-2048x978.png 2048w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/dmesg-command-in-linux-4-314x150.png 314w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/dmesg-command-in-linux-4-100x48.png 100w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/dmesg-command-in-linux-4-733x350.png 733w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/dmesg-command-in-linux-4-788x376.png 788w\" sizes=\"(max-width: 825px) 100vw, 825px\" \/><\/p>\n<h4><span class=\"ez-toc-section\" id=\"Case_B_Enabling_Colored_Output_Using_the_%E2%80%9Cdmesg%E2%80%9D_Command_in_Linux\"><\/span>Case B: Enabling Colored Output Using the \u201cdmesg\u201d Command in Linux<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<p>To generate <strong>colored <\/strong>messages follow the steps below.<\/p>\n<p><span style=\"color: #800080;\"><strong>Steps to Follow &gt;<br \/>\n<\/strong><\/span><\/p>\n<p>\u278a Open the <strong>Ubuntu Terminal<\/strong>.<\/p>\n<p>\u278b Type the following command in the command prompt:<\/p>\n<pre><code class=\"language-bash\" data-line=\"\">dmesg -L<\/code><\/pre>\n<p>\u278c Press the <strong>ENTER<\/strong> button.<\/p>\n<p><span style=\"color: #0000ff;\"><strong><span style=\"color: #800080;\">Output &gt;<\/span> <\/strong><\/span><\/p>\n<p>In the image below, you can see that I have generated <strong>colored <\/strong>messages.<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-4148\" src=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/dmesg-command-in-linux-5.png\" alt=\"Colorizing the Kernel Ring Buffer \u00a0messages.\" width=\"825\" height=\"487\" srcset=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/dmesg-command-in-linux-5.png 825w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/dmesg-command-in-linux-5-300x177.png 300w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/dmesg-command-in-linux-5-1024x604.png 1024w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/dmesg-command-in-linux-5-767x453.png 767w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/dmesg-command-in-linux-5-1536x907.png 1536w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/dmesg-command-in-linux-5-2048x1209.png 2048w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/dmesg-command-in-linux-5-254x150.png 254w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/dmesg-command-in-linux-5-100x59.png 100w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/dmesg-command-in-linux-5-593x350.png 593w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/dmesg-command-in-linux-5-788x465.png 788w\" sizes=\"(max-width: 825px) 100vw, 825px\" \/><\/p>\n<h3><span class=\"ez-toc-section\" id=\"Example_3_Displaying_the_Kernel_Ring_Buffer_Messages_in_Human-Readable_Format\"><\/span>Example 3: Displaying the Kernel Ring Buffer Messages in Human-Readable Format<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p style=\"text-align: justify;\">You can display the <strong>Kernel Ring Buffer <\/strong>messages in the <strong>human-readable<\/strong> format using the <strong>dmesg <\/strong>command in <strong>Linux<\/strong>. To do so you will need to use <strong>option -H<\/strong>. The option will print the output in a<strong> less<\/strong> pager with all the advanced features. In this example, I will display the messages in a <strong>human-readable<\/strong> format. To achieve the same results you can follow the steps below.<\/p>\n<p><span style=\"color: #800080;\"><strong>Steps to Follow &gt;<br \/>\n<\/strong><\/span><\/p>\n<p>\u278a At first go to the <strong>Ubuntu Terminal<\/strong>.<\/p>\n<p>\u278b Type the following command in the command line:<\/p>\n<pre><code class=\"language-bash\" data-line=\"\">dmesg -H<\/code><\/pre>\n<p>\u278c Hit <strong>ENTER<\/strong> .<\/p>\n<p><span style=\"color: #800080;\"><strong>Output &gt; <\/strong><\/span><\/p>\n<p>In the following image, you can see that I have displayed the messages in a <strong>human-readable<\/strong> format.<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-4149\" src=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/dmesg-command-in-linux-6.png\" alt=\"Displaying the Kernel Ring Buffer Messages in Human-Readable Format.\" width=\"825\" height=\"549\" srcset=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/dmesg-command-in-linux-6.png 825w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/dmesg-command-in-linux-6-300x200.png 300w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/dmesg-command-in-linux-6-1024x681.png 1024w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/dmesg-command-in-linux-6-768x511.png 768w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/dmesg-command-in-linux-6-1536x1022.png 1536w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/dmesg-command-in-linux-6-2048x1363.png 2048w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/dmesg-command-in-linux-6-225x150.png 225w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/dmesg-command-in-linux-6-100x67.png 100w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/dmesg-command-in-linux-6-526x350.png 526w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/dmesg-command-in-linux-6-788x524.png 788w\" sizes=\"(max-width: 825px) 100vw, 825px\" \/><\/p>\n<hr \/>\n<p><span style=\"color: #000080; font-size: 18pt;\"><strong>Similar Readings<\/strong><\/span><\/p>\n<ul>\n<li><strong><a class=\"in-cell-link\" href=\"https:\/\/linuxsimply.com\/free-command-in-linux\/\" target=\"_blank\" rel=\"noopener\">The \u201cfree\u201d Command in Linux [8 Practical Examples]<\/a><\/strong><\/li>\n<li><strong><a class=\"in-cell-link\" href=\"https:\/\/linuxsimply.com\/getent-command-in-linux\/\" target=\"_blank\" rel=\"noopener\">The \u201cgetent\u201d Command in Linux [11 Practical Examples]<\/a><\/strong><\/li>\n<li><strong><a class=\"in-cell-link\" href=\"https:\/\/linuxsimply.com\/groupadd-command-in-linux\/\" target=\"_blank\" rel=\"noopener\">The \u201cgroupadd\u201d Command in Linux [7 Practical Examples]<\/a><\/strong><\/li>\n<li><strong><a class=\"in-cell-link\" href=\"https:\/\/linuxsimply.com\/addgroup-command-in-linux\/\" target=\"_blank\" rel=\"noopener\">The \u201caddgroup\u201d Command in Linux [7 Practical Examples]<\/a><\/strong><\/li>\n<li><strong><a class=\"in-cell-link\" href=\"https:\/\/linuxsimply.com\/groups-command-in-linux\/\" target=\"_blank\" rel=\"noopener\">The \u201cgroups\u201d Command in Linux [6 Practical Examples]<\/a><\/strong><\/li>\n<li><strong><a class=\"in-cell-link\" href=\"https:\/\/linuxsimply.com\/firewall-cmd-command-in-linux\/\" target=\"_blank\" rel=\"noopener\">The \u201cfirewall-cmd\u201d Command in Linux [7 Practical Examples]<\/a><\/strong><\/li>\n<\/ul>\n<hr \/>\n<h3><span class=\"ez-toc-section\" id=\"Example_4_Enabling_Human-Readable_Timestamps_Using_the_%E2%80%9Cdmesg%E2%80%9D_Command_in_Linux\"><\/span>Example 4: Enabling Human-Readable Timestamps Using the \u201cdmesg\u201d Command in Linux<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p style=\"text-align: justify;\">You can enable human-readable <strong>timestamps <\/strong>using the<strong> -T option<\/strong> with the <strong>dmesg<\/strong> command in <strong>Linux<\/strong>. In this example, I will demonstrate activating the human-readable timestamps while displaying the <strong>Kernel Ring Buffer<\/strong> messages. To do the same, follow the given steps.<\/p>\n<p><span style=\"color: #800080;\"><strong>Steps to Follow &gt;<br \/>\n<\/strong><\/span><\/p>\n<p>\u278a Launch the <strong>Ubuntu Terminal<\/strong>.<\/p>\n<p>\u278b Type the following command in the command prompt:<\/p>\n<pre><code class=\"language-bash\" data-line=\"\">dmesg -T<\/code><\/pre>\n<p>\u278c Now, press the <strong>ENTER<\/strong> button.<\/p>\n<p><span style=\"color: #0000ff;\"><strong><span style=\"color: #800080;\">Output &gt;<\/span> <\/strong><\/span><\/p>\n<p style=\"text-align: justify;\">In the image below, you can see that I have enabled the human-readable <strong>timestamps <\/strong>of the <strong>Kernel Ring Buffer<\/strong> messages.<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-4150\" src=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/dmesg-command-in-linux-7.png\" alt=\"Enabling Human-Readable Timestamps Using the dmesg Command in Linux\" width=\"825\" height=\"587\" srcset=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/dmesg-command-in-linux-7.png 825w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/dmesg-command-in-linux-7-300x213.png 300w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/dmesg-command-in-linux-7-1024x729.png 1024w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/dmesg-command-in-linux-7-767x546.png 767w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/dmesg-command-in-linux-7-1536x1093.png 1536w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/dmesg-command-in-linux-7-2048x1457.png 2048w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/dmesg-command-in-linux-7-211x150.png 211w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/dmesg-command-in-linux-7-100x71.png 100w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/dmesg-command-in-linux-7-492x350.png 492w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/dmesg-command-in-linux-7-788x560.png 788w\" sizes=\"(max-width: 825px) 100vw, 825px\" \/><\/p>\n<h3><span class=\"ez-toc-section\" id=\"Example_5_Filtering_Ring_Buffer_Messages_Using_the_%E2%80%9Cdmesg%E2%80%9D_Command_in_Linux\"><\/span>Example 5: Filtering Ring Buffer Messages Using the \u201cdmesg\u201d Command in Linux<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p style=\"text-align: justify;\">You can filter <strong>Ring Buffer<\/strong> messages using the <strong>dmesg<\/strong> command in<strong> Linux<\/strong>. Messages can be filtered by specific facilities or log levels using the<strong> -f<\/strong> and<strong> -l options <\/strong>respectively. Follow the examples explained below to learn more about the applications of the options.<\/p>\n<h4><span class=\"ez-toc-section\" id=\"Case_A_Filter_Output_by_Specified_Facilities_Using_the_%E2%80%9Cdmesg%E2%80%9D_Command_in_Linux\"><\/span>Case A: Filter Output by Specified Facilities Using the \u201cdmesg\u201d Command in Linux<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<p>To filter the <strong>Kernel Ring Buffer<\/strong> messages by specified <strong>facility<\/strong> follow the given steps.<\/p>\n<p><span style=\"color: #800080;\"><strong>Steps to Follow &gt;<br \/>\n<\/strong><\/span><\/p>\n<p>\u278a At first launch the <strong>Ubuntu Terminal<\/strong>.<\/p>\n<p>\u278b Type the following command in the command prompt:<\/p>\n<pre><code class=\"language-bash\" data-line=\"\">dmesg -f user,daemon<\/code><\/pre>\n<p>\u278c Now, hit the <strong>ENTER<\/strong> button.<\/p>\n<p><span style=\"color: #0000ff;\"><strong><span style=\"color: #800080;\">Output &gt;<\/span> <\/strong><\/span><\/p>\n<p>In the given Image, you can see that I have displayed only the <strong>user<\/strong> and <strong>daemon <\/strong>related<strong> Ring Buffer<\/strong> messages<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-4151\" src=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/dmesg-command-in-linux-8.png\" alt=\"Filtering Output by Specified Facilities.\" width=\"825\" height=\"602\" srcset=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/dmesg-command-in-linux-8.png 825w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/dmesg-command-in-linux-8-300x219.png 300w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/dmesg-command-in-linux-8-1024x747.png 1024w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/dmesg-command-in-linux-8-767x560.png 767w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/dmesg-command-in-linux-8-1536x1121.png 1536w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/dmesg-command-in-linux-8-2048x1494.png 2048w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/dmesg-command-in-linux-8-206x150.png 206w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/dmesg-command-in-linux-8-100x73.png 100w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/dmesg-command-in-linux-8-480x350.png 480w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/dmesg-command-in-linux-8-788x575.png 788w\" sizes=\"(max-width: 825px) 100vw, 825px\" \/><\/p>\n<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;\">\n<div class=\"su-list\" style=\"margin-left:20px\">\n<p><strong>Note: <\/strong>The system divides<strong> Ring Buffer<\/strong> messages into multiple facilities. A list of these <strong>facilities <\/strong>is given below.<\/p>\n<ul>\n<li><i class=\"sui sui-arrow-right\" style=\"color:#000000\"><\/i> <strong>kern:<\/strong> Kernel messages.<\/li>\n<li><i class=\"sui sui-arrow-right\" style=\"color:#000000\"><\/i> <strong>user:<\/strong> User-level messages.<\/li>\n<li><i class=\"sui sui-arrow-right\" style=\"color:#000000\"><\/i> <strong>mail:<\/strong> Mail system messages.<\/li>\n<li><i class=\"sui sui-arrow-right\" style=\"color:#000000\"><\/i> <strong>daemon:<\/strong> Messages about system daemons.<\/li>\n<li><i class=\"sui sui-arrow-right\" style=\"color:#000000\"><\/i> <strong>auth:<\/strong> Authorization messages.<\/li>\n<li><i class=\"sui sui-arrow-right\" style=\"color:#000000\"><\/i> <strong>syslog:<\/strong> Internal syslogd messages.<\/li>\n<li><i class=\"sui sui-arrow-right\" style=\"color:#000000\"><\/i> <strong>lpr:<\/strong> Line printer subsystem messages.<\/li>\n<li><i class=\"sui sui-arrow-right\" style=\"color:#000000\"><\/i> <strong>news:<\/strong> Network news subsystem messages.<\/li>\n<\/ul>\n<\/div>\n<\/div><\/div>\n<h4><span class=\"ez-toc-section\" id=\"Case_B_Filter_Output_by_Specified_Log_Levels_Using_the_%E2%80%9Cdmesg%E2%80%9D_Command_in_Linux\"><\/span>Case B: Filter Output by Specified Log Levels Using the \u201cdmesg\u201d Command in Linux<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<p>To filter the <strong>Kernel Ring Buffer<\/strong> messages by specified <strong>log levels<\/strong> follow the given steps.<\/p>\n<p><span style=\"color: #800080;\"><strong>Steps to Follow &gt;<br \/>\n<\/strong><\/span><\/p>\n<p>\u278a Go to your <strong>Ubuntu Terminal<\/strong>.<\/p>\n<p>\u278b Type the following command in the command line:<\/p>\n<pre><code class=\"language-bash\" data-line=\"\">dmesg -l err,notice<\/code><\/pre>\n<p>\u278c Strike <strong>ENTER<\/strong>.<\/p>\n<p><span style=\"color: #0000ff;\"><strong><span style=\"color: #800080;\">Output &gt;<\/span> <\/strong><\/span><\/p>\n<p>In the given Image, you can see that I have displayed only the <strong>err<\/strong> and <strong>notice <\/strong>related<strong> Ring Buffer<\/strong> messages.<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-4152\" src=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/dmesg-command-in-linux-9.png\" alt=\"Filtering Output by Log levels.\" width=\"825\" height=\"630\" srcset=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/dmesg-command-in-linux-9.png 825w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/dmesg-command-in-linux-9-300x229.png 300w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/dmesg-command-in-linux-9-1024x782.png 1024w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/dmesg-command-in-linux-9-767x586.png 767w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/dmesg-command-in-linux-9-1536x1173.png 1536w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/dmesg-command-in-linux-9-2048x1564.png 2048w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/dmesg-command-in-linux-9-196x150.png 196w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/dmesg-command-in-linux-9-100x76.png 100w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/dmesg-command-in-linux-9-458x350.png 458w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/dmesg-command-in-linux-9-788x601.png 788w\" sizes=\"(max-width: 825px) 100vw, 825px\" \/><\/p>\n<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;\">\n<p><strong>Note: <\/strong>The system indicates each <strong>Ring Buffer<\/strong> message with a certain log level. A list of these <strong>log levels <\/strong>is given below.<\/p>\n<div class=\"su-list\" style=\"margin-left:20px\">\n<ul>\n<li><i class=\"sui sui-arrow-right\" style=\"color:#000000\"><\/i> <strong>emerg:<\/strong> Emergency messages.<\/li>\n<li><i class=\"sui sui-arrow-right\" style=\"color:#000000\"><\/i> <strong>alert:<\/strong> Alerts requiring immediate action.<\/li>\n<li><i class=\"sui sui-arrow-right\" style=\"color:#000000\"><\/i> <strong>crit:<\/strong> Critical conditions.<\/li>\n<li><i class=\"sui sui-arrow-right\" style=\"color:#000000\"><\/i> <strong>err:<\/strong> Error messages.<\/li>\n<li><i class=\"sui sui-arrow-right\" style=\"color:#000000\"><\/i> <strong>warn:<\/strong> Warning messages.<\/li>\n<li><i class=\"sui sui-arrow-right\" style=\"color:#000000\"><\/i> <strong>notice:<\/strong> Normal but significant conditions.<\/li>\n<li><i class=\"sui sui-arrow-right\" style=\"color:#000000\"><\/i> <strong>info:<\/strong> Informational messages.<\/li>\n<li><i class=\"sui sui-arrow-right\" style=\"color:#000000\"><\/i> <strong>debug:<\/strong> Debugging-level messages.<\/li>\n<\/ul>\n<\/div>\n<\/div><\/div>\n<hr \/>\n<p><span style=\"color: #000080; font-size: 18pt;\"><strong>Similar Readings<\/strong><\/span><\/p>\n<ul>\n<li><strong><a class=\"in-cell-link\" href=\"https:\/\/linuxsimply.com\/groupmod-command-in-linux\/\" target=\"_blank\" rel=\"noopener\">The \u201cgroupmod\u201d Command in Linux [5+ Practical Examples]<\/a><\/strong><\/li>\n<li><strong><a class=\"in-cell-link\" href=\"https:\/\/linuxsimply.com\/id-command-in-linux\/\" target=\"_blank\" rel=\"noopener\">The \u201cid\u201d Command in Linux [7+ Practical Examples]<\/a><\/strong><\/li>\n<li><strong><a class=\"in-cell-link\" href=\"https:\/\/linuxsimply.com\/service-command-in-linux\/\" target=\"_blank\" rel=\"noopener\">The \u201cservice\u201d Command in Linux [6 Practical Examples]<\/a><\/strong><\/li>\n<li><strong><a class=\"in-cell-link\" href=\"https:\/\/linuxsimply.com\/sestatus-command-in-linux\/\" target=\"_blank\" rel=\"noopener\">The \u201csestatus\u201d Command in Linux [4 Practical Examples]<\/a><\/strong><\/li>\n<li><strong><a class=\"in-cell-link\" href=\"https:\/\/linuxsimply.com\/shutdown-command-in-linux\/\" target=\"_blank\" rel=\"noopener\">The \u201cshutdown\u201d Command in Linux [7 Practical Examples]<\/a><\/strong><\/li>\n<li><strong><a class=\"in-cell-link\" href=\"https:\/\/linuxsimply.com\/finger-command-in-linux\/\" target=\"_blank\" rel=\"noopener\">The \u201cfinger\u201d Command in Linux [6 Practical Examples]<\/a><\/strong><\/li>\n<\/ul>\n<hr \/>\n<h3><span class=\"ez-toc-section\" id=\"Example_6_Monitoring_New_Messages_Using_the_%E2%80%9Cdmesg%E2%80%9D_Command_in_Linux\"><\/span>Example 6: Monitoring New Messages Using the \u201cdmesg\u201d Command in Linux<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p style=\"text-align: justify;\">You can monitor live <strong>Kernel Ring Buffer<\/strong> messages using the<strong> -w\/&#8211;follow options<\/strong> with the <strong>dmesg<\/strong> command in <strong>Linux<\/strong>. In this example, I will show you the application of these options. You can follow the steps below to get the same output.<\/p>\n<p><span style=\"color: #800080;\"><strong>Steps to Follow &gt;<br \/>\n<\/strong><\/span><\/p>\n<p>\u278a At first open the <strong>Ubuntu Terminal<\/strong>.<\/p>\n<p>\u278b Type the following command in the command prompt:<\/p>\n<pre><code class=\"language-bash\" data-line=\"\">dmesg -w<\/code><\/pre>\n<p><span style=\"color: #800080;\"><strong>OR,<\/strong><\/span><\/p>\n<pre><code class=\"language-bash\" data-line=\"\">dmesg --follow<\/code><\/pre>\n<p>\u278c Now, press the <strong>ENTER<\/strong> button.<\/p>\n<p><span style=\"color: #0000ff;\"><strong><span style=\"color: #800080;\">Output &gt;<\/span> <\/strong><\/span><\/p>\n<p>In the 1st image, you can see that I have displayed the\u00a0 <strong>Kernel Ring Buffer<\/strong> messages.<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-4154\" src=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/dmesg-command-in-linux-11.png\" alt=\"Waiting for new Kernel Buffer Ring messages\" width=\"825\" height=\"201\" srcset=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/dmesg-command-in-linux-11.png 825w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/dmesg-command-in-linux-11-300x73.png 300w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/dmesg-command-in-linux-11-1024x249.png 1024w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/dmesg-command-in-linux-11-768x187.png 768w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/dmesg-command-in-linux-11-1536x374.png 1536w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/dmesg-command-in-linux-11-2048x499.png 2048w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/dmesg-command-in-linux-11-616x150.png 616w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/dmesg-command-in-linux-11-100x24.png 100w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/dmesg-command-in-linux-11-1437x350.png 1437w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/dmesg-command-in-linux-11-788x191.png 788w\" sizes=\"(max-width: 825px) 100vw, 825px\" \/>In this 2nd image, you can see that the process is still running and <strong>waiting <\/strong>for new messages.<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-4155\" src=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/dmesg-command-in-linux-12.png\" alt=\"Monitoring live Kernel ring messages using dmesg command in linux.\" width=\"825\" height=\"339\" srcset=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/dmesg-command-in-linux-12.png 825w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/dmesg-command-in-linux-12-300x123.png 300w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/dmesg-command-in-linux-12-1024x421.png 1024w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/dmesg-command-in-linux-12-767x315.png 767w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/dmesg-command-in-linux-12-1536x631.png 1536w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/dmesg-command-in-linux-12-2048x842.png 2048w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/dmesg-command-in-linux-12-365x150.png 365w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/dmesg-command-in-linux-12-100x41.png 100w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/dmesg-command-in-linux-12-852x350.png 852w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/dmesg-command-in-linux-12-788x323.png 788w\" sizes=\"(max-width: 825px) 100vw, 825px\" \/><\/p>\n<hr \/>\n<p><span style=\"color: #000080; font-size: 18pt;\"><strong>Similar Readings<\/strong><\/span><\/p>\n<ul>\n<li><strong><a class=\"in-cell-link\" href=\"https:\/\/linuxsimply.com\/passwd-command-in-linux\/\" target=\"_blank\" rel=\"noopener\">The &#8220;passwd&#8221; Command in Linux [7 Practical Examples]<\/a><\/strong><\/li>\n<li><strong><a class=\"in-cell-link\" href=\"https:\/\/linuxsimply.com\/install-command-in-linux\/\" target=\"_blank\" rel=\"noopener\">The \u201cinstall\u201d Command in Linux [6+ Practical Examples]<\/a><\/strong><\/li>\n<li><strong><a class=\"in-cell-link\" href=\"https:\/\/linuxsimply.com\/reboot-command-in-linux\/\" target=\"_blank\" rel=\"noopener\">The \u201creboot\u201d Command in Linux [3 Practical Examples]<\/a><\/strong><\/li>\n<li><strong><a class=\"in-cell-link\" href=\"https:\/\/linuxsimply.com\/sync-command-in-linux\/\" target=\"_blank\" rel=\"noopener\">The \u201csync\u201d Command in Linux [8 Practical Examples]<\/a><\/strong><\/li>\n<li><strong><a class=\"in-cell-link\" href=\"https:\/\/linuxsimply.com\/chage-command-in-linux\/\" target=\"_blank\" rel=\"noopener\">The \u201cchage\u201d Command in Linux [7 Practical Examples]<\/a><\/strong><\/li>\n<li><strong><a class=\"in-cell-link\" href=\"https:\/\/linuxsimply.com\/env-command-in-linux\/\" target=\"_blank\" rel=\"noopener\">The \u201cenv \u201d Command in Linux [9 Practical Examples]<\/a><\/strong><\/li>\n<\/ul>\n<hr \/>\n<h3><span class=\"ez-toc-section\" id=\"Example_7_Clearing_Message_Logs_Using_the_%E2%80%9Cdmesg%E2%80%9D_Command_in_Linux\"><\/span>Example 7: Clearing Message Logs Using the \u201cdmesg\u201d Command in Linux<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p style=\"text-align: justify;\">You can clear the <strong>Kernel Ring Buffer<\/strong> messages using the<strong> -c\/-C options<\/strong> with the <strong>dmesg<\/strong> command in <strong>Linux<\/strong>. You will need to act as a super user to clear the messages and use the command <strong>sudo<\/strong>. In this example, I will clear the <strong>Ring Buffer <\/strong>on my machine. You can do the same by following the steps below.<\/p>\n<p><span style=\"color: #800080;\"><strong>Steps to Follow &gt;<br \/>\n<\/strong><\/span><\/p>\n<p>\u278a Launch the <strong>Ubuntu Terminal<\/strong>.<\/p>\n<p>\u278b Type any of the following commands in the command prompt:<\/p>\n<pre><code class=\"language-bash\" data-line=\"\">dmesg -c<\/code><\/pre>\n<p><span style=\"color: #800080;\"><strong>OR,<\/strong><\/span><\/p>\n<pre><code class=\"language-bash\" data-line=\"\">dmesg -C<\/code><\/pre>\n<p>\u278c Press the <strong>ENTER<\/strong> button.<\/p>\n<p><span style=\"color: #800080;\"><strong>Output &gt; <\/strong><\/span><\/p>\n<p>In the image below, you can see that I have <strong>cleared <\/strong>the <strong>Kernel Ring Buffer<\/strong>.<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-4156\" src=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/dmesg-command-in-linux-13.png\" alt=\"Clearing Message Logs Using the dmesg Command in Linux\" width=\"514\" height=\"100\" srcset=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/dmesg-command-in-linux-13.png 514w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/dmesg-command-in-linux-13-300x58.png 300w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/dmesg-command-in-linux-13-1024x199.png 1024w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/dmesg-command-in-linux-13-766x149.png 766w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/dmesg-command-in-linux-13-1536x299.png 1536w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/dmesg-command-in-linux-13-2048x398.png 2048w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/dmesg-command-in-linux-13-771x150.png 771w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/dmesg-command-in-linux-13-100x19.png 100w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/dmesg-command-in-linux-13-1799x350.png 1799w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/dmesg-command-in-linux-13-788x153.png 788w\" sizes=\"(max-width: 514px) 100vw, 514px\" \/><\/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;\">In this example, I have presented some of the most useful examples of the <strong>dmesg<\/strong> command in <strong>Linux<\/strong>. From now you will be able to examine and monitor the <strong>Kernel Ring Buffer<\/strong> messages from your<strong> terminal<\/strong>. I hope the knowledge from this article will aid your experience in <strong>Linux<\/strong> and help you become a power user.<\/p>\n<hr \/>\n<p><span style=\"color: #000080; font-size: 18pt;\"><strong>Similar Readings<\/strong><\/span><\/p>\n<ul>\n<li><strong><a class=\"in-cell-link\" href=\"https:\/\/linuxsimply.com\/sudo-command-in-linux\/\" target=\"_blank\" rel=\"noopener\">The \u201csudo\u201d Command in Linux [8 Practical Examples]<\/a><\/strong><\/li>\n<li><strong><a class=\"in-cell-link\" href=\"https:\/\/linuxsimply.com\/df-command-in-linux\/\" target=\"_blank\" rel=\"noopener\">The \u201cdf\u201d Command in Linux [11 Practical Examples]<\/a><\/strong><\/li>\n<li><strong><a class=\"in-cell-link\" href=\"https:\/\/linuxsimply.com\/apt-command-in-linux\/\" target=\"_blank\" rel=\"noopener\">The \u201capt\u201d Command in Linux [13+ Practical Examples]<\/a><\/strong><\/li>\n<li><strong><a class=\"in-cell-link\" href=\"https:\/\/linuxsimply.com\/top-command-in-linux\/\" target=\"_blank\" rel=\"noopener\">The &#8220;top&#8221; Command in Linux [8 Practical Examples]<\/a><\/strong><\/li>\n<li><strong><a class=\"in-cell-link\" href=\"https:\/\/linuxsimply.com\/htop-command-in-linux\/\" target=\"_blank\" rel=\"noopener\">The &#8220;htop&#8221; Command in Linux [7 Practical Examples]<\/a><\/strong><\/li>\n<li><strong><a class=\"in-cell-link\" href=\"https:\/\/linuxsimply.com\/enable-command-in-linux\/\" target=\"_blank\" rel=\"noopener\">The \u201cenable\u201d Command in Linux [6 Practical Examples]<\/a><\/strong><\/li>\n<\/ul>\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;4142&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;The \u201cdmesg\u201d Command in Linux [7+ Practical Examples]&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>The dmesg command in Linux \u00a0is used to display and control the Kernel Ring Buffer messages. You can use this &#8230; <\/p>\n<p class=\"read-more-container\"><a title=\"The \u201cdmesg\u201d Command in Linux [7+ Practical Examples]\" class=\"read-more button\" href=\"https:\/\/linuxsimply.com\/dmesg-command-in-linux\/#more-4142\" aria-label=\"Read more about The \u201cdmesg\u201d Command in Linux [7+ Practical Examples]\">Read more<\/a><\/p>\n","protected":false},"author":314896,"featured_media":4157,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11],"tags":[51],"class_list":["post-4142","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-linux-commands","tag-system-commands","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>The \u201cdmesg\u201d Command in Linux [7+ Practical Examples]<\/title>\n<meta name=\"description\" content=\"The dmesg command in Linux displays the Kernel Ring Buffer messages in the terminal. Users can monitor and solve issues using this command.\" \/>\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\/dmesg-command-in-linux\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"The \u201cdmesg\u201d Command in Linux [7+ Practical Examples]\" \/>\n<meta property=\"og:description\" content=\"The dmesg command in Linux displays the Kernel Ring Buffer messages in the terminal. Users can monitor and solve issues using this command.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/linuxsimply.com\/dmesg-command-in-linux\/\" \/>\n<meta property=\"og:site_name\" content=\"LinuxSimply\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/profile.php?id=100005994046772&amp;mibextid=ZbWKwL\" \/>\n<meta property=\"article:published_time\" content=\"2023-01-22T08:14:57+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-08-31T07:13:31+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/dmesg-command-in-linux.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=\"Anonnya Ghosh\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Anonnya Ghosh\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"11 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/dmesg-command-in-linux\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/dmesg-command-in-linux\\\/\"},\"author\":{\"name\":\"Anonnya Ghosh\",\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/#\\\/schema\\\/person\\\/b53a69b64755f081b3c5951d72ba9c7c\"},\"headline\":\"The \u201cdmesg\u201d Command in Linux [7+ Practical Examples]\",\"datePublished\":\"2023-01-22T08:14:57+00:00\",\"dateModified\":\"2023-08-31T07:13:31+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/dmesg-command-in-linux\\\/\"},\"wordCount\":1900,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/dmesg-command-in-linux\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/linuxsimply.com\\\/wp-content\\\/uploads\\\/2023\\\/01\\\/dmesg-command-in-linux.png\",\"keywords\":[\"system commands\"],\"articleSection\":[\"Linux Commands\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/linuxsimply.com\\\/dmesg-command-in-linux\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/dmesg-command-in-linux\\\/\",\"url\":\"https:\\\/\\\/linuxsimply.com\\\/dmesg-command-in-linux\\\/\",\"name\":\"The \u201cdmesg\u201d Command in Linux [7+ Practical Examples]\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/dmesg-command-in-linux\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/dmesg-command-in-linux\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/linuxsimply.com\\\/wp-content\\\/uploads\\\/2023\\\/01\\\/dmesg-command-in-linux.png\",\"datePublished\":\"2023-01-22T08:14:57+00:00\",\"dateModified\":\"2023-08-31T07:13:31+00:00\",\"description\":\"The dmesg command in Linux displays the Kernel Ring Buffer messages in the terminal. Users can monitor and solve issues using this command.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/dmesg-command-in-linux\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/linuxsimply.com\\\/dmesg-command-in-linux\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/dmesg-command-in-linux\\\/#primaryimage\",\"url\":\"https:\\\/\\\/linuxsimply.com\\\/wp-content\\\/uploads\\\/2023\\\/01\\\/dmesg-command-in-linux.png\",\"contentUrl\":\"https:\\\/\\\/linuxsimply.com\\\/wp-content\\\/uploads\\\/2023\\\/01\\\/dmesg-command-in-linux.png\",\"width\":400,\"height\":400,\"caption\":\"dmesg command in linux.\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/dmesg-command-in-linux\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/linuxsimply.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"The \u201cdmesg\u201d Command in Linux [7+ Practical Examples]\"}]},{\"@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\\\/b53a69b64755f081b3c5951d72ba9c7c\",\"name\":\"Anonnya Ghosh\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/wp-content\\\/uploads\\\/2023\\\/09\\\/Anonnya-Ghosh-II-96x96.png\",\"url\":\"https:\\\/\\\/linuxsimply.com\\\/wp-content\\\/uploads\\\/2023\\\/09\\\/Anonnya-Ghosh-II-96x96.png\",\"contentUrl\":\"https:\\\/\\\/linuxsimply.com\\\/wp-content\\\/uploads\\\/2023\\\/09\\\/Anonnya-Ghosh-II-96x96.png\",\"caption\":\"Anonnya Ghosh\"},\"description\":\"Hello there! I am Anonnya Ghosh, a Computer Science and Engineering graduate from Ahsanullah University of Science and Technology (AUST). Currently, I am working as a Linux Content Developer Executive at SOFTEKO. The strong bond between Linux and cybersecurity drives me to explore this world of open-source architecture. I aspire to learn new things further and contribute to the field of CS with my experience. Read Full Bio\",\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/profile.php?id=100005994046772&mibextid=ZbWKwL\",\"https:\\\/\\\/www.linkedin.com\\\/in\\\/anonnya-ghosh-6a934b211\"],\"url\":\"https:\\\/\\\/linuxsimply.com\\\/author\\\/anonya\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"The \u201cdmesg\u201d Command in Linux [7+ Practical Examples]","description":"The dmesg command in Linux displays the Kernel Ring Buffer messages in the terminal. Users can monitor and solve issues using this command.","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\/dmesg-command-in-linux\/","og_locale":"en_US","og_type":"article","og_title":"The \u201cdmesg\u201d Command in Linux [7+ Practical Examples]","og_description":"The dmesg command in Linux displays the Kernel Ring Buffer messages in the terminal. Users can monitor and solve issues using this command.","og_url":"https:\/\/linuxsimply.com\/dmesg-command-in-linux\/","og_site_name":"LinuxSimply","article_author":"https:\/\/www.facebook.com\/profile.php?id=100005994046772&mibextid=ZbWKwL","article_published_time":"2023-01-22T08:14:57+00:00","article_modified_time":"2023-08-31T07:13:31+00:00","og_image":[{"width":400,"height":400,"url":"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/dmesg-command-in-linux.png","type":"image\/png"}],"author":"Anonnya Ghosh","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Anonnya Ghosh","Est. reading time":"11 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/linuxsimply.com\/dmesg-command-in-linux\/#article","isPartOf":{"@id":"https:\/\/linuxsimply.com\/dmesg-command-in-linux\/"},"author":{"name":"Anonnya Ghosh","@id":"https:\/\/linuxsimply.com\/#\/schema\/person\/b53a69b64755f081b3c5951d72ba9c7c"},"headline":"The \u201cdmesg\u201d Command in Linux [7+ Practical Examples]","datePublished":"2023-01-22T08:14:57+00:00","dateModified":"2023-08-31T07:13:31+00:00","mainEntityOfPage":{"@id":"https:\/\/linuxsimply.com\/dmesg-command-in-linux\/"},"wordCount":1900,"commentCount":0,"publisher":{"@id":"https:\/\/linuxsimply.com\/#organization"},"image":{"@id":"https:\/\/linuxsimply.com\/dmesg-command-in-linux\/#primaryimage"},"thumbnailUrl":"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/dmesg-command-in-linux.png","keywords":["system commands"],"articleSection":["Linux Commands"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/linuxsimply.com\/dmesg-command-in-linux\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/linuxsimply.com\/dmesg-command-in-linux\/","url":"https:\/\/linuxsimply.com\/dmesg-command-in-linux\/","name":"The \u201cdmesg\u201d Command in Linux [7+ Practical Examples]","isPartOf":{"@id":"https:\/\/linuxsimply.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/linuxsimply.com\/dmesg-command-in-linux\/#primaryimage"},"image":{"@id":"https:\/\/linuxsimply.com\/dmesg-command-in-linux\/#primaryimage"},"thumbnailUrl":"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/dmesg-command-in-linux.png","datePublished":"2023-01-22T08:14:57+00:00","dateModified":"2023-08-31T07:13:31+00:00","description":"The dmesg command in Linux displays the Kernel Ring Buffer messages in the terminal. Users can monitor and solve issues using this command.","breadcrumb":{"@id":"https:\/\/linuxsimply.com\/dmesg-command-in-linux\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/linuxsimply.com\/dmesg-command-in-linux\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/linuxsimply.com\/dmesg-command-in-linux\/#primaryimage","url":"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/dmesg-command-in-linux.png","contentUrl":"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/dmesg-command-in-linux.png","width":400,"height":400,"caption":"dmesg command in linux."},{"@type":"BreadcrumbList","@id":"https:\/\/linuxsimply.com\/dmesg-command-in-linux\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/linuxsimply.com\/"},{"@type":"ListItem","position":2,"name":"The \u201cdmesg\u201d Command in Linux [7+ Practical Examples]"}]},{"@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\/b53a69b64755f081b3c5951d72ba9c7c","name":"Anonnya Ghosh","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/09\/Anonnya-Ghosh-II-96x96.png","url":"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/09\/Anonnya-Ghosh-II-96x96.png","contentUrl":"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/09\/Anonnya-Ghosh-II-96x96.png","caption":"Anonnya Ghosh"},"description":"Hello there! I am Anonnya Ghosh, a Computer Science and Engineering graduate from Ahsanullah University of Science and Technology (AUST). Currently, I am working as a Linux Content Developer Executive at SOFTEKO. The strong bond between Linux and cybersecurity drives me to explore this world of open-source architecture. I aspire to learn new things further and contribute to the field of CS with my experience. Read Full Bio","sameAs":["https:\/\/www.facebook.com\/profile.php?id=100005994046772&mibextid=ZbWKwL","https:\/\/www.linkedin.com\/in\/anonnya-ghosh-6a934b211"],"url":"https:\/\/linuxsimply.com\/author\/anonya\/"}]}},"_links":{"self":[{"href":"https:\/\/linuxsimply.com\/wp-json\/wp\/v2\/posts\/4142","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\/314896"}],"replies":[{"embeddable":true,"href":"https:\/\/linuxsimply.com\/wp-json\/wp\/v2\/comments?post=4142"}],"version-history":[{"count":0,"href":"https:\/\/linuxsimply.com\/wp-json\/wp\/v2\/posts\/4142\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/linuxsimply.com\/wp-json\/wp\/v2\/media\/4157"}],"wp:attachment":[{"href":"https:\/\/linuxsimply.com\/wp-json\/wp\/v2\/media?parent=4142"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/linuxsimply.com\/wp-json\/wp\/v2\/categories?post=4142"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/linuxsimply.com\/wp-json\/wp\/v2\/tags?post=4142"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}