CompTIA Linux+ XK0-005 – Question090

A Linux administrator is creating a primary partition on the replacement hard drive for an application server.
Which of the following commands should the administrator issue to verify the device name of this partition?

A.
sudo fdisk /dev/sda
B. sudo fdisk -s /dev/sda
C. sudo fdisk -l
D. sudo fdisk -h

Correct Answer: C

CompTIA Linux+ XK0-005 – Question089

A Linux administrator needs to create an image named sda.img from the sda disk and store it in the /tmp directory. Which of the following commands should be used to accomplish this task?

A.
dd of=/dev/sda if=/tmp/sda.img
B. dd if=/dev/sda of=/tmp/sda.img
C. dd –if=/dev/sda –of=/tmp/sda.img
D. dd –of=/dev/sda –if=/tmp/sda.img

Correct Answer: B

CompTIA Linux+ XK0-005 – Question088

A Linux system is failing to boot with the following error:

Which of the following actions will resolve this issue? (Choose two.)

A.
Execute grub-install –root-directory=/mnt and reboot.
B. Execute grub-install /dev/sdX and reboot.
C. Interrupt the boot process in the GRUB menu and add rescue to the kernel line.
D. Fix the partition modifying /etc/default/grub and reboot.
E. Interrupt the boot process in the GRUB menu and add single to the kernel line.
F. Boot the system on a LiveCD/ISO.

Correct Answer: BD

CompTIA Linux+ XK0-005 – Question087

A cloud engineer needs to remove all dangling images and delete all the images that do not have an associated container. Which of the following commands will help to accomplish this task?

A.
docker images prune -a
B. docker push images -a
C. docker rmi -a images
D. docker images rmi –all

Correct Answer: A

CompTIA Linux+ XK0-005 – Question086

An administrator transferred a key for SSH authentication to a home directory on a remote server. The key file was moved to .ssh/authorized_keys location in order to establish SSH connection without a password. However, the SSH command still asked for the password. Given the following output:

Which of the following commands would resolve the issue?

A.
restorecon .ssh/authorized_keys
B. ssh_keygen -t rsa -o .ssh/authorized_keys
C. chown root:root .ssh/authorized_keys
D. chmod 600 .ssh/authorized_keys

Correct Answer: A

CompTIA Linux+ XK0-005 – Question085

A systems administrator made some unapproved changes prior to leaving the company. The newly hired administrator has been tasked with revealing the system to a compliant state. Which of the following commands will list and remove the correspondent packages?

A.
dnf list and dnf remove last
B. dnf remove and dnf check
C. dnf info and dnf upgrade
D. dnf history and dnf history undo last

Correct Answer: D

CompTIA Linux+ XK0-005 – Question084

A Linux administrator is troubleshooting a memory-related issue. Based on the output of the commands:

Which of the following commands would address the issue?

A.
top -p 8321
B. kill -9 8321
C. renice -10 8321
D. free 8321

Correct Answer: C

CompTIA Linux+ XK0-005 – Question083

A Linux administrator created a new file system. Which of the following files must be updated to ensure the filesystem mounts at boot time?

A.
/etc/sysctl
B. /etc/filesystems
C. /etc/fstab
D. /etc/nfsmount.conf

Correct Answer: C

CompTIA Linux+ XK0-005 – Question082

A user generated a pair of private-public keys on a workstation. Which of the following commands will allow the user to upload the public key to a remote server and enable passwordless login?

A.
scp ~/.ssh/id_rsa user@server:~/
B. rsync ~ /.ssh/ user@server:~/
C. ssh-add user server
D. ssh-copy-id user@server

Correct Answer: D

CompTIA Linux+ XK0-005 – Question081

A systems administrator wants to be sure the sudo rules just added to /etc/sudoers are valid. Which of the following commands can be used for this task?

A.
visudo -c
B. test -f /etc/sudoers
C. sudo vi check
D. cat /etc/sudoers | tee test

Correct Answer: A