0
0
Linux CLIscripting~10 mins

dmesg for kernel messages in Linux CLI - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the command to display the kernel ring buffer messages.

Linux CLI
sudo [1]
Drag options to blanks, or click blank then click option'
Admesg
Btop
Cls
Dcat
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'ls' or 'cat' instead of 'dmesg'.
Forgetting to use 'sudo' when required.
2fill in blank
medium

Complete the command to show kernel messages with human-readable timestamps.

Linux CLI
sudo dmesg [1]
Drag options to blanks, or click blank then click option'
A-n
B-w
C-c
D-T
Attempts:
3 left
💡 Hint
Common Mistakes
Using '-n' which sets the log level.
Using '-c' which clears the buffer after printing.
3fill in blank
hard

Fix the error in the command to continuously watch kernel messages.

Linux CLI
sudo dmesg [1]
Drag options to blanks, or click blank then click option'
A-T
B-n
C-w
D-c
Attempts:
3 left
💡 Hint
Common Mistakes
Using '-c' which clears the buffer instead of watching.
Using '-n' which sets log level, not watching.
4fill in blank
hard

Fill in the blank to filter kernel messages by log level 3 (errors only).

Linux CLI
sudo dmesg [1] 3
Drag options to blanks, or click blank then click option'
A-l
B-T
C-n
D-w
Attempts:
3 left
💡 Hint
Common Mistakes
Using '-n' which sets the console log level but does not filter dmesg output.
Using '-w' which watches messages instead of filtering.
Using '-T' which changes timestamp format.
5fill in blank
hard

Fill all three blanks to clear the kernel ring buffer and then show messages.

Linux CLI
sudo dmesg [1] && sudo dmesg [2] [3]
Drag options to blanks, or click blank then click option'
A-c
B-T
C-w
D-n
Attempts:
3 left
💡 Hint
Common Mistakes
Using '-n' instead of '-w' for watching.
Not clearing before watching.