Last Updated on July 17, 2021 by InfraExam

XK0-004 : CompTIA Linux+ : Part 12

  1. A systems administrator needs to connect to a remote Linux machine to run system updates from within a graphical interface. Which of the following should the administrator use?

    • MATE
    • Wayland
    • VNC
    • Unity
  2. When requesting SSH access to a remote system, a user accidentally emailed the id_rsa key to the administrator. Which of the following should the user do NEXT?

    • Run the ssh-add command to add the remote system to known_hosts.
    • Ask the administrator to run chmod 600 id_rsa on the remote system.
    • Delete id_rsa key file and send the key file instead.
    • Stop using that key and run ssh-keygen to generate a new key pair.
  3. An administrator receives an alarm because the disk of one of the sewers is running out of space. Which of the following commands can be used to see the space that each partition is using?

    • df -h
    • du -scg /
    • fdisk -l
    • fsck /
  4. A Linux team is using Git to version a set of custom scripts. A team member has made an update to a script and published the changes to the repository.

    Which of the following is the BEST way to retrieve the latest changes to the administrator’s local working copy?

    • git fetch
    • git merge
    • git commit
    • git pull
  5. A junior systems administrator needs to make a packet capture file that will only capture HTTP protocol data to a file called test.pcap.

    Which of the following commands would allow the administrator to accomplish this task?

    • netcat -p 80 -w test.pcap
    • tshark -r test.pcap -o http
    • tcpdump -i eth0 port 80 -r test.pcap
    • tcpdump -i eth0 port 80 -w test.pcap
  6. A Linux administrator needs to add some files in a directory to the Git repository but must exclude some local .tmp files that are occasionally created by the scripts.

    Which of the following is the BEST way to accomplish this task?

    • git rm .tmp
    • git add -x .tmp *
    • echo .tmp >> .gitignore
    • rm -rf .tmp
  7. A systems administrator is receiving errors while trying to install a popular virtualization software. The software specifications state the processor needs to support virtualization with Intel instructions. Additional requirements state the processor must accelerate encryption/decryption and use hyperthreading. Given the following output about the processor:

    fpu ume depse tsu msr pae mce cx8 apic sep mtrr pae mca cmov pat pse36 cflusm mmx fxsr sse sse2 ht syscall nx rdtscp lm constant_tsc rep_good nopl xtopology nonstop_tsc pni pclmulqdq ssse3 cx16 pcid sse4_1 sse4_2 x2apic popcnt aes xsave avx rdrand hypervisor lahf_lm fsgsbase

    Which of the following is the MOST likely reason for the errors?

    • The processor supports AMD instructions rather than Intel.
    • The processor cannot accelerate decryption.
    • The processor does not support hyperthreading.
    • The processor is running inside a virtual machine.
  8. A systems administrator needs to conduct maintenance on a server.

    Which of the following commands will place the administrator in the appropriate runlevel?

    • init 0
    • telinit 1
    • init 3
    • telinit 6
  9. Which of the following are classified as Linux GUI servers? (Choose two.)

    • VNC
    • KDE
    • Gnome
    • Wayland
    • MATE
    • X11
  10. A Linux administrator tried to copy files to a remote server but received an error message indicating a lack of free space on the disk. The administrator issued a df command and verified adequate free space and inodes on the filesystem.

    Which of the following commands is the BEST way to diagnose the issue?

    • cat /proc/meminfo
    • lsof -nP | grep deleted
    • find / -type f -size +50M
    • du -a / | sort -n -r | head -n 30
  11. A user wants to alias dir so it always returns the contents of the ls -la command. However, the user has to reset the alias with every login.

    Which of the following is the BEST action the user can take to ensure the command is always available?

    • echo “alias dir=ls -la” > /etc/profile
    • echo “alias dir=ls -la” >> /etc/skel
    • echo “alias dir=ls -la” >> ~/.profile
    • echo “alias dir=ls -la” > ~/.bashrc
  12. A systems administrator needs to run the yum update command two hours after employees log off and leave for the day on Friday.

    Which of the following is the BEST command to complete the task, if the task only needs to be run once?

    • screen
    • cron
    • at
    • nohup
  13. The Apache web server was recently installed on a Debian/Ubuntu server. The web server fails and a review of log messages on another partition reveals the installation was not completed properly due to lack of disk space. After clearing the files, the systems administrator has requested the installation to be performed again.

    Which of the following command lines will perform this task? (Choose two.)

    • apt-get install apache2
    • apt-get –purge remove acache2
    • apt-get –reinstall install apache2
    • apt-get –reinstall apache2
  14. Given the output below:

    [[email protected] ~]# rm config.txt
    rm: remove regular file ‘config.txt’? yes
    rm: cannot remove ‘config.txt’: Operation not permitted

    Which of the following might be the cause?

    • The file config.txt does not have the user write bit set.
    • The file config.txt does not exist.
    • The file config.txt has the immutable attribute set.
    • The file config.txt has an ACL that does not permit deletion by others.
  15. Users in the sales department are unable to create new files in the shared directory /Sales. A junior Linux administrator determines the permissions on the /Sales directory are set to rwxr—–, and sales is the group owner of the directory.

    Which of the following is the BEST command for the junior administrator to issue to allow the users to create new files?

    • umask 002
    • chmod 770 /Sales
    • chmod g+s /Sales
    • chmod 777 /Sales
  16. A user is reporting unusual slowness when trying to transfer a large file to an NFS server from a workstation. The administrator runs tracepath and gets the following output:

    XK0-004 Part 12 Q16 062
    XK0-004 Part 12 Q16 062

    Which of the following BEST describes the issue and a possible solution?

    • The path MTU is lower than the source MTU. Reduce the source MTU setting.
    • There is latency at the storage device. Work with the storage team to correct the issue.
    • There is latency on an intermediate router. Increase the path MTU to compensate.
    • There are dropped packets at an intermediate router. Work with the network team to correct the issue.
  17. A Linux administrator needs to back up files from a user’s home directory to a remote server. The administrator copied the files last week but must ensure any files created or modified since then are added.

    Which of the following is the BEST command for the administrator to use?

  18. A systems administrator documents the instructions on the internal wiki regarding how to turn the company’s code into Debian packages. The instructions include the commands used to compile, what tests need to be run, the commands to convert the raw code into a package that apt or dpkg can manage, as well as an explanation of each command.

    Which of the following is this an example of?

    • Infrastructure as code
    • Attributes
    • Procedures
    • Configuration management
  19. Which of the following is used in unattended server installation via PXE?

    • Kickstart
    • YAML
    • Cloud-init
    • Container image
  20. A new video card was added to a customer workstation. To get the new video card to work correctly, a systems administrator needs to remove support for the nouveau video driver on the Linux workstation.

    Which of the following will accomplish this task?

    • Use rmmod -f nouveau.
    • Use modprobe -R nouveau.
    • Add blacklist nouveau to /etc/modprobe.d/blacklist.conf.
    • Add blacklist nouveau to /etc/modprobe.conf.