A systems administrator is required to tag a web server for - CompTIA Linux + XK0-005

Question

A systems administrator is required to tag a web server for API connectivity.
Which of the following commands will accomplish this?
 

Answers
  1. correct
Explanation

The Correct Answer is: d. hostnamectl set-hostname Comptia-WebNode --transient

The --transient flag in hostnamectl set-hostname sets a temporary hostname for the current boot session. This is often useful for tagging systems such as web servers in environments like API connectivity where persistent reboots aren't required for naming. 

The transient hostname is recognized by system APIs and can be effective in identifying a system uniquely within temporary environments like testing or dynamic deployment setups, without altering permanent configurations.

Why the Other Choices Are Incorrect :

  • a. hostnamectl status --no-ask-password: This command only retrieves the current hostname and related system information. The --no-ask-password flag avoids password prompts, but it doesn’t set or modify the hostname, making it ineffective for tagging a server for API use.
  • b. hostnamectl set-hostname "$(perl -le "print" "A" x 86)": This sets the hostname to an 86-character string, which is not compliant with hostname length limits (usually 64 characters). It may fail or result in an invalid hostname that could break connectivity or service registration.
  • c. hostnamectl set-hostname Comptia-WebNode -H root@192.168.2.14: The -H flag is for remote host management via systemd, but it requires systemd-hostnamed to be active on the remote system. This option is overkill and can fail if the environment doesn’t support remote hostnamectl operations or proper SSH permissions.

Related Courses

Discover a range of courses designed to provide you with the knowledge and skills needed to excel in your chosen field.

a prepsaret exam featured image
CompTIA Prep

220-1201 - CompTIA A+ Exam Core 1

Start Course Prep
a prepsaret exam featured image
CompTIA Prep

220-1202 - CompTIA A+ Exam Core 2

Start Course Prep
a prepsaret exam featured image
CompTIA Prep

CompTIA SecurityX CAS-005

Start Course Prep
a prepsaret exam featured image
CompTIA Prep

CompTIA Cloud Essentials+ CLO-002

Start Course Prep
a prepsaret exam featured image
CompTIA Prep

CompTIA Network+ N10-009

Start Course Prep
a prepsaret exam featured image
CompTIA Prep

CompTIA Security+ SY0-701

Start Course Prep
a prepsaret exam featured image
CompTIA Prep

CompTIA Data + DA0-001

Start Course Prep
a prepsaret exam featured image
CompTIA Prep

CompTIA Pentest+

Start Course Prep
a prepsaret exam featured image
CompTIA Prep

CompTIA CySA+ CSO-003

Start Course Prep
a prepsaret exam featured image
CompTIA Prep

CompTIA DataSys+ DS0-001

Start Course Prep
a prepsaret exam featured image
CompTIA Prep

CompTIA Tech+ FC0-U71

Start Course Prep
a prepsaret exam featured image
CompTIA Prep

CompTIA Cloud+ CV0-004

Start Course Prep
a prepsaret exam featured image
CompTIA Prep

CompTIA Server+ SK0-005

Start Course Prep

Easy way to pass your test within a week with prepsaret

You don’t need one month to study and pass your test.
With Prepsaret, it takes you a few days to grasp all the concepts needed to pass your exams

View Courses Offered