LX0-104 · 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 direct all syslog messages to console 12, the syslog.conf file requires an entry of . /dev/tty12. This configuration specifies that messages of any facility and any priority level should be sent to the /dev/tty12 device.
Question
Options
- A. /dev/tty12
- B/var/log/messages | /dev/tty12
- C| /dev/tty12
- Dsyslog tty12
- Email.* /dev/tty12
How the community answered
(54 responses)- A83% (45)
- B7% (4)
- C2% (1)
- D2% (1)
- E6% (3)
Why each option
To direct all syslog messages to console 12, the `syslog.conf` file requires an entry of `*.* /dev/tty12`. This configuration specifies that messages of any facility and any priority level should be sent to the `/dev/tty12` device.
In `syslog.conf`, `*.*` specifies all facilities and all priority levels, meaning all syslog messages. `/dev/tty12` is the device path for console 12. This entry correctly directs all system log messages to be displayed on that specific console.
This format is incorrect for `syslog.conf`. `/var/log/messages` is a destination file, not a selector, and the pipe `|` symbol is used for piping to a program, not directly to a console device in this manner for all messages.
This entry is incomplete; it lacks the facility and priority selector on the left side of the configuration line.
This is not the correct syntax for a `syslog.conf` entry; `syslog` and `tty12` are not valid selectors or actions in this format.
`mail.*` would only direct messages from the 'mail' facility to console 12, not 'all syslog messages' as required by the question.
Concept tested: syslog.conf console logging
Source: https://linux.die.net/man/5/syslog.conf
Topics
Community Discussion
No community discussion yet for this question.