Download XK0-005: Full list of questions and answers and more Exams Linux skills in PDF only on Docsity! XK0-005: Full list of questions and answers A new file was added to a main Git repository. An administrator wants to synchronize a local copy with the contents of the main repository. Which of the following commands should the administrator use for this task? A. git reflog B. git pull C. git status D. git push - correct answer B. git pull A user is asking the systems administrator for assistance with writing a script to verify whether a file exists. Given the following: #1/bin/bash filename=$1 <CONDITIONAL> echo "File exists" else echo "File does not exist" fi Which of the following commands should replace the <CONDITIONAL> string? XK0-005: Full list of questions and answers A. if [ -f "$filename" ]; then B. if [ -d "$filename" ]; then C. if [ -f "$filename" ] then D. if [ -f "$filename" ]; while - correct answer A. if [ -f "$filename" ]; then Which of the following technologies can be used as a central repository of Linux users and groups? A. LDAP B. MFA C. SSO D. PAM - correct answer A. LDAP A Linux administrator needs to analyze a failing application that is running inside a container. Which of the following commands allows the Linux administrator to enter the running container and analyze the logs that are stored inside? A. docker run -ti app /bin/sh B. podman exec -ti app /bin/sh C. podman run -d app /bin/bash XK0-005: Full list of questions and answers A. pvcreate -L1G /dev/appmkfs.xfs /dev/appmount /dev/add opt/app B. parted /dev/sbd --script mkpart primary xfs 1GBmkfs.xfs /dev/appmount /dev/add opt/app C. lvs --create 1G --name appmkfs.xfs /dev/appmount /dev/add opt/app D. lvcreate -L 1G -n app app vqmkfs.xfs /dev/app_vg/appmount /dev/add_vg/app opt/app - correct answer D. lvcreate -L 1G -n app app vqmkfs.xfs /dev/app_vg/appmount /dev/add_vg/app opt/app A Linux administrator is troubleshooting SSH connection issues from one of the workstations. When users attempt to log in from the workstation to a server with the IP address 104.21.75.76, they receive the following message: ssh: connect to host 104.21.75.76 port 22: Connection refused The administrator reviews the information below: Check the image Which of the following is causing the connectivity issue? A. The workstation has the wrong IP settings. B. The sshd service is disabled. XK0-005: Full list of questions and answers C. The server's firewall is preventing connections from being made. D. The server has an incorrect default gateway configuration. - correct answer C. The server's firewall is preventing connections from being made. Which of the following files holds the system configuration for journal when running systemd? A. /etc/systemd/journald.conf B. /etc/systemd/systemd-journalctl.conf C. /usr/lib/systemd/journalctl.conf D. /etc/systemd/systemd-journald.conf - correct answer A. /etc/systemd/journald.conf A systems administrator requires that all files that are created by the user named web have read-only permissions by the owner. Which of the following commands will satisfy this requirement? A. chown web:web /home/web B. chmod -R 400 /home/web C. echo "umask 377" >> /home/web/.bashrc D. setfacl read /home/web - correct answer C. echo "umask 377" >> /home/web/.bashrc XK0-005: Full list of questions and answers A systems administrator is tasked with preventing logins from accounts other than root, while the file /etc/nologin exists. Which of the following PAM modules will accomplish this task? A. pam_login.so B. pam_access.so C. pam_logindef.so D. pam_nologin.so - correct answer D. pam_nologin.so A systems administrator has been tasked with disabling the nginx service from the environment to prevent it from being automatically and manually started. Which of the following commands will accomplish this task? A. systemctl cancel nginx B. systemctl disable nginx C. systemctl mask nginx D. systemctl stop nginx - correct answer C. systemctl mask nginx A Linux administrator is troubleshooting an issue in which an application service failed to start on a Linux server. The administrator runs a few commands and gets the following outputs: Output 1: XK0-005: Full list of questions and answers C. WANTEDBY=mar - correct answer D. REQUIRES=mariadb.service Several users reported that they were unable to write data to the /oracle1 directory. The following output has been provided: Check the image Which of the following commands should the administrator use to diagnose the issue? A. df -i /oracle1 B. fdisk -1 /dev/sdb1 C. lsblk /dev/sdb1 D. du -sh /oracle1 - correct answer A. df -i /oracle1 After installing some RPM packages, a systems administrator discovers the last package that was installed was not needed. Which of the following commands can be used to remove the package? A. dnf remove packagename B. apt-get remove packagename C. rpm -i packagename XK0-005: Full list of questions and answers D. apt remove packagename - correct answer A. dnf remove packagename A systems administrator is checking the system logs. The administrator wants to look at the last 20 lines of a log. Which of the following will execute the command? A. tail -v 20 B. tail -n 20 C. tail -c 20 D. tail -l 20 - correct answer B. tail -n 20 An administrator is trying to diagnose a performance issue and is reviewing the following output: Check the image System Properties: - CPU: 4 vCPU - Memory: 40GB - Disk maximum IOPS: 690 - Disk maximum throughput: 44Mbps | 44000Kbps XK0-005: Full list of questions and answers Based on the above output, which of the following BEST describes the root cause? A. The system has reached its maximum IOPS, causing the system to be slow. B. The system has reached its maximum permitted throughput, therefore iowait is increasing. C. The system is mostly idle, therefore the iowait is high. D. The system has a partitioned disk, which causes the IOPS to be doubled. - correct answer B. The system has reached its maximum permitted throughput, therefore iowait is increasing. A systems administrator wants to test the route between IP address 10.0.2.15 and IP address 192.168.1.40. Which of the following commands will accomplish this task? A. route -e get to 192.168.1.40 from 10.0.2.15 B. ip route get 192.163.1.40 from 10.0.2.15 C. ip route 192.169.1.40 to 10.0.2.15 D. route -n 192.168.1.40 from 10.0.2.15 - correct answer B. ip route get 192.163.1.40 from 10.0.2.15 A Linux administrator was tasked with deleting all files and directories with names that are contained in the sobelete.txt file. Which of the following commands will accomplish this task? XK0-005: Full list of questions and answers A systems administrator is tasked with creating a cloud-based server with a public IP address. The code is as follows: --- -name: start an instance with a public IP address community.abc.ec2_instance: name: "public-compute-instance" key_name: "comptia-ssh-key" vpc_subnet_id: subnet-5cjssh1 instance_type: instance.type security_group: comptia network: assign_public_ip: true image_id: ami-1234568 tags: Environment: Comptia-Items-Writing-Workshop ... Which of the following technologies did the systems administrator use to complete this task? A. Puppet B. Git C. Ansible XK0-005: Full list of questions and answers D. Terraform - correct answer C. Ansible A Linux systems administrator is setting up a new web server and getting 404 - NOT FOUND errors while trying to access the web server pages from the browser. While working on the diagnosis of this issue, the Linux systems administrator executes the following commands: # getenforce Enforcing # matchpathcon -v /var/www/html/* /var/www/html/index.html has context unconfined_u:object_r:user_home_t:s0, should be system_u:object_r:httpd_sys_content_t:s0 /var/www/html/pagel.html has context unconfined_u:object_r:user_home_t:s0, should be system_u:object_r:httpd_sys_content_t:30 Which of the following commands will BEST resolve this issue? A. sed -i 's/SELINUX=enforcing/SELINUX=disabled/' /etc/selinux/config B. restorecon -R -v /var/www/html C. setenforce 0 XK0-005: Full list of questions and answers D. setsebool -P httpd_can_network_connect_db on - correct answer B. restorecon -R -v /var/www/html To harden one of the servers, an administrator needs to remove the possibility of remote administrative login via the SSH service. Which of the following should the administrator do? A. Add the line DenyUsers root to the /etc/hosts.deny file. B. Set PermitRootLogin to no in the /etc/ssh/sshd_config file. C. Add the line account required pam_nologin. so to the /etc/pam.d/sshd file. D. Set PubKeyAuthentication to no in the /etc/ssh/ssh_config file. - correct answer B. Set PermitRootLogin to no in the /etc/ssh/sshd_config file. A newly created container has been unable to start properly, and a Linux administrator is analyzing the cause of the failure. Which of the following will allow the administrator to determine the FIRST command that is executed inside the container right after it starts? A. docker export <container_id> B. docker info <container_id> C. docker start <container_id> D. docker inspect <container_id> - correct answer D. docker inspect <container_id> XK0-005: Full list of questions and answers Send-mail: Cannot open mail: 25 The local machine DNS settings are: $ cat /etc/resolv.conf nameserver 10.10.10.10 #web records nameserver 10.10.10.10 #email records Mail server: mail.example.com Which of the following commands could the engineer use to query the DNS server to get mail server information? A. dig @example.com 10.10.10.20 a B. dig @10.10.10.20 example.com mx C. dig @example.com 10.10.10.20 ptr D. dig @10.10.10.20 example.com ns - correct answer B. dig @10.10.10.20 example.com mx A Linux engineer has been notified about the possible deletion of logs from the file /opt/app/logs. The engineer needs to ensure the log file can only be written into without removing previous entries. XK0-005: Full list of questions and answers # lsattz /opt/app/logs --------------e---- logs Which of the following commands would be BEST to use to accomplish this task? A. chattr +a /opt/app/logs B. chattr +d /opt/app/logs C. chattr +i /opt/app/logs D. chattr +c /opt/app/logs - correct answer A. chattr +a /opt/app/logs A systems administrator needs to check if the service systemd- resolved.service is running without any errors. Which of the following commands will show this information? A. systemctl status systemd-resolved.service B. systemctl enable systemd-resolved.service C. systemctl mask systemd-resolved.service D. systemctl show systemd-resolved.service - correct answer A. systemctl status systemd-resolved.service XK0-005: Full list of questions and answers A Linux administrator needs to remove software from the server. Which of the following RPM options should be used? A. rpm -s B. rрm -d C. rpm -q D. rpm -e - correct answer D. rpm -e A Linux system fails to start and delivers the following error message: Checking all file systems. /dev/sdal contains a file system with errors, check forced. /dev/sdal: Inodes that were part of a corrupted orphan linked list found. /dev/sda1: UNEXPECTED INCONSISTENCY; Which of the following commands can be used to address this issue? A. fsck.ext4 /dev/sda1 B. partprobe /dev/sda1 C. fdisk /dev/sda1 D. mkfs.ext4 /dev/sda1 - correct answer A. fsck.ext4 /dev/sda1 XK0-005: Full list of questions and answers B. iptables -t nat -A PREROUTING -p top --dport 81 -j DNAT --to- destination 192.0.2.25:3129 C. iptables -t nat -I PREROUTING -p top --sport 80 -j DNAT --to- destination 192.0.2.25:3129 D. iptables -t nat -A PREROUTING -p tcp --dport 80 -j DNAT --to- destination 192.0.2.25:3128 - correct answer D. iptables -t nat -A PREROUTING -p tcp --dport 80 -j DNAT --to-destination 192.0.2.25:3128 Developers have requested implementation of a persistent, static route on the application server. Packets sent over the interface eth0 to 10.0.213.5/32 should be routed via 10.0.5.1. Which of the following commands should the administrator run to achieve this goal? A. route -i etho -p add 10.0.213.5 10.0.5.1 B. route modify eth0 +ipv4.routes "10.0.213.5/32 10.0.5.1" C. echo "10.0.213.5 10.0.5.1 eth0" > /proc/net/route D. ip route add 10.0.213.5/32 via 10.0.5.1 dev eth0 - correct answer D. ip route add 10.0.213.5/32 via 10.0.5.1 dev eth0 A systems administrator is deploying three identical, cloud-based servers. The administrator is using the following code to complete the task: resource "abc_instance" "ec2_instance { XK0-005: Full list of questions and answers ami = data.abc_ami.vendor-Linux-2.id associate_public_ip_address = true count = 3 instance_type = "instance_type" vpc_security_group_ids = [abc.security_group.allow_ssh. id] key_name = abc_key_pair.key_pair.key_name tags = { Name = "${var.namespace} $(count.index)" } } Which of the following technologies is the administrator using? A. Ansible B. Puppet C. Chef D. Terraform - correct answer D. Terraform A systems administrator is troubleshooting connectivity issues and trying to find out why a Linux server is not able to reach other servers on the same subnet it is connected to. When listing link parameters, the following is presented: XK0-005: Full list of questions and answers # ip link list dev eth0 2: etho: <NO-CARRIER, CROADCAST, MULTICAST, UP> mtu 1500, qdisc, fq_codel state DOWN node DEFAULT group default qlen 1000 link/ether ac:00:11:22:33:cd brd ff:ff:ff:ff:ff:ff Based on the output above, which of following is the MOST probable cause of the issue? A. The address ac:00:11:22:33:cd is not a valid Ethernet address. B. The Ethernet broadcast address should be ac:00:11:22:33:ff instead. C. The network interface eth0 is using an old kernel module. D. The network interface cable is not connected to a switch. - correct answer D. The network interface cable is not connected to a switch. A Linux administrator was asked to run a container with the httpd server inside. This container should be exposed at port 443 of a Linux host machine while it internally listens on port 8443. Which of the following commands will accomplish this task? A. podman run -d -p 443:8443 httpd B. podman run -d -p 8443:443 httpd C. podman run -d -e 443:8443 httpd XK0-005: Full list of questions and answers commands can be used to copy a key file to remote servers? (Choose two.) A. wgetB. ssh-keygen C. ssh-keyscan D. ssh-copy-id E. ftpd F. scp - correct answer D. ssh-copy-id F. scp A Linux administrator would like to use systemd to schedule a job to run every two hours. The administrator creates timer and service definitions and restarts the server to load these new configurations. After the restart, the administrator checks the log file and notices that the job is only running daily. Which of the following is MOST likely causing the issue? A. The checkdiskspace.service is not running. B. The checkdiskspace.service needs to be enabled. C. The OnCalendar schedule is incorrect in the timer definition. D. The system-daemon services need to be reloaded. - correct answer C. The OnCalendar schedule is incorrect in the timer definition. XK0-005: Full list of questions and answers A systems administrator created a web server for the company and is required to add a tag for the API so end users can connect. Which of the following would the administrator do to complete this requirement? A. hostnamectl status --no-ask-password B. hostnamectl set-hostname "$(perl -le "print" "A" x 86)" C. hostnamectl set-hostname Comptia-WebNode -H
[email protected] D. hostnamectl set-hostname Comptia-WebNode --transient - correct answer C. hostnamectl set-hostname Comptia-WebNode -H
[email protected] A systems administrator wants to back up the directory /data and all its contents to /backup/data on a remote server named remote. Which of the following commands will achieve the desired effect? A. scp -p /data remote:/backup/data B. ssh -i /remote:/backup/ /data C. rsync -a /data remote:/backup/ D. cp -r /data /remote/backup/ - correct answer C. rsync -a /data remote:/backup/ An administrator attempts to rename a file on a server but receives the following error. XK0-005: Full list of questions and answers mv: cannot move 'files/readme.txt' to 'files/readme.txt.orig': Operation not permitted The administrator then runs a few commands and obtains the following output: Check the image Which of the following commands should the administrator run NEXT to allow the file to be renamed by any user? A. chgrp reet files B. chacl -R 644 files C. chown users files D. chmod -t files - correct answer D. chmod -t files Which of the following commands will display the operating system? A. uname -n B. uname -s C. uname -o D. uname -m - correct answer C. uname -o XK0-005: Full list of questions and answers D. kill -9 6295 - correct answer D. kill -9 6295 A Linux administrator needs to ensure that Java 7 and Java 8 are both locally available for developers to use when deploying containers. Currently only Java 8 is available. Which of the following commands should the administrator run to ensure both versions are available? A. docker image load java:7 B. docker image pull java:7 C. docker image import java:7 D. docker image build java:7 - correct answer B. docker image pull java:7 Which of the following is a function of a bootloader? A. It initializes all the devices that are required to load the OS. B. It mounts the root filesystem that is required to load the OS. C. It helps to load the different kernels to initiate the OS startup process. D. It triggers the start of all the system services. - correct answer C. It helps to load the different kernels to initiate the OS startup process. XK0-005: Full list of questions and answers A systems administrator configured firewall rules using firewalld. However, after the system is rebooted, the firewall rules are not present: Chain INPUT (policy ACCEPT) target prot opt source destination Chain FORWARD (policy ACCEPT) target prot opt source destination Chain OUTPUT (policy ACCEPT) target prot opt source destination The systems administrator makes additional checks: - dynamic firewall daemon Loaded: loaded (/usr/lib/systemd/system/firewalld.service: disabled; vendor preset: enabled) Active: inactive (dead) Docs: man: firewalld (1) firewalld is not running Which of the following is the reason the firewall rules are not active? XK0-005: Full list of questions and answers A. iptables is conflicting with firewalld. B. The wrong system target is activated. C. FIREWALL_ARGS has no value assigned. D. The firewalld service is not enabled. - correct answer D. The firewalld service is not enabled. sudo yum install httpd systemctl start httpd systemctl enable httpd --now systemctl status httpd - correct answer N/A A Linux administrator is trying to remove the ACL from the file /home/user/data. txt but receives the following error message: setfacl: data.txt: operation not permitted Given the following analysis: /dev/mapper/linux-home on /home type xfs (rw, relatime, seclabel, attr2, inode 64, usrquota) -rw-rw-r--+ 1 user staff 2354 Sep 15 16:33 data.txt -rw-rw-r--+ user staff unconfined_u: object_r:user_home_t:s0 data.txt XK0-005: Full list of questions and answers B. id_rsa C. id_ecdsa D. id_rsa.pub - correct answer D. id_rsa.pub A Linux administrator cloned an existing Linux server and built a new server from that clone. The administrator encountered the following error after booting the cloned server: Device mismatch detected The administrator performed the commands listed below to further troubleshoot and mount the missing filesystem: #ls -al /dev/disk/by-uuid/ total 0 drwxr-xr-x 2 root 220 Jul 08:59 . drwxr-xr-x 2 root 160 Jul 08:59 . . 1rwxrwxrwx 1 root 26 Jul 11:10 2251a54-6c14-9187-df8629373 - > . ./. ./sdb 1rwxrwxrwx 1 root 26 Jul 11:10 4211c54-2a13-7291-bd8629373 - > . ./. ./sdc 1rwxrwxrwx 1 root 26 Jul 11:10 3451b54-6d10-3561-ad8629373 - > . ./. ./sdd XK0-005: Full list of questions and answers Which of the following should administrator use to resolve the device mismatch issue and mount the disk? A. mount disk by device-id B. fsck -A C. mount disk by-label D. mount disk by-blkid - correct answer C. mount disk by-label A systems administrator installed a new software program on a Linux server. When the systems administrator tries to run the program, the following message appears on the screen. Hardware virtualization support is not available on this system. Either is not present or disables in the system's BIOS Which of the following commands will allow the systems administrator to check whether the system supports virtualization? A. dmidecode -s system-version B. lscpu C. sysctl -a D. cat /sys/device/system/cpu/possible - correct answer B. lscpu XK0-005: Full list of questions and answers A Linux administrator created the directory /project/access2all. By creating this directory, the administrator is trying to avoid the deletion or modification of files from non-owners. Which of the following will accomplish this goal? A. chmod +t /project/access2all B. chmod +rws /project/access2all C. chmod 2770 /project/access2all D. chmod ugo+rwx /project/access2all - correct answer C. chmod 2770 /project/access2all A Linux systems administrator needs to persistently enable IPv4 forwarding in one of the Linux systems. Which of the following commands can be used together to accomplish this task? (Choose two.) A. sysctl net.ipv4.ip_forward B. sysctl -w net.ipv4.ip_forward=1 C. echo "net.ipv4.ip_forward=1" >> /etc/sysctl.conf D. echo 1 > /proc/sys/net/ipv4/ip_forward E. sysctl -p F. echo "net.ipv6.conf.all.forwarding=l" >> /etc/sysctl.conf - correct answer B. sysctl -w net.ipv4.ip_forward=1 C. echo "net.ipv4.ip_forward=1" >> /etc/sysctl.conf XK0-005: Full list of questions and answers administrator is still asked to provide a password during the connection. Given the following output: junior@server:=$ ls -lh .ssh/auth* -rw-------- 1 junior junior 566 sep 12 20:56 .ssh/authorized_key Which of the following commands would resolve the issue and allow an SSH connection to be established without a password? A. restorecon -rv .ssh/authorized_key B. mv .ssh/authorized_key .ssh/authorized_keys C. systemctl restart sshd.service D. chmod 600 mv .ssh/authorized_key - correct answer B. mv .ssh/authorized_key .ssh/authorized_keys A Linux administrator needs to resolve a service that has failed to start. The administrator runs the following command: ls -1 startup file The following output is returned ----------. root root 81k Sep 13 19:01 startupfile XK0-005: Full list of questions and answers Which of the following is MOST likely the issue? A. The service does not have permissions to read write the startupfile. B. The service startupfile size cannot be 81k. C. The service startupfile cannot be owned by root. D. The service startupfile should not be owned by the root group. - correct answer A. The service does not have permissions to read write the startupfile. A Linux engineer is setting the sticky bit on a directory called devops with 755 file permission. Which of the following commands will accomplish this task? A. chown -s 755 devops B. chown 1755 devops C. chmod -s 755 devops D. chmod 1755 devops - correct answer D. chmod 1755 devops A Linux administrator booted up the server and was presented with a non-GUI terminal. The administrator ran the command systemctl isolate graphical.target and rebooted the system by running systemctl reboot, which fixed the issue. However, the next day the administrator was XK0-005: Full list of questions and answers presented again with a non-GUI terminal. Which of the following is the issue? A. The administrator did not reboot the server properly. B. The administrator did not set the default target to basic.target. C. The administrator did not set the default target to graphical.target. D. The administrator did not shut down the server properly. - correct answer C. The administrator did not set the default target to graphical.target. Users report that connections to a MariaDB service are being closed unexpectedly. A systems administrator troubleshoots the issue and finds the following message in /var/log/messages: dbserver kernel: out of Memory: Killed process 1234 (mysqld) Which of the following is causing the connection issue? A. The process mysqld is using too many semaphores. B. The server is running out of file descriptors. C. Something is starving the server resources. D. The amount of RAM allocated to the server is too high. - correct answer C. Something is starving the server resources. XK0-005: Full list of questions and answers A. chgrp system accountname B. passwd -s accountname C. chmod -G system account name D. chage -E -1 accountname - correct answer D. chage -E -1 accountname 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 testReveal Solution - correct answer 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 XK0-005: Full list of questions and answers D. ssh-copy-id user@server - correct answer 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 - correct answer C. /etc/fstab A Linux administrator is troubleshooting a memory-related issue. Based on the output of the commands: Check the image 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 B. kill -9 8321 XK0-005: Full list of questions and answers 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. 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 .shh/auth* -rw-r--r--. admin uncofirmed_u:object_r:user_home_t:s0 .shh/authorized_keys Which of the following commands would resolve the issue? A. restorecon .ssh/authorized_keys XK0-005: Full list of questions and answers A. sudo fdisk /dev/sda B. sudo fdisk -s /dev/sda C. sudo fdisk -l D. sudo fdisk -h - correct answer C. sudo fdisk -l A systems administrator is investigating why one of the servers has stopped connecting to the internet. #curl http://google.com curl: (6) Could not resolve host: google.com # cat /etc/resolv.conf search user.company.com company.com #nameserver 10.10.10.10 #ip route 0.0.0.0/0 via 10.0.5.1 dev eth0 proto static metric 100 10.0.0.0/16 dev eth0 proto kernel scope link src 10.0.3.60 metric 101 #nmcli connection show XK0-005: Full list of questions and answers Which of the following is causing the issue? A. The DNS address has been commented out in the configuration file. B. The search entry in the /etc/resolv.conf file is incorrect. C. Wired connection 1 is offline. D. No default route is defined. - correct answer A. The DNS address has been commented out in the configuration file. A systems administrator is tasked with installing GRUB on the legacy MBR of the SATA hard drive. Which of the following commands will help the administrator accomplish this task? A. grub-install /dev/hda B. grub-install /dev/sda C. grub-install /dev/sr0 D. grub-install /dev/hd0,0 - correct answer B. grub-install /dev/sda A junior Linux administrator is tasked with installing an application. The installation guide states the application should only be installed in a run level 5 environment. $ systemctl get-default getty.target XK0-005: Full list of questions and answers Which of the following commands would ensure the server is set to runlevel 5? A. systemctl isolate multi-user.target B. systemctl isolate graphical.target C. systemctl isolate network.target D. systemctl isolate basic.target - correct answer B. systemctl isolate graphical.target A Linux administrator is tasked with adding users to the system. However, the administrator wants to ensure the users' access will be disabled once the project is over. The expiration date should be 2021- 09-30. Which of the following commands will accomplish this task? A. sudo useradd -e 2021-09-30 Project_user B. sudo useradd -c 2021-09-30 Project_user C. sudo modinfo -F 2021-09-30 Project_uses D. sudo useradd -m -d 2021-09-30 Project_user - correct answer A. sudo useradd -e 2021-09-30 Project_user A DevOps engineer needs to download a Git repository from https://git.company.com/admin/project.git. Which of the following commands will achieve this goal? XK0-005: Full list of questions and answers A Linux system is failing to start due to issues with several critical system processes. Which of the following options can be used to boot the system into the single user mode? (Choose two.) A. Execute the following command from the GRUB rescue shell: mount - o remount, ro/sysroot. B. Interrupt the boot process in the GRUB menu and add systemd.unit=single in the kernel line. C. Interrupt the boot process in the GRUB menu and add systemd.unit=rescue.target in the kernel line. D. Interrupt the boot process in the GRUB menu and add single=user in the kernel line. E. Interrupt the boot process in the GRUB menu and add init=/bin/bash in the kernel line. F. Interrupt the boot process in the GRUB menu and add systemd.unit=single.target in the kernel line. - correct answer C. Interrupt the boot process in the GRUB menu and add systemd.unit=rescue.target in the kernel line. E. Interrupt the boot process in the GRUB menu and add init=/bin/bash in the kernel line. A DevOps engineer needs to allow incoming traffic to ports in the range of 4000 to 5000 on a Linux server. Which of the following commands will enforce this rule? XK0-005: Full list of questions and answers A. iptables -f filter -I INPUT -p tcp --dport 4000:5000 -A ACCEPT B. iptables -t filter -A INPUT -p tcp --dport 4000:5000 -j ACCEPT C. iptables filter -A INPUT -p tcp --dport 4000:5000 -D ACCEPT D. iptables filter -S INPUT -p tcp --dport 4000:5000 -A ACCEPT - correct answer B. iptables -t filter -A INPUT -p tcp --dport 4000:5000 -j ACCEPT A Linux administrator needs to determine whether a hostname is in the DNS. Which of the following would supply the information that is needed? A. nslookup B. rsynс C. netstat D. host - correct answer A. nslookup A server is experiencing intermittent connection issues. Some connections to the Internet work as intended, but some fail as if there is no connectivity. The systems administrator inspects the server configuration: Check the image Which of the following is MOST likely the cause of the issue? XK0-005: Full list of questions and answers A. An internal-only DNS server is configured. B. The IP netmask is wrong for ens3. C. Two default routes are configured. D. The ARP table contains incorrect entries. - correct answer B. The IP netmask is wrong for ens3. A cloud engineer needs to block the IP address 192.168.10.50 from accessing a Linux server. Which of the following commands will achieve this goal? A. iptables -F INPUT -j 192.168.10.50 -m DROP B. iptables -A INPUT -s 192.168.10.30 -j DROP C. iptables -i INPUT --ipv4 192.168.10.50 -z DROP D. iptables -j INPUT 192.168.10.50 -p DROP - correct answer B. iptables -A INPUT -s 192.168.10.30 -j DROP A Linux systems administrator is configuring a new filesystem that needs the capability to be mounted persistently across reboots. Which of the following commands will accomplish this task? (Choose two.) A. df -h /data B. mkfs.ext4 /dev/sdc1 C. fsck /dev/sdc1 D. fdisk -l /dev/sdc1 XK0-005: Full list of questions and answers C. Overlay network D. Service mesh - correct answer D. Service mesh A development team asks an engineer to guarantee the persistency of journal log files across system reboots. Which of the following commands would accomplish this task? A. grep -i auto /etc/systemd/journald.conf && systemctl restart systemd-journald.service B. cat /etc/systemd/journald.conf | awk '(print $1,$3)' C. sed -i 's/auto/persistent/g' /etc/systemd/journald.conf && sed -i 'persistent/s/ˆ#//q' /etc/systemd/journald.conf D. journalctl --list-boots && systemctl restart systemd-journald.service - correct answer C. sed -i 's/auto/persistent/g' /etc/systemd/journald.conf && sed -i 'persistent/s/ˆ#//q' /etc/systemd/journald.conf A systems administrator is receiving tickets from users who cannot reach the application app that should be listening on port 9443/tcp on a Linux server. To troubleshoot the issue, the systems administrator runs netstat and receives the following output: # netstat -anp | grep appd | grep -w LISTEN tcp 0 0 127.0.0.1:9443 0.0.0.0:* LISTEN 1234/appd XK0-005: Full list of questions and answers Based on the information above, which of the following is causing the issue? A. The IP address 0.0.0.0 is not valid. B. The application is listening on the loopback interface. C. The application is listening on port 1234. D. The application is not running. - correct answer B. The application is listening on the loopback interface. A systems administrator is troubleshooting a connectivity issue pertaining to access to a system named db.example.com. The system IP address should be 192.168.20.88. The administrator issues the dig command and receives the following output: ;; ANSWER SELECTION: sb.example.com. 15 IN A 191.168.20.89 The administrator runs grep db.example.com /etc/hosts and receives the following output: 192.168.20.89 db.example.com Given this scenario, which of the following should the administrator do to address this issue? XK0-005: Full list of questions and answers A. Modify the /etc/hosts file and change the db.example.com entry to 192.168.20.89. B. Modify the /etc/network file and change the db.example.com entry to 192.168.20.88. C. Modify the /etc/network file and change the db.example.com entry to 192.168.20.89. D. Modify the /etc/hosts file and change the db.example.com entry to 192.168.20.88. - correct answer D. Modify the /etc/hosts file and change the db.example.com entry to 192.168.20.88. Users have been unable to reach www.comptia.org from a Linux server. A systems administrator is troubleshooting the issue and does the following: Check the image Based on the information above, which of the following is causing the issue? A. The name www.comptia.org does not point to a valid IP address. B. The server 192.168.168.53 is unreachable. C. No default route is set on the server. XK0-005: Full list of questions and answers -rw-rw----+ 1 root it 4 Sep 5 17:29 file Which of the following commands would permanently fix the access issue while limiting access to IT and finance department employees? A. chattr +i file B. chown it:finance file C. chmod 666 file D. setfacl -m g:finance:rw file - correct answer D. setfacl -m g:finance:rw file A Linux engineer needs to create a custom script, cleanup.sh, to run at boot as part of the system services. Which of the following processes would accomplish this task? A. Create a unit file in the /etc/default/ directory. systemctl enable cleanup systemctl is-enabled cleanup B. Create a unit file in the /etc/ske1/ directory. systemctl enable cleanup systemctl is-enabled cleanup C. Create a unit file in the /etc/systemd/system/ directory. systemctl enable cleanup XK0-005: Full list of questions and answers systemctl is-enabled cleanup D. Create a unit file in the /etc/sysctl.d/ directory. systemctl enable cleanup systemctl is-enabled cleanup - correct answer C. Create a unit file in the /etc/systemd/system/ directory. systemctl enable cleanup systemctl is-enabled cleanup A Linux system is failing to boot. The following error is displayed in the serial console: [[1;33mDEPEND[Om] Dependency failed for /data. [[1;33mDEPEND[Om] Dependency failed for Local File Systems ... Welcome to emergency mode! After logging in, type "journalctl -xb" to viewsystem logs, "systemctl reboot" to reboot, "systemctl default" to try again to boot into default mode. Give root password for maintenance (or type Control-D to continue) Which of the following files will need to be modified for this server to be able to boot again? A. /etc/mtab XK0-005: Full list of questions and answers B. /dev/sda C. /etc/fstab D. /ete/grub.conf - correct answer C. /etc/fstab A systems administrator frequently connects to a remote host via SSH and a non-standard port. The systems administrator would like to avoid passing the port parameter on the command line every time. Which of the following files can be used to set a different port value for that host? A. /etc/ssh/sshd_config B. /etc/ssh/moduli C. ~/.ssh/config D. ~/.ssh/authorized_keys - correct answer C. ~/.ssh/config A Linux administrator modified the SSH configuration file. Which of the following commands should be used to apply the configuration changes? A. systemctl stop sshd B. systemctl mask sshd C. systemctl reload sshd D. systemctl start sshd - correct answer C. systemctl reload sshd XK0-005: Full list of questions and answers Which of the following will allow the administrator to assign the v1 version to the image? A. docker image save test test:v1 B. docker image build test:v1 C. docker image tag test test:v1 D. docker image version test:v1 - correct answer C. docker image tag test test:vl A Linux systems administrator receives a notification that one of the server's filesystems is full. Which of the following commands would help the administrator to identify this filesystem? A. lsblk B. fdisk C. df -h D. du -ah - correct answer C. df -h A systems administrator is notified that the mysqld process stopped unexpectedly. The systems administrator issues the following command: sudo grep -i -r 'out of memory' /var/log XK0-005: Full list of questions and answers The output of the command shows the following: kernel: Out of memory: Kill process 9112 (mysqld) score 511 or sacrifice child. Which of the following commands should the systems administrator execute NEXT to troubleshoot this issue? (Select two). A. free -h B. nc -v 127.0.0.1 3306 C. renice -15 $( pidof mysql ) D. lsblk E. killall -15 F. vmstat -a 1 4 - correct answer A. free -h F. vmstat -a 1 4 Users have reported that the interactive sessions were lost on a Linux server. A Linux administrator verifies the server was switched to rescue.target mode for maintenance. Which of the following commands will restore the server to its usual target? A. telinit 0 B. systemctl reboot XK0-005: Full list of questions and answers C. systemctl get-default D. systemctl emergency - correct answer B. systemctl reboot A systems administrator was tasked with assigning the temporary IP address/netmask 192.168.168.1/255.255.255.255 to the interface eth0 of a Linux server.When adding the address, the following error appears: # ip address add 192.168.168.1/33 dev eth0 Error: any valid prefix is expected rather than "192.168.168.1/33" Based on the command and its output above, which of the following is the cause of the issue? A. The CIDR value /33 should be /32 instead. B. There is no route to 192.168.168.1/33. C. The interface eth0 does not exist. D. The IP address 192.168.168.1 is already in use. - correct answer A. The CIDR value /33 should be /32 instead. A Linux user reported the following error after trying to connect to the system remotely: ssh: connect to host 10.0.1.10 port 22: Resource temporarily unavailable. The Linux systems administrator executed the following commands in the Linux system while trying to diagnose this issue: XK0-005: Full list of questions and answers B. /boot/efi C. /efi D. /etc/efi - correct answer B. /boot/efi A Linux administrator copied a Git repository locally, created a feature branch, and committed some changes to the feature branch. Which of the following Git actions should the Linux administrator use to publish the changes to the main branch of the remote repository? A. rebase B. tag C. commit D. push - correct answer D. push A Linux administrator needs to obtain a list of all volumes that are part of a volume group. Which of the following commands should the administrator use to accomplish this task? A. vgs B. lvs C. fdisk -1 D. pvs - correct answer B. lvs XK0-005: Full list of questions and answers A Linux administrator is adding a new configuration file to a Git repository. Which of the following describes the correct order of Git commands to accomplish the task successfully? A. pull -> push -> add -> checkout B. pull -> add -> commit -> push C. checkout -> push -> add -> pull D. pull -> add -> push -> commit - correct answer B. pull -> add -> commit -> push A systems administrator is tasked with mounting a USB drive on a system. The USB drive has a single partition, and it has been mapped by the system to the device /dev/sdb. Which of the following commands will mount the USB to /media/usb? A. mount /dev/sdb1 /media/usb B. mount /dev/sdb0 /media/usb C. mount /dev/sdb /media/usb D. mount -t usb /dev/sdb1 /media/usb - correct answer A. mount /dev/sdb1 /media/usb User1 is a member of the accounting group. Members of this group need to be able to execute but not make changes to a script maintained by User2. The script should not be accessible to other users or groups. Which of the following will give proper access to the script? XK0-005: Full list of questions and answers A. chown user2:accounting script.shchmod 750 script.sh B. chown user1:accounting script.shchmod 777 script.sh C. chown accounting:user1 script.shchmod 057 script.sh D. chown user2:accounting script.shchmod u+x script.sh - correct answer A. chown user2:accounting script.shchmod 750 script.sh A systems administrator needs to verify whether the built container has the app.go file in its root directory. Which of the following can the administrator use to verify the root directory has this file? A. docker image inspect B. docker container inspect C. docker exec <container_name> ls D. docker ps <container_name> - correct answer C. docker exec <container_name> ls A Linux administrator is reviewing changes to a configuration file that includes the following section: tls: certificates: - certFile: /etc/ssl/cert.cer XK0-005: Full list of questions and answers D. docker rm --state exited - correct answer B. docker rm $(docker ps - aq) A Linux systems administrator receives reports from various users that an application hosted on a server has stopped responding at similar times for several days in a row. The administrator logs in to the system and obtains the following output: Check the image Which of the following should the administrator do to provide the BEST solution for the reported issue? A. Configure memory allocation policies during business hours and prevent the Java process from going into a zombie state while the server is idle. B. Configure a different nice value for the Java process to allow for more users and prevent the Java process from restarting during business hours. C. Configure more CPU cores to allow for the server to allocate more processing and prevent the Java process from consuming all of the available resources. D. Configure the swap space to allow for spikes in usage during peak hours and prevent the Java process from - correct answer D. Configure the swap space to allow for spikes in usage during peak hours and prevent the Java process from stopping due to a lack of memory. XK0-005: Full list of questions and answers A Linux administrator reviews a set of log output files and needs to identify files that contain any occurrence of the word denied. All log files containing entries in uppercase or lowercase letters should be included in the list. Which of the following commands should the administrator use to accomplish this task? A. find . -type f -print | xrags grep -ln denied B. find . -type f -print | xrags grep -nv denied C. find . -type f -print | xrags grep -wL denied D. find . -type f -print | xrags grep -li denied - correct answer D. find . - type f -print | xrags grep -li denied A cloud engineer needs to launch a container named web-01 in background mode. Which of the following commands will accomplish this task? A. docker builder -f --name web-01 httpd B. docker load --name web-01 httpd C. docker ps -a --name web-01 httpd D. docker run -d --name web-01 httpd - correct answer D. docker run -d --name web-01 httpd XK0-005: Full list of questions and answers A Linux administrator is providing a new Nginx image from the registry to local cache. Which of the following commands would allow this to happen? A. docker pull nginx B. docker attach nginx C. docker commit nginx D. docker import nginx - correct answer A. docker pull nginx Which of the following tools is BEST suited to orchestrate a large number of containers across many different servers? A. Kubernetes B. Ansible C. Podman D. Terraform - correct answer A. Kubernetes A Linux administrator is installing a web server and needs to check whether web traffic has already been allowed through the firewall. Which of the following commands should the administrator use to accomplish this task? A. firewalld query-service-http B. firewall-cmd --check-service http XK0-005: Full list of questions and answers 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 - correct answer C. rsync E. scp 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. - correct answer C. Create a mount unit and enable it to be started at boot. XK0-005: Full list of questions and answers Joe, a user, is unable to log in to the Linux system. Given the following output: # grep joe /etc/passwd /etc/shadow /etc/pasawd:joe:x:1001:1001::/hame/joe:/bin/nologin /etc/shadow:joe: $653u0W6aNx38763GhgRIsdERIET7634534voj.:18883:0:999:7::: 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 - correct answer A. usermod -s /bin/bash joe 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 XK0-005: Full list of questions and answers C. rpm --query /etc/httpd/conf/httpd.conf D. rpm -q /etc/httpd/conf/httpd.conf - correct answer A. rpm -qf /etc/httpd/conf/httpd.conf 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 - correct answer B. mv /home/tmp/tempa /home/tmp/temp 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? XK0-005: Full list of questions and answers 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 - correct answer D. $ nice -10 wget https://foo.com/installation.zip Which of the following data structures is written in JSON? A. --- name: user1 position: DevOps floor: 3 B. <table> <tbody><tr> <td>user1</td> <td>DevOps</td> <td>3</td></tr> </tbody></table> C. <root> XK0-005: Full list of questions and answers <floor>3</floor> <name>use1</name ><position>DevOps</position> </root> D. { "name" : "user1", "job" : "DevOps", "floor" : 3 } - correct answer D. { "name" : "user1", "job" : "DevOps", "floor" : 3 } Which of the following enables administrators to configure and enforce MFA on a Linux system? A. Kerberos B. SELinux C. PAM D. PKI - correct answer C. PAM XK0-005: Full list of questions and answers 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 - correct answer C. /etc/yum.repos.d/db.repo In which of the following filesystems are system logs commonly stored? A. /var B. /tmp C. /etc D. /opt - correct answer A. /var 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