LFCS · Question #46
What entry can be added to the syslog.conf file to have all syslog messages generated by a system displayed on console 12?
The correct answer is A. *.* /dev/tty12. To display all syslog messages on console 12, an entry . /dev/tty12 needs to be added to the syslog.conf file. This configuration directs messages from all facilities and all priorities to the specified console device.
Question
Options
- A. /dev/tty12
- B/var/log/messages | /dev/tty12
- C| /dev/tty12
- Dsyslog tty12
- Email.* /dev/tty12
How the community answered
(40 responses)- A90% (36)
- B5% (2)
- C3% (1)
- D3% (1)
Why each option
To display all syslog messages on console 12, an entry `*.* /dev/tty12` needs to be added to the `syslog.conf` file. This configuration directs messages from all facilities and all priorities to the specified console device.
In `syslog.conf`, the `facility.priority` selector `*.*` matches all syslog messages (all facilities, all priorities). Directing these to `/dev/tty12` sends them to the twelfth virtual console.
`/var/log/messages` is a log file path, not a valid `facility.priority` selector, and the pipe symbol is for piping to a program, not directly to a device in this context.
`| /dev/tty12` is incomplete, lacking the `facility.priority` selector at the beginning of the line.
`syslog tty12` is not a valid syntax for a `syslog.conf` entry.
`mail.* /dev/tty12` would only send messages from the `mail` facility to console 12, not all syslog messages as requested.
Concept tested: Syslog configuration (syslog.conf)
Source: https://man7.org/linux/man-pages/man5/syslog.conf.5.html
Topics
Community Discussion
No community discussion yet for this question.