0
0
Linux CLIscripting~10 mins

journalctl for systemd logs 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 show all systemd logs.

Linux CLI
journalctl [1]
Drag options to blanks, or click blank then click option'
A-f
B-b
C-u
D--no-pager
Attempts:
3 left
💡 Hint
Common Mistakes
Using '-b' shows logs only from the current boot.
Using '-u' requires a service name and filters logs for that service.
Using '-f' follows logs live but does not show all past logs.
2fill in blank
medium

Complete the command to show logs only for the sshd service.

Linux CLI
journalctl [1] sshd.service
Drag options to blanks, or click blank then click option'
A--since
B-b
C-u
D-f
Attempts:
3 left
💡 Hint
Common Mistakes
Using '-b' shows logs from current boot but not filtered by service.
Using '--since' filters by time, not service.
Using '-f' follows logs live but does not filter by service.
3fill in blank
hard

Fix the error in the command to follow logs live for the nginx service.

Linux CLI
journalctl -u nginx.service [1]
Drag options to blanks, or click blank then click option'
A-f
B--no-pager
C--since today
D-b
Attempts:
3 left
💡 Hint
Common Mistakes
Using '--since today' shows logs only from today but does not follow live.
Using '--no-pager' disables paging but does not follow live.
Using '-b' shows logs from current boot but does not follow live.
4fill in blank
hard

Fill both blanks to show logs from the current boot and disable paging.

Linux CLI
journalctl [1] [2]
Drag options to blanks, or click blank then click option'
A-b
B-u
C--no-pager
D-f
Attempts:
3 left
💡 Hint
Common Mistakes
Using '-u' filters by service, not boot.
Using '-f' follows logs live, not needed here.
5fill in blank
hard

Fill all three blanks to show logs for the cron service since yesterday and follow live.

Linux CLI
journalctl [1] cron.service [2] yesterday [3]
Drag options to blanks, or click blank then click option'
A-u
B--since
C-f
D--no-pager
Attempts:
3 left
💡 Hint
Common Mistakes
Using '-b' instead of '--since' does not filter by time.
Using '--no-pager' disables paging but does not follow live.
Forgetting '-f' means logs won't update live.