XK0-005 · Question #1274
XK0-005 Question #1274: Real Exam Question with Answer & Explanation
The correct answer is C: hostnamectl set-hostname "Server1" --pretty. command to set hostname: hostnamectl three classes of hostname. 1. “static” host name is the traditional hostname, which can be chosen by the user, and is stored in the /etc/hostname file. 2.“transient” hostname is a dynamic host name maintained by the kernel. It is initialized t
Question
A systems administrator clones copies of a Linux VM every time a new Linux server is needed. The administrator notices the command prompt always states localhost.localdomain. Which of the following should the administrator run to have the command prompt consistently labeled as Server1 rather than localhost.localdomain?
Options
- Ahost Server1
- Becho "127.0.0.1 Server1 Server1.localdomain" >> /etc/hosts
- Chostnamectl set-hostname "Server1" --pretty
- Dhostnamectl set-hostname Server1 --transient
- Ehostnamectl set-hostname Server1.localdomain --static
Explanation
command to set hostname: hostnamectl three classes of hostname. 1. “static” host name is the traditional hostname, which can be chosen by the user, and is stored in the /etc/hostname file. 2.“transient” hostname is a dynamic host name maintained by the kernel. It is initialized to the static host name by default, whose value defaults to “localhost”. It can be changed by DHCP or mDNS at runtime. 3. "pretty” hostname is a free-form UTF8 host name for presentation to the user.
Topics
Community Discussion
No community discussion yet for this question.