Exam XK0-005 All QuestionsBrowse all questions from this exam
Question 19

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?

    Correct Answer: D

    To add a tag for the API so end users can connect, the systems administrator needs to set a specific identifier or hostname for the web server that can be used by end users. Using the 'hostnamectl' command is appropriate for setting hostnames on a Linux system. The option 'hostnamectl set-hostname Comptia-WebNode --transient' sets a temporary hostname, 'Comptia-WebNode', which will be valid until the next reboot. This temporary hostname can act as a tag for the web server, making it easier for end users to connect using this identifier.

Discussion
linux_adminOption: C

The hostnamectl set-hostname Comptia-WebNode -H <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="96e4f9f9e2d6a7afa4b8a7a0aeb8a4b8a7a2">[email protected]</a> command sets the hostname of a Linux system. Here's what each option does: set-hostname Comptia-WebNode: The set-hostname option sets the hostname of the system to "Comptia-WebNode". -H <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="f684999982b6c7cfc4d8c7c0ced8c4d8c7c2">[email protected]</a>: The -H option is used to specify the remote host to connect to. In this case, the administrator is connecting to the remote host with the IP address 192.168.2.14 as the root user. This command sets the hostname of the remote host with IP address 192.168.2.14 to "Comptia-WebNode" as the root user. The new hostname will persist across reboots unless the administrator changes it again in the future.

linux_admin

In the context of the question, a "tag" refers to a label or identifier that is used to distinguish or identify a specific object, in this case, the web server. The tag is used to make it easier for end users to connect to the web server, as they can use the tag instead of an IP address or a hostname. The tag is typically a short and descriptive string that represents the web server, such as "Comptia-WebNode" in the example.

ryanzouOption: C

To execute a hostnamectl command on a remote system, use the -H, --host. That is change a tag remotely in my view.

yomeboOption: C

Honestly I just went for C since its the only one with an IP address..otherwise I dont really know whats going on

BlatzzyOption: D

For adding a tag to the API, you typically don't use the hostnamectl command. Instead, you might want to consider adding a label or tag directly related to the API functionality. However, among the given options, the most relevant one would be: D. hostnamectl set-hostname Comptia-WebNode --transient This sets the transient (temporary) hostname to "Comptia-WebNode". However, keep in mind that this command is more related to the system's hostname configuration rather than specifically tagging an API. For tagging an API, you might want to consider using metadata or labels associated with the API service itself, which is typically done in the application or service configuration rather than at the system level.

TheRealManishOption: D

What the heck is the question asking? Answer C, doesn't add a "tag". it assigned a hostname to a remote server. Does anyone understand this question?

Nvoid

ya probably not on the test, or the question/answers will be different to actually make sense.