81-90 Flashcards
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
A. visudo -c
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
D. ssh-copy-id user@server
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
C. /etc/fstab
A Linux administrator is troubleshooting a memory-related issue. Based on the output of the commands:
$ vmstat -s –unit M
968 M total memory
331 M used memory
482 M active memory
279 M inactive memory
99 M free memory
$ free -h
total|used|free|shared|buff/cache|available
Mem: 968M|331M|95M|13M|540M|458M
Swap: 0|0|0
$ ps -aux | grep script.sh
USER|PID|%CPU|%MEM|VSZ|RSS|TTY|STAT|TIME|COMMAND
user|8321|2.8|40.5|3224846|371687|7|SN|16:49|2:09|/home/user/script.sh
Which of the following commands would address the issue?
A. top -p 8321
B. kill -9 8321
C. renice -10 8321
D. free 8321
C. renice -10 8321
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
D. dnf history and dnf history undo last
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:
[admin@linux ~ ]$ -ls -lhz .ssh/auth*
-rw-r-r–r–. admin unconfined_u:object_r:user_home_t:s0 .ssh/authorized_keys
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
A. restorecon .ssh/authorized_keys
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
A. docker images prune -a
A Linux system is failing to boot with the following error:
error: no such partitions
Entering rescue mode…
grub rescue>
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.
B. Execute grub-install /dev/sdX and reboot.
D. Fix the partition modifying /etc/default/grub and reboot.
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
B. dd if=/dev/sda of=/tmp/sda.img
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
C. sudo fdisk -l