XK0-005 · Question #1500
XK0-005 Question #1500: Real Exam Question with Answer & Explanation
The correct answer is C: hostnamectl set-hostname Comptia-WebNode -H [email protected]. {"question_number": 8, "correct_answer": "C", "explanation": "The hostnamectl set-hostname Comptia-WebNode -H [email protected] command sets the hostname 'Comptia-WebNode' on the remote web server at 192.168.2.14. The -H (or --host) flag tells hostnamectl to perform the operation
Question
A systems administrator created a web server for the company and is required to add a tag for the API so end users can connect. Which of the following would the administrator do to complete this requirement?
Options
- Ahostnamectl status --no-ask-password
- Bhostnamectl set-hostname "$(perl -le "print" "A" x 86)"
- Chostnamectl set-hostname Comptia-WebNode -H [email protected]
- Dhostnamectl set-hostname Comptia-WebNode --transient
Explanation
{"question_number": 8, "correct_answer": "C", "explanation": "The hostnamectl set-hostname Comptia-WebNode -H [email protected] command sets the hostname 'Comptia-WebNode' on the remote web server at 192.168.2.14. The -H (or --host) flag tells hostnamectl to perform the operation on a remote machine via SSH, which is exactly what is needed to tag a remote web server. Option A (hostnamectl status) only displays current hostname info and makes no changes. Option B sets a hostname of 86 repeated 'A' characters, which is impractical and likely invalid. Option D uses --transient, which sets a temporary hostname that is lost on reboot - not a persistent configuration.", "generated_by": "claude-sonnet", "llm_judge_score": 2}
Topics
Community Discussion
No community discussion yet for this question.