XK0-005: CompTIA Linux+ Topic 4
Question #: 151
Topic #: 1
A Linux systems administrator needs to copy files and directories from Server A to Server B. Which of the following commands can be used for this purpose? (Choose two.)
A. rsyslog
B. cp
C. rsync
D. reposync
E. scp
F. ssh
Selected Answer: CE
Question #: 152
Topic #: 1
A Linux administrator rebooted a server. Users then reported some of their files were missing. After doing some troubleshooting, the administrator found one of the filesystems was missing. The filesystem was not listed in /etc/fstab and might have been mounted manually by someone prior to reboot. Which of the following would prevent this issue from reoccurring in the future?
A. Sync the mount units.
B. Mount the filesystem manually.
C. Create a mount unit and enable it to be started at boot.
D. Remount all the missing filesystems.
Selected Answer: C
Question #: 153
Topic #: 1
Joe, a user, is unable to log in to the Linux system. Given the following output:
Which of the following commands would resolve the issue?
A. usermod -s /bin/bash joe
B. pam_tally2 -u joe -r
C. passwd -u joe
D. chage -E 90 joe
Selected Answer: A
Question #: 154
Topic #: 1
A developer reported an incident involving the application configuration file /etc/httpd/conf/httpd.conf that is missing from the server. Which of the following identifies the RPM package that installed the configuration file?
A. rpm -qf /etc/httpd/conf/httpd.conf
B. rpm -ql /etc/httpd/conf/httpd.conf
C. rpm –query /etc/httpd/conf/httpd.conf
D. rpm -q /etc/httpd/conf/httpd.conf
Selected Answer: A
Question #: 155
Topic #: 1
Users have been unable to save documents to /home/tmp/temp and have been receiving the following error:
Path not found –
A junior technician checks the locations and sees that /home/tmp/tempa was accidentally created instead of /home/tmp/temp. Which of the following commands should the technician use to fix this issue?
A. cp /home/tmp/tempa /home/tmp/temp
B. mv /home/tmp/tempa /home/tmp/temp
C. cd /temp/tmp/tempa
D. ls /home/tmp/tempa
Selected Answer: B
Question #: 156
Topic #: 1
A Linux administrator has logged in to a server for the first time and needs to know which services are allowed through the firewall. Which of the following options will return the results for which the administrator is looking?
A. firewall-cmd –get-services
B. firewall-cmd –check-config
C. firewall-cmd –list-services
D. systemctl status firewalld
Selected Answer: C
Question #: 157
Topic #: 1
After installing a new version of a package, a systems administrator notices a new version of the corresponding .service file was installed. In order to use the new version of the .service file, which of the following commands must be issued FIRST?
A. systemctl status
B. systemctl stop
C. systemctl reinstall
D. systemctl daemon-reload
Selected Answer: D
Question #: 158
Topic #: 1
Which of the following commands is used to configure the default permissions for new files?
A. setenforce
B. sudo
C. umask
D. chmod
Selected Answer: C
Question #: 159
Topic #: 1
A Linux administrator needs to connect securely to a remote server in order to install application software. Which of the following commands would allow this connection?
A. scp “ABC-key.pem” root@10.0.0.1
B. sftp root@10.0.0.1
C. telnet 10.0.0.1 80
D. ssh -i “ABC-key.pem” root@10.0.0.1
E. sftp “ABC—key.pem” root@10.0.0.1
Selected Answer: D
Question #: 160
Topic #: 1
In order to copy data from another VLAN, a systems administrator wants to temporarily assign IP address 10.0.6.5/24 to the newly added network interface enpls0f1. Which of the following commands should the administrator run to achieve the goal?
A. ip addr add 10.0.6.5/24 dev enpls0f1
B. echo “IPV4_ADDRESS=10.0.6.5/24” > /etc/sysconfig/network-scripts/ifcfg-enpls0f1
C. ifconfig 10.0.6.5/24 enpsls0f1
D. nmcli conn add ipv4.address=10.0.6.5/24 if name snpls0f1
Selected Answer: A
Question #: 161
Topic #: 1
A Linux engineer needs to download a ZIP file and wants to set the nice value to -10 for this new process. Which of the following commands will help to accomplish the task?
A. $ nice -v -10 wget https://foo.com/installation.zip
B. $ renice -v -10 wget https://foo.com/installation.zip
C. $ renice -10 wget https://foo.com/installation.zip
D. $ nice -10 wget https://foo.com/installation.zip
Selected Answer: D
Question #: 162
Topic #: 1
Which of the following data structures is written in JSON?
A.
B.
C.
D.
Selected Answer: D
Question #: 163
Topic #: 1
Which of the following enables administrators to configure and enforce MFA on a Linux system?
A. Kerberos
B. SELinux
C. PAM
D. PKI
Selected Answer: C
Question #: 164
Topic #: 1
A database administrator requested the installation of a custom database on one of the servers. Which of the following should the Linux administrator configure so the requested packages can be installed?
A. /etc/yum.conf
B. /etc/ssh/sshd.conf
C. /etc/yum.repos.d/db.repo
D. /etc/resolv.conf
Selected Answer: C
Question #: 165
Topic #: 1
In which of the following filesystems are system logs commonly stored?
A. /var
B. /tmp
C. /etc
D. /opt
Selected Answer: A
Question #: 166
Topic #: 1
A systems administrator has been unable to terminate a process. Which of the following should the administrator use to forcibly stop the process?
A. kill -1
B. kill -3
C. kill -15
D. kill -HUP
E. kill -TERM
Selected Answer: C
Question #: 167
Topic #: 1
A systems administrator is compiling a report containing information about processes that are listening on the network ports of a Linux server. Which of the following commands will allow the administrator to obtain the needed information?
A. ss -plnt
B. tcpdump -nL
C. netstat -pn
D. lsof -lt
Selected Answer: A
Question #: 168
Topic #: 1
At what point is the Internal Certificate Authority (ICA) created?
A. During the primary Security Management Server installation process.
B. Upon creation of a certificate.
C. When an administrator decides to create one.
D. When an administrator initially logs into SmartConsole.
Selected Answer: A
Question #: 169
Topic #: 1
Rugged appliances are small appliances with ruggedized hardware and like Quantum Spark appliance they use which operating system?
A. Centos Linux
B. Gaia embedded
C. Gaia
D. Red Hat Enterprise Linux version 5
Selected Answer: C
Question #: 170
Topic #: 1
Using AD Query, the security gateway connections to the Active Directory Domain Controllers using what protocol?
A. Windows Management Instrumentation (WMI)
B. Hypertext Transfer Protocol Secure (HTTPS)
C. Lightweight Directory Access Protocol (LDAP)
D. Remote Desktop Protocol (RDP)
Selected Answer: A
Question #: 171
Topic #: 1
What is the main objective when using Application Control?
A. To filter out specific content.
B. To assist the firewall blade with handling traffic.
C. To see what users are doing.
D. Ensure security and privacy of information.
Selected Answer: A
Question #: 172
Topic #: 1
As part of the requirements for installing a new application, the swappiness parameter needs to be changed to 0. This change needs to persist across reboots and be applied immediately. A Linux systems administrator is performing this change. Which of the following steps should the administrator complete to accomplish this task?
A. echo “vm.swappiness=0” >> /etc/sysctl.conf && sysctl -p
B. echo “vm.swappiness=0” >> /proc/meminfo && sysctl -a
C. sysctl -v >> /proc/meminfo && echo “vm.swapiness=0”
D. sysctl -h “vm.swapiness=0” && echo /etc/vmswapiness
Selected Answer: A
Question #: 173
Topic #: 1
A systems administrator wants to list all local accounts in which the UID is greater than 500. Which of the following commands will give the correct output?
A. find /etc/passwd -size +500
B. cut -d: -f1 /etc/passwd > 500
C. awk -F: ‘$3 > 500 {print $1}’ /etc/passwd
D. sed ‘/UID/’ /etc/passwd < 500
Selected Answer: C
Question #: 174
Topic #: 1
A systems administrator is tasked with changing the default shell of a system account in order to disable iterative logins. Which of the following is the BEST option for the administrator to use as the new shell?
A. /sbin/nologin
B. /bin/sh
C. /sbin/setenforce
D. /bin/bash
Selected Answer: A
Question #: 175
Topic #: 1
A junior systems administrator recently installed an HBA card in one of the servers that is deployed for a production environment. Which of the following commands can the administrator use to confirm on which server the card was installed?
A. lspci | egrep ‘hba|fibr’
B. lspci | zgrep ‘hba|fibr’
C. lspci | pgrep ‘hba|fibr’
D. lspci | ‘hba|fibr’
Selected Answer: A
Question #: 176
Topic #: 1
A new disk was presented to a server as /dev/sdd. The systems administrator needs to check if a partition table is on that disk. Which of the following commands can show this information?
A. lsscsi
B. fdisk
C. blkid
D. partprobe
Selected Answer: B
Question #: 177
Topic #: 1
A systems administrator wants to upgrade /bin/someapp to a new version, but the administrator does not know the package name. Which of the following will show the RPM package name that provides that binary file?
A. rpm -qf /bin/someapp
B. rpm -Vv /bin/someapp
C. rpm -p /bin/someapp
D. rpm -i /bin/someapp
Selected Answer: A
Question #: 178
Topic #: 1
A systems administrator is installing various software packages using a package manager. Which of the following commands would the administrator use on the Linux server to install the package?
A. winget
B. softwareupdate
C. yum-config
D. apt
Selected Answer: D
Question #: 181
Topic #: 1
An administrator started a long-running process in the foreground that needs to continue without interruption. Which of the following keystrokes should the administrator use to continue running the process in the background?
A. bg
B. bg
C. jobs -1
D. bg &
Selected Answer: A
Question #: 182
Topic #: 1
A Linux administrator has physically added a new RAID adapter to a system. Which of the following commands should the Linux administrator run to confirm that the device has been recognized? (Choose two.)
A. rmmod
B. ls -ll /etc
C. lshw -class disk
D. pvdisplay
E. rmdir /dev
F. dmesg
Selected Answer: CF
Question #: 183
Topic #: 1
Based on the given command:
find /home/user1 -type f -name "*.txt" -size +100M
Which of the following will the command accomplish?
A. It finds all the files ending with .txt with a size less than 100MB in /home/user1 directory.
B. It finds all the files ending with .txt with a size of 100MB in /home/user1 directory.
C. It finds all the directories with .txt files with a size of 100MB in /home folder.
D. It finds all the files ending with .txt with a size of over 100MB in /home/user1 directory.
Selected Answer: D
Question #: 184
Topic #: 1
While inspecting a recently compromised Linux system, the administrator identified a number of processes that should not have been running:
Which of the following commands should the administrator use to terminate all of the identified processes?
A. pkill -9 -f "upload*.sh"
B. kill -9 "upload*.sh"
C. killall -9 "upload*.sh"
D. skill -9 "upload*.sh"
Selected Answer: A
Question #: 186
Topic #: 1
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?
A. Run the corresponding command to trim the SSD drives.
B. Use fsck on the filesystem hosted on the SSD drives.
C. Migrate to high-density SSD drives for increased performance.
D. Reduce the amount of files on the SSD drives.
Selected Answer: A
Question #: 187
Topic #: 1
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?
A. iptables -A INPUT -p tcp --dport ssh -s 2.2.2.2 -j DROP
B. iptables -A INPUT -p tcp --dport ssh -s 2.2.2.2 -j RETURN
C. iptables -A INPUT -p tcp --dport ssh -s 2.2.2.2 -j REJECT
D. iptables -A INPUT -p tcp --dport ssh -s 2.2.2.2 -j QUEUE
Selected Answer: C
Question #: 188
Topic #: 1
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?
A.
B.
C.
D.
Selected Answer: C
Question #: 189
Topic #: 1
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?
A. User1 needs to set a long password.
B. User1 is in the incorrect group.
C. The user1 shell assignment is incorrect.
D. The user1 password is expired.
Selected Answer: D
Question #: 190
Topic #: 1
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?
A. systemctl get-default
B. systemctl daemon-reload
C. systemctl enable postgresql
D. systemctl mask postgresql
Selected Answer: B
Question #: 191
Topic #: 1
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?
A. fcstat
B. blkid
C. dmsetup
D. lescsi
Selected Answer: A
Question #: 194
Topic #: 1
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?
A. chage -d 2 user
B. chage -d 0 user
C. chage -E 0 user
D. chage -d 1 user
Selected Answer: B
Question #: 196
Topic #: 1
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?
A. p
B. r
C. bb
D. A
E. i
Selected Answer: D
Question #: 197
Topic #: 1
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?
A. Ansible
B. git clone
C. git pull
D. terraform plan
Selected Answer: C
Question #: 200
Topic #: 1
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?
A. ip show
B. ifcfg -a
C. ifcfg -s
D. ifname -s
Selected Answer: B