πŸ”

XK0-005 β€” questions

Page 10 of 14 Β· 263 total questions.

Topic 1 Β· Question 184

A senior Linux administrator has created several scripts that will be used to install common system applications. These scripts are published to a repository to share with the systems team. A junior Linux administrator needs to retrieve the scripts and make them available on a local workstation. Which of the following Git commands should the junior Linux administrator use to accomplish this task?

  • Afetch
  • Bcheckout
  • Cclone (correct answer)
  • Dbranch
Reveal answer & explanation
Correct answer: C

The correct answer is C. Option C: clone

Topic 1 Β· Question 185

Users are reporting that writes on a system configured with SSD drives have been taking longer than expected, but reads do not seem to be affected. A Linux systems administrator is investigating this issue and working on a solution. Which of the following should the administrator do to help solve the issue?

  • ARun the corresponding command to trim the SSD drives. (correct answer)
  • BUse fsck on the filesystem hosted on the SSD drives.
  • CMigrate to high-density SSD drives for increased performance.
  • DReduce the amount of files on the SSD drives.
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: Run the corresponding command to trim the SSD drives.

Topic 1 Β· Question 186

A Linux engineer needs to block an incoming connection from the IP address 2.2.2.2 to a secure shell server and ensure the originating IP address receives a response that a firewall is blocking the connection. Which of the following commands can be used to accomplish this task?

  • Aiptables -A INPUT -p tcp --dport ssh -s 2.2.2.2 -j DROP
  • Biptables -A INPUT -p tcp --dport ssh -s 2.2.2.2 -j RETURN
  • Ciptables -A INPUT -p tcp --dport ssh -s 2.2.2.2 -j REJECT (correct answer)
  • Diptables -A INPUT -p tcp --dport ssh -s 2.2.2.2 -j QUEUE
Reveal answer & explanation
Correct answer: C

The correct answer is C. Option C: iptables -A INPUT -p tcp --dport ssh -s 2.2.2.2 -j REJECT This option keeps traffic private / properly secured as required.

Topic 1 Β· Question 187

A systems administrator detected corruption in the /data file system. Given the following output: Which of the following commands can the administrator use to BEST address this issue?

Exhibit 1 for question 187
  • A
  • B
  • C (correct answer)
  • D
Reveal answer & explanation
Correct answer: C

The correct answer is C.

Topic 1 Β· Question 188

A user reported issues when trying to log into a Linux server. The following outputs were received: Given the outputs above, which of the following is the reason the user is unable to log in to the server?

Exhibit 1 for question 188
  • AUser1 needs to set a long password.
  • BUser1 is in the incorrect group. (correct answer)
  • CThe user1 shell assignment is incorrect.
  • DThe user1 password is expired.
Reveal answer & explanation
Correct answer: B

The correct answer is B. Option B: User1 is in the incorrect group.

Topic 1 Β· Question 189

A junior administrator updated the PostgreSQL service unit file per the database administrator's recommendation. The service has been restarted, but changes have not been applied. Which of the following should the administrator run for the changes to take effect?

  • Asystemctl get-default
  • Bsystemctl daemon-reload (correct answer)
  • Csystemctl enable postgresql
  • Dsystemctl mask postgresql
Reveal answer & explanation
Correct answer: B

The correct answer is B. Option B: systemctl daemon-reload

Topic 1 Β· Question 190

A systems administrator intends to use a UUID to mount a new partition permanently on a Linux system. Which of the following commands can the administrator run to obtain information about the UUIDs of all disks attached to a Linux system?

  • Afcstat
  • Bblkid (correct answer)
  • Cdmsetup
  • Dlescsi
Reveal answer & explanation
Correct answer: B

The correct answer is B. Option B: blkid

Topic 1 Β· Question 191

A systems administrator creates a public key for authentication. Which of the following tools is MOST suitable to use when uploading the key to the remote servers?

  • Ascp
  • Bssh-copy-id (correct answer)
  • Cssh-agent
  • Dssh-keyscan
Reveal answer & explanation
Correct answer: B

The correct answer is B. Option B: ssh-copy-id

Topic 1 Β· Question 192

A systems administrator checked out the code from the repository, created a new branch, made changes to the code, and then updated the main branch. The systems administrator wants to ensure that the Terraform state files do not appear in the main branch. Which of following should the administrator use to meet this requirement?

  • Aclone
  • B.gitignore (correct answer)
  • Cget
  • D.ssh
Reveal answer & explanation
Correct answer: B

The correct answer is B. Option B: .gitignore

Explanation

Git provides distributed source control with branching, history, and collaborative change tracking.

Topic 1 Β· Question 193

Following the migration from a disaster recovery site, a systems administrator wants a server to require a user to change credentials at initial login. Which of the following commands should be used to ensure the aging attribute?

  • Achage -d 2 user
  • Bchage -d 0 user (correct answer)
  • Cchage -E 0 user
  • Dchage -d 1 user
Reveal answer & explanation
Correct answer: B

The correct answer is B. Option B: chage -d 0 user By spanning multiple Availability Zones / adding redundancy, this option provides the high availability and resilience required.

Topic 1 Β· Question 194

An engineer needs to insert a character at the end of the current line in the vi text editor. Which of the following will allow the engineer to complete this task?

  • Ap
  • Br
  • Cbb
  • DA (correct answer)
  • Ei
Reveal answer & explanation
Correct answer: D

The correct answer is D. Option D: A

Topic 1 Β· Question 195

A systems administrator is adding a Linux-based server and removing a Windows-based server from a cloud-based environment. The changes need to be validated before they are applied to the cloud-based environment. Which of the following tools should be used to meet this requirement?

  • AAnsible
  • Bgit clone
  • Cgit pull
  • Dterraform plan (correct answer)
Reveal answer & explanation
Correct answer: D

The correct answer is D. Option D: terraform plan

Topic 1 Β· Question 196

A systems administrator wants to check for running containers. Which of the following commands can be used to show this information?

  • Adocker pull
  • Bdocker stats
  • Cdocker ps (correct answer)
  • Ddocker list
Reveal answer & explanation
Correct answer: C

The correct answer is C. Option C: docker ps

Topic 1 Β· Question 197

An administrator needs to get network information from a group of statically assigned workstations before they are reconnected to the network. Which of the following should the administrator use to obtain this information?

  • Aip show
  • Bifcfg -a (correct answer)
  • Cifcfg -s
  • Difname -s
Reveal answer & explanation
Correct answer: B

The correct answer is B. Option B: ifcfg -a

Topic 1 Β· Question 198

A user created the following script file: #!/bin/bash # FILENAME: /home/user/script.sh echo "hello world" exit 1 However, when the user tried to run the script file using the command ~/script.sh, an error returned indicating permission was denied. Which of the following should the user execute in order for the script to run properly?

  • Achmod u+x /home/user/script.sh (correct answer)
  • Bchmod 600 /home/user/script.sh
  • Cchmod 007 /home/user/script.sh
  • Dchmod o+r /home/user/script.sh
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: chmod u+x /home/user/script.sh

Topic 1 Β· Question 199 Β· Select all that apply

A systems administrator is enabling LUKS on a USB storage device with an ext4 filesystem format. The administrator runs dmesg and notices the following output: Given this scenario, which of the following should the administrator perform to meet these requirements? (Choose three.)

Exhibit 1 for question 199
  • Agpg /dev/sdc1
  • Bpvcreate /dev/sdc
  • Cmkfs.ext4 /dev/mapper/LUKS0001 - L ENCRYPTED
  • Dumount /dev/sdc (correct answer)
  • Efdisk /dev/sdc (correct answer)
  • Fmkfs.vfat /dev/mapper/LUKS0001 - L ENCRYPTED
  • Gwipefs -a/dev/sdb1
  • Hcryptsetup luksFormat /dev/sdc1 (correct answer)
Reveal answer & explanation
Correct answer: D, E, H

The correct answer is D, E, H. Option D: umount /dev/sdc Option E: fdisk /dev/sdc Option H: cryptsetup luksFormat /dev/sdc1

Topic 1 Β· Question 200

A developer wants to ensure that all files and folders created inside a shared folder named /Group00DEV inherit the group name of the parent folder. Which of the following commands will help achieve this goal?

  • Achmod g+x /Group00DEV/
  • Bchmod g+w /Group00DEV/
  • Cchmod g+r /Group00DEV/
  • Dchmod g+s /Group00DEV/ (correct answer)
Reveal answer & explanation
Correct answer: D

The correct answer is D. Option D: chmod g+s /Group00DEV/

Topic 1 Β· Question 201

Ann, a security administrator, is performing home directory audits on a Linux server. Ann issues the su Joe command and then issues the ls command. The output displays files that reside in Ann's home directory instead of Joe's. Which of the following represents the command Ann should have issued in order to list Joe's files?

  • Asu - Joe (correct answer)
  • Bsudo Joe
  • Cvisudo Joe
  • Dpkexec Joe
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: su - Joe This option keeps traffic private / properly secured as required.

Topic 1 Β· Question 202

A developer needs to launch an Nginx image container, name it Web00l, and expose port 8080 externally while mapping to port 80 inside the container. Which of the following commands will accomplish this task?

  • Adocker exec -it -p 8080:80 --name Web001 nginx
  • Bdocker load -it -p 8080:80 --name Web001 nginx
  • Cdocker run -it -p 8080:80 --name Web001 nginx (correct answer)
  • Ddocker pull -it -p 8080:80 --name Web001 nginx
Reveal answer & explanation
Correct answer: C

The correct answer is C. Option C: docker run -it -p 8080:80 --name Web001 nginx

Topic 1 Β· Question 203

The security team has identified a web service that is running with elevated privileges. A Linux administrator is working to change the systemd service file to meet security compliance standards. Given the following output: [Unit] Description=CompTIA server daemon Documentation=man:webserver(8) man:webserver_config(5) After=network.target - [Service] Type=notify - EnvironmentFile=/etc/webserver/config ExecStart=/usr/sbin/webserver -D $OPTIONS ExecReload=/bin/kill -HUP SMAINPID KillMode=process - Restart=on-failure - RestartSec=42s - [Install] WantedBy=multi-user.target - Which of the following remediation steps will prevent the web service from running as a privileged user?

  • ARemoving the ExecStart=/usr/sbin/webserver -D $OPTIONS from the service file
  • BUpdating the EnvironmentFile line in the [Service] section to /home/webservice/config
  • CAdding the User=webservice to the [Service] section of the service file (correct answer)
  • DChanging the multi-user.target in the [Install] section to basic.target
Reveal answer & explanation
Correct answer: C

The correct answer is C. Option C: Adding the User=webservice to the [Service] section of the service file This option keeps traffic private / properly secured as required.

Showing questions 181–200 of 263 Β· Page 10 of 14