

{"id":109421,"date":"2022-05-20T09:00:50","date_gmt":"2022-05-20T03:30:50","guid":{"rendered":"https:\/\/data-flair.training\/blogs\/?p=109421"},"modified":"2022-05-20T09:56:13","modified_gmt":"2022-05-20T04:26:13","slug":"dmesg-command-in-linux","status":"publish","type":"post","link":"https:\/\/data-flair.training\/blogs\/dmesg-command-in-linux\/","title":{"rendered":"DMESG Command in Linux"},"content":{"rendered":"<p>In this article, you will learn about the dmesg tool. We will go through what dmesg is, why it is used, the different options used with dmesg, and also look at some practical examples using the Linux dmesg command.<\/p>\n<h3>What is dmesg?<\/h3>\n<p>Dmesg is the acronym for diagnostic message. Dmesg is a command-line-based utility in Linux that displays kernel-related messages retrieved from the kernel ring buffer.<\/p>\n<p>During the booting process of a system, a number of messages are displayed on the screen where we can see hardware devices detected by a kernel. These messages are very important for diagnosing purposes in case of a device failure<\/p>\n<p>When we connect or disconnect hardware devices on the system, and using dmesg we can detect or disconnect information on the fly. In fact, when we execute the dmesg command in the terminal, all the messages received from the kernel ring buffer are displayed on the screen.<\/p>\n<p>Dmesg prints the message buffer of the kernel. This output message is produced by the device drivers. It is used to control the kernel ring buffer.<\/p>\n<p>The diagnostic process for a failed device mostly begins by inspecting the dmesg output from the kernel identification message to the point where the boot process concludes.<\/p>\n<h3>How does the kernel ring buffer work?<\/h3>\n<p>Before we begin, let us set aside a very common question: are bootup and startup the same? NOPE! They are 2 very distinct phases of the sequence of events that take place when a computer is powered on. Let us look into each process a little deeper.<\/p>\n<h4>1. Bootup<\/h4>\n<p>The bootup process takes the initialization of the system to the point where the kernel gets loaded into the memory and connects to the initial ram<\/p>\n<h4>2. Startup<\/h4>\n<p>The startup process picks up where the boot-up finishes. It completes the process of initialization of the operating system. The initial steps include logging into daemons, such as syslogd. To avoid losing error messages from this phase of initialization the kernel contains a ring buffer that it uses a message store.<\/p>\n<p>The ring buffer is a space in the device&#8217;s memory reserved for messages. It is mostly of fixed size and simple in design.<\/p>\n<h3>Dmesg while booting<\/h3>\n<p>When booting, a computer loads its kernel into memory. During this process, the device drivers present in the kernel are set up to drive the hardware connected.<\/p>\n<p>These drivers along with other elements within the kernel may produce messages reporting both the presence of modules and the values of any parameters adopted. The dmesg command allows the review of such messages in a controlled manner.<\/p>\n<h3>Dmesg after booting<\/h3>\n<p>Even after full boot-up of the system, the kernel may sometimes produce further diagnostic messages, for example when the input\/output devices encounter errors or the USB devices are hot-plugged. Dmesg helps us to review these messages at a later time<\/p>\n<h3>Syntax of Linux dmesg command<\/h3>\n<p>Before we look into the option or practical examples of dmesg, let us look into the syntax, the dmesg command is used.<\/p>\n<p>The basic dmesg command syntax is:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">dmesg &lt;option&gt;<\/pre>\n<h3>Options used with Linux dmesg command<\/h3>\n<p>The syntax consists of a field where we can enter various options to get desired outputs. Let us take a look at the option used with dmesg.<\/p>\n<h4>1. -C<\/h4>\n<p>This option clears the ring buffer. We write it as \u201c&#8211;clear\u201d<\/p>\n<h4>2. -c<\/h4>\n<p>This option prints the ring buffer contents and then clears the ring buffer<\/p>\n<h4>3. -f<\/h4>\n<p>This option restricts the output to the specified command separated facility<\/p>\n<h4>4. -H<\/h4>\n<p>This option enables human-readable output in a neat format.<\/p>\n<h4>5. -L<\/h4>\n<p>This option adds color to the output<\/p>\n<h4>6. -l<\/h4>\n<p>This command restricts the output to the specified comma-separated list level.<\/p>\n<h4>7. &#8211;noescape<\/h4>\n<p>This option disables the feature of automatically escaping unprintable and potentially unsafe characters<\/p>\n<h4>8. -S<\/h4>\n<p>This option instructs dmesg to use the Syslog kernel interface to read kernel messages.<\/p>\n<h4>9. -s &lt;size&gt;<\/h4>\n<p>This option uses the specified buffer size to query the kernel ring buffer. If no buffer size is specified, it takes the default value, which is 16392.<\/p>\n<h4>10. -T<\/h4>\n<p>This option prints human-readable timestamps.<\/p>\n<h4>11. -t<\/h4>\n<p>This option instructs dmesg not to print kernel timestamps<\/p>\n<h4>12. &#8211;time-format &lt;format&gt;<\/h4>\n<p>This option prints the timestamps using the format you specified. The formats this option accepts are ctime, reltime, delta, and iso.<\/p>\n<h4>13. -w<\/h4>\n<p>This option keeps dmesg running and waiting for new messages.<\/p>\n<h4>14. -x<\/h4>\n<p>This option decodes the facility and level numbers to human-readable prefixes.<\/p>\n<h4>15. -h<\/h4>\n<p>This option displays the help file with all the available options<\/p>\n<p>If you get stuck anytime anywhere using the dmesg command, you can always time \u201cdmesg -h\u201d or \u201cdmesg &#8211;help\u201d or even ask for the manual by typing \u201cman dmesg\u201d in the terminal<\/p>\n<p>Now that you know the syntax of dmesg and the options used along with the syntax, let us see some practical examples of the dmesg tool.<\/p>\n<h3>Displaying all messages from the ring buffer<\/h3>\n<p>To display all the messages from the kernel ring buffer, simply run a standard dmesg command with no options at all<\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/05\/displaying-all-messages-from-the-ring-buffer.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-109488\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/05\/displaying-all-messages-from-the-ring-buffer.webp\" alt=\"displaying all messages from the ring buffer\" width=\"1244\" height=\"1268\" \/><\/a><\/p>\n<h3>Displaying fewer messages from the ring buffer<\/h3>\n<p>The regular dmesg output screen is very very long. For easier navigation and better readability, you can use \u201c| less\u201d like this:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">sudo dmesg | less<\/pre>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/05\/displaying-fewer-messages-from-the-ring-buffer.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-109489\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/05\/displaying-fewer-messages-from-the-ring-buffer.webp\" alt=\"displaying fewer messages from the ring buffer\" width=\"1364\" height=\"477\" \/><\/a><\/p>\n<p>It is not noticeable in the picture, try it out for yourself to understand how long the screen is.<\/p>\n<h3>Displaying colored messages<\/h3>\n<p>By default the output when you run the simple \u201csudo dmesg\u201d command is already colored, if at all it is not colored, you can use the command<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">\u201csudo dmesg\u201d<\/pre>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/05\/displaying-colored-messages.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-109490\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/05\/displaying-colored-messages.webp\" alt=\"displaying colored messages\" width=\"1480\" height=\"537\" \/><\/a><\/p>\n<p>You can turn the color off by using the option &#8211;color = never, as this will print everything in white.<\/p>\n<h3>Displaying messages as they arrive<\/h3>\n<p>To get real-time information from the kernel ring buffer use the option<\/p>\n<p>\u201c&#8211; follow\u201d. This option instructs the command to wait for new messages related to the hardware after system startup<\/p>\n<p>The new messages from the kernel will show up at the bottom of the screen (at the end and not the top). If you want to exit from the process, press \u201cctrl\u201d + \u201cc\u201d<\/p>\n<h3>Searching for a specific term in the messages<\/h3>\n<p>As we saw, the output of the dmesg is very long. If you want to search for a specific term, you can use the help of the grep command, you can put both commands using a pipe symbol like this: sudo dmesg | grep -i &lt;word&gt;<\/p>\n<p>The pipe symbol takes the output of the dmesg command and sends it as the input to the grep command. We used the option \u201d-i\u201d to make the grep command case insensitive.<\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/05\/searching-for-a-specific-term-in-messages.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-109492\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/05\/searching-for-a-specific-term-in-messages.webp\" alt=\"searching for a specific term in messages\" width=\"1187\" height=\"240\" \/><\/a><\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/05\/searching-for-a-specific-term-in-the-messages.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-109491\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/05\/searching-for-a-specific-term-in-the-messages.webp\" alt=\"searching for a specific term in the messages\" width=\"1256\" height=\"174\" \/><\/a><\/p>\n<h3>Enabling timestamps in dmesg logs<\/h3>\n<p>You can enable timestamps in the dmesg output by adding the option \u201c-H\u201d. This option produces human-readable output.<\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/05\/enabling-timestamps-in-dmesg-logs.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-109493\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/05\/enabling-timestamps-in-dmesg-logs.webp\" alt=\"enabling timestamps in dmesg logs\" width=\"1392\" height=\"744\" \/><\/a><\/p>\n<h3>Enabling Human readable timestamps<\/h3>\n<p>To enable human-readable timestamps use the option \u201c-T\u201d, if you look at the timestamps in the above picture, they make absolutely no sense. The timestamps in the above picture show the difference in time from when the boot-up happened<\/p>\n<p>To get precise, yet understandable timestamps in the format of the day, month, date time, and year, we use the option \u201c-P\u201d instead of \u201c-H\u201d<\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/05\/enabling-human-readable-timestamps.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-109494\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/05\/enabling-human-readable-timestamps.webp\" alt=\"enabling human readable timestamps\" width=\"1757\" height=\"531\" \/><\/a><\/p>\n<h3>Choosing timestamp format<\/h3>\n<p>You can also set the time in a specific format using the option \u201c&#8211;time-format=&lt;format&gt;\u201d The formats this option accepts are ctime, reltime, delta, and iso.<\/p>\n<p>For example, if I write the command \u201csudo dmesg &#8211;time-format=iso\u201d<\/p>\n<p>The timestamp is now in the format:<\/p>\n<p>YYYY-MM-DD&lt;T&gt;HH:MM:SS&lt;microsecond&gt;&lt;timezone offset from UTC&gt;<\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/05\/choosing-timestamp-format.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-109495\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/05\/choosing-timestamp-format.webp\" alt=\"choosing timestamp format\" width=\"1380\" height=\"726\" \/><\/a><\/p>\n<h3>Filtering dmesg log by a specific facility<\/h3>\n<p>You can filter the dmesg output to a specific category using the -f option. The system groups messages in the kernel ring buffer into the following facilities (categories):<\/p>\n<ul>\n<li>Kern &#8211; Kernel messages.<\/li>\n<li>User &#8211; User-level messages.<\/li>\n<li>Mail &#8211; Mail system messages.<\/li>\n<li>Daemon &#8211; Messages about system daemons.<\/li>\n<li>Auth &#8211; Authorization messages.<\/li>\n<li>Syslog &#8211; Internal Syslog messages.<\/li>\n<li>Lpr &#8211; Line printer subsystem messages.<\/li>\n<li>News &#8211; Network news subsystem messages.<\/li>\n<\/ul>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/05\/filtering-dmesg-log-by-a-specific-facility.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-109496\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/05\/filtering-dmesg-log-by-a-specific-facility.webp\" alt=\"filtering dmesg log by a specific facility\" width=\"1386\" height=\"155\" \/><\/a><\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/05\/filtering-dmesg-log-by-specific-facility.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-109497\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/05\/filtering-dmesg-log-by-specific-facility.webp\" alt=\"filtering dmesg log by specific facility\" width=\"1364\" height=\"1024\" \/><\/a><\/p>\n<h3>Filtering log levels<\/h3>\n<p>You can filter the dmesg log to display only the messages that match a certain level using the \u201c-l\u201d option, followed by the level name. The available levels are:<\/p>\n<ul>\n<li>Emerg &#8211; Emergency messages.<\/li>\n<li>Alert &#8211; Alerts requiring immediate action.<\/li>\n<li>Crit &#8211; Critical conditions.<\/li>\n<li>Err &#8211; Error messages.<\/li>\n<li>Warn &#8211; Warning messages.<\/li>\n<li>Notice &#8211; Normal but significant conditions.<\/li>\n<li>Info &#8211; Informational messages.<\/li>\n<li>Debug &#8211; Debugging-level messages.<\/li>\n<\/ul>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/05\/filtering-log-levels.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-109498\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/05\/filtering-log-levels.webp\" alt=\"filtering log levels\" width=\"1517\" height=\"462\" \/><\/a><\/p>\n<p>You can also Combine multiple levels in a comma-separated list.<\/p>\n<p>&nbsp;<\/p>\n<h3>Checking for a CD drive<\/h3>\n<p>To check if the remote machine is equipped with a CD drive, you inspect the buffer message log. You can do the same by typing the command:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">\u201c sudo dmesg | grep -iE \u2018cdrom|dvd|cd\/rw|cd-rom\u2019 \u201d<\/pre>\n<h3>Displaying the first \u201cn\u201d messages<\/h3>\n<p>We have already seen that the message log is very very long. To get only the first n number of messages from the dmesg log we use \u201chead\u201d. For exmple the command \u201csudo dmesg | head -5\u201d will give the first 5 messages.<\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/05\/displaying-the-first-messages.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-109500\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/05\/displaying-the-first-messages.webp\" alt=\"displaying the first messages\" width=\"1426\" height=\"303\" \/><\/a><\/p>\n<h3>Displaying the last \u201cn\u201d messages<\/h3>\n<p>Similarly, we can use \u201ctail\u201d to retrieve the last \u201cn\u201d messages<\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/05\/displaying-the-last-messages.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-109501\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/05\/displaying-the-last-messages.webp\" alt=\"displaying the last messages\" width=\"1656\" height=\"350\" \/><\/a><\/p>\n<h3>Combining facility and level<\/h3>\n<p>The \u201c-x\u201d option shows the facility and level as human-readable prefixes to each line.<\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/05\/combining-facility-and-level.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-109499\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/05\/combining-facility-and-level.webp\" alt=\"combining facility and level\" width=\"1389\" height=\"390\" \/><\/a><\/p>\n<h3>Monitoring dmesg in real time<\/h3>\n<p>This feature is only available in some distros of Linux. To monitor the messages in the kernel in real time, we can use the watch command as follows: watch \u201cdmesg\u201d<\/p>\n<p>You can also pipe this command with many other commands like grep, head, tail or sort. Here is an example:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">watch \u201cdmesg | tail -10\u201d<\/pre>\n<p>The above command will print the last 10 messages in real-time.<\/p>\n<h3>Read and clear messages<\/h3>\n<p>To read and clear messages in the dmesg log use the option \u201c-c\u201d. This option lets you clear the dmesg log after printing it.<\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/05\/read-and-clear-messages.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-109502\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/05\/read-and-clear-messages.webp\" alt=\"read and clear messages\" width=\"552\" height=\"79\" \/><\/a><\/p>\n<p>The first time you run the command \u201csudo dmesg -c\u201d, the entire message log will be printed on the screen and also deleted simultaneously. You can the sam by running a dmesg command and it will just be a blank screen as every message has been deleted.<\/p>\n<h3>Summary<\/h3>\n<p>As you have seen, the dmesg is a really simple yet powerful command in Linux that lets you check the messages which the kernel sends to the ring buffer about the problems when the input\/output devices encounter errors or the USB devices are hot-plugged<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this article, you will learn about the dmesg tool. We will go through what dmesg is, why it is used, the different options used with dmesg, and also look at some practical examples&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":109487,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[35],"tags":[26894],"class_list":["post-109421","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-linux","tag-dmesg-command-in-linux"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>DMESG Command in Linux - DataFlair<\/title>\n<meta name=\"description\" content=\"Learn what is dmesg command in Linux, why it is used, its different options with their syntax and practical examples.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/data-flair.training\/blogs\/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=\"DMESG Command in Linux - DataFlair\" \/>\n<meta property=\"og:description\" content=\"Learn what is dmesg command in Linux, why it is used, its different options with their syntax and practical examples.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/data-flair.training\/blogs\/dmesg-command-in-linux\/\" \/>\n<meta property=\"og:site_name\" content=\"DataFlair\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/DataFlairWS\/\" \/>\n<meta property=\"article:published_time\" content=\"2022-05-20T03:30:50+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-05-20T04:26:13+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/05\/dmesg-in-linux.webp\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"628\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/webp\" \/>\n<meta name=\"author\" content=\"DataFlair Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@DataFlairWS\" \/>\n<meta name=\"twitter:site\" content=\"@DataFlairWS\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"DataFlair Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"11 minutes\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"DMESG Command in Linux - DataFlair","description":"Learn what is dmesg command in Linux, why it is used, its different options with their syntax and practical examples.","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:\/\/data-flair.training\/blogs\/dmesg-command-in-linux\/","og_locale":"en_US","og_type":"article","og_title":"DMESG Command in Linux - DataFlair","og_description":"Learn what is dmesg command in Linux, why it is used, its different options with their syntax and practical examples.","og_url":"https:\/\/data-flair.training\/blogs\/dmesg-command-in-linux\/","og_site_name":"DataFlair","article_publisher":"https:\/\/www.facebook.com\/DataFlairWS\/","article_published_time":"2022-05-20T03:30:50+00:00","article_modified_time":"2022-05-20T04:26:13+00:00","og_image":[{"width":1200,"height":628,"url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/05\/dmesg-in-linux.webp","type":"image\/webp"}],"author":"DataFlair Team","twitter_card":"summary_large_image","twitter_creator":"@DataFlairWS","twitter_site":"@DataFlairWS","twitter_misc":{"Written by":"DataFlair Team","Est. reading time":"11 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/data-flair.training\/blogs\/dmesg-command-in-linux\/#article","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/dmesg-command-in-linux\/"},"author":{"name":"DataFlair Team","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/person\/b49855299264df5e27e3ec6c2cd9fde9"},"headline":"DMESG Command in Linux","datePublished":"2022-05-20T03:30:50+00:00","dateModified":"2022-05-20T04:26:13+00:00","mainEntityOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/dmesg-command-in-linux\/"},"wordCount":1693,"commentCount":0,"publisher":{"@id":"https:\/\/data-flair.training\/blogs\/#organization"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/dmesg-command-in-linux\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/05\/dmesg-in-linux.webp","keywords":["DMESG Command in Linux"],"articleSection":["Linux Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/data-flair.training\/blogs\/dmesg-command-in-linux\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/data-flair.training\/blogs\/dmesg-command-in-linux\/","url":"https:\/\/data-flair.training\/blogs\/dmesg-command-in-linux\/","name":"DMESG Command in Linux - DataFlair","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/#website"},"primaryImageOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/dmesg-command-in-linux\/#primaryimage"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/dmesg-command-in-linux\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/05\/dmesg-in-linux.webp","datePublished":"2022-05-20T03:30:50+00:00","dateModified":"2022-05-20T04:26:13+00:00","description":"Learn what is dmesg command in Linux, why it is used, its different options with their syntax and practical examples.","breadcrumb":{"@id":"https:\/\/data-flair.training\/blogs\/dmesg-command-in-linux\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/data-flair.training\/blogs\/dmesg-command-in-linux\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/data-flair.training\/blogs\/dmesg-command-in-linux\/#primaryimage","url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/05\/dmesg-in-linux.webp","contentUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/05\/dmesg-in-linux.webp","width":1200,"height":628,"caption":"dmesg in linux"},{"@type":"BreadcrumbList","@id":"https:\/\/data-flair.training\/blogs\/dmesg-command-in-linux\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Blog Home","item":"https:\/\/data-flair.training\/blogs\/"},{"@type":"ListItem","position":2,"name":"Linux Tutorials","item":"https:\/\/data-flair.training\/blogs\/category\/linux\/"},{"@type":"ListItem","position":3,"name":"DMESG Command in Linux"}]},{"@type":"WebSite","@id":"https:\/\/data-flair.training\/blogs\/#website","url":"https:\/\/data-flair.training\/blogs\/","name":"DataFlair","description":"Learn Today. Lead Tomorrow.","publisher":{"@id":"https:\/\/data-flair.training\/blogs\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/data-flair.training\/blogs\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/data-flair.training\/blogs\/#organization","name":"DataFlair","url":"https:\/\/data-flair.training\/blogs\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/logo\/image\/","url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/07\/Data-Flair.png","contentUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/07\/Data-Flair.png","width":106,"height":48,"caption":"DataFlair"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/DataFlairWS\/","https:\/\/x.com\/DataFlairWS","https:\/\/www.linkedin.com\/company\/dataflair-web-services-pvt-ltd\/","https:\/\/www.youtube.com\/user\/DataFlairWS"]},{"@type":"Person","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/person\/b49855299264df5e27e3ec6c2cd9fde9","name":"DataFlair Team","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/ef46b745ddad2fad690af626c6ef29b91809ad0a9f5ef398d07817d8cad042f5?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/ef46b745ddad2fad690af626c6ef29b91809ad0a9f5ef398d07817d8cad042f5?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/ef46b745ddad2fad690af626c6ef29b91809ad0a9f5ef398d07817d8cad042f5?s=96&d=mm&r=g","caption":"DataFlair Team"},"description":"DataFlair Team is a group of passionate educators and industry experts dedicated to providing high-quality online learning resources on programming, Java, Python, C++, DSA, AI, ML, data Science, Android, Flutter, MERN, Web Development, and technology. With years of experience in the field, the team aims to simplify complex topics and help learners advance their careers. At DataFlair, we believe in empowering students and professionals with the knowledge and skills needed to thrive in today\u2019s fast-paced tech industry. Follow us for Free courses, expert insights, tutorials, and practical tips to boost your learning journey.","url":"https:\/\/data-flair.training\/blogs\/author\/datafbdad\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/109421","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/comments?post=109421"}],"version-history":[{"count":4,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/109421\/revisions"}],"predecessor-version":[{"id":109967,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/109421\/revisions\/109967"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media\/109487"}],"wp:attachment":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media?parent=109421"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/categories?post=109421"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/tags?post=109421"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}