11.11 Special Sale Limited Time 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: scxmas70

XK0-005 Exam Dumps - CompTIA Linux+ Exam

Question # 4

The users of a Linux system are unable to use one of the application filesystems. The following outputs have been provided:

bash

$ cd /app

$ touch file

touch: cannot touch 'file': Readonly file system

Output 2

/dev/sdcl on /app type ext4 (ro,relatime,seclabel,data=ordered)

Output 3

/dev/sdcl /app ext4 defaults 0 0

Output 4

[302.048075] Buffer I/O error on dev sdcl, logical block 0, async page read

[302.048490] EXT4-fs (sdcl): Attempt to read block from filesystem resulted in short read while trying to re-open /dev/sdcl

Which of the following actions will resolve this issue?

A.

umount /app fsck -y /dev/sdcl mount /app

B.

xfs_repair /dev/sdcl mount -o rw,remount /app

C.

umount /app xfs_repair /dev/sdcl mount /app

D.

fsck -y /dev/sdcl mount -o rw,remount /app

Full Access
Question # 5

A Linux systems administrator is troubleshooting an I/O latency on a single CPU server. The administrator runs a top command and receives the following output:

%Cpu(s): 0.2 us, 33.1 sy, 0.0 ni, 0.0 id, 52.4 wa, 0.0 hi, 0.2 si, 0.0 st

Which of the following is correct based on the output received from the exe-cuted command?

A.

The server's CPU is taking too long to process users' requests.

B.

The server's CPU shows a high idle-time value.

C.

The server's CPU is spending too much time waiting for data inputs.

D.

The server's CPU value for the time spent on system processes is low.

Full Access
Question # 6

A DevOps engineer is working on a local copy of a Git repository. The engineer would like to switch from the main branch to the staging branch but notices the staging branch does not exist. Which of the following Git commands should the engineer use to perform this task?

A.

git branch —m staging

B.

git commit —m staging

C.

git status —b staging

D.

git checkout —b staging

Full Access
Question # 7

Based on an organization’s new cybersecurity policies, an administrator has been instructed to ensure that, by default, all new users and groups that are created fall within the specified values below.

To which of the following configuration files will the required changes need to be made?

A.

/etc/login.defs

B.

/etc/security/limits.conf

C.

/etc/default/useradd

D.

/etc/profile

Full Access
Question # 8

A Linux administrator wants to prevent the httpd web service from being started both manually and automatically on a server. Which of the following should the administrator use to accomplish this task?

A.

systemctl mask httpd

B.

systemctl disable httpd

C.

systemctl stop httpd

D.

systemctl reload httpd

Full Access
Question # 9

A hardened physical Linux system allows regular, unprivileged users to remotely connect to the server using SSH only. No sudo tool has been installed. Which of the following should the Linux administrator use to perform administrative tasks on this host? (Select two).

A.

Create an SSH key and copy it to the remote server to allow passwordless login

B.

Access the server’s physical console and use the root user's password to log in

C.

Install the telnet server on this system to be able to use a root account

D.

Use the su command and enter the root user’s password

E.

Install the sudo command using the unprivileged user’s account

F.

Add the user to the wheel group

Full Access
Question # 10

A systems administrator is receiving complaints about slow performance and system crashes. The administrator suspects memory and CPU issues. Which of the following is the first action the administrator should take to troubleshoot and resolve these issues?

A.

Run resource monitoring tools like top or htop to view the current CPU and memory use.

B.

Look through the system logs and error messages to find any faults involving the CPU and memory.

C.

Remove and replace the CPU and memory components to address hardware issues.

D.

Reboot the server to clear any CPU and memory congestion.

Full Access
Question # 11

A systems administrator wants to permit access temporarily to an application running on port 1234/TCP on a Linux server. Which of the following commands will permit this traffic?

A.

firewall-cmd —new-service=1234/tcp

B.

firewall-cmd —service=1234 —protocol=tcp

C.

firewall-cmd —add—port=1234/tcp

D.

firewall-cmd —add-whitelist-uid=1234

Full Access
Question # 12

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

Full Access
Question # 13

Which of the following commands is used to tune kernel parameters?

A.

sysctl

B.

ss

C.

mkinitrd

D.

lsof

Full Access
Question # 14

A Linux system is having issues. Given the following outputs:

# dig @192.168.2.2 mycomptiahost

; << >> DiG 9.9.4-RedHat-9.9.4-74.el7_6.1 << >> @192.168.2.2 mycomptiahost

; (1 server found)

;; global options: +cmd

;; connection timed out; no servers could be reached

# nc -v 192.168.2.2 53

Ncat: Version 7.70 ( https://nmap.org/ncat )

Ncat: Connection timed out.

# ping 192.168.2.2

PING 192.168.2.2 (192.168.2.2) 56(84) bytes of data.

64 bytes from 192.168.2.2: icmp_seq=1 ttl=117 time=4.94 ms

64 bytes from 192.168.2.2: icmp_seq=2 ttl=117 time=10.5 ms

Which of the following best describes this issue?

A.

The DNS host is down.

B.

The name mycomptiahost does not exist in the DNS.

C.

The Linux engineer is using the wrong DNS port.

D.

The DNS service is currently not available or the corresponding port is blocked.

Full Access
Question # 15

A cloud engineer is installing packages during VM provisioning. Which of the following should the engineer use to accomplish this task?

A.

Cloud-init

B.

Bash

C.

Docker

D.

Sidecar

Full Access
Question # 16

A user is cleaning up a directory because it has more than 100,000 files that were generated from an experiment. When the user tries to remove the unneeded experiment files, the user receives an error:

arduino

cannot execute [Argument list too long]

Which of the following should the user execute to remove these files?

A.

find . -name "experiment*.txt" -exec rm "{}" ;

B.

rm -rf experiment*.txt

C.

rm --force experiment*.txt

D.

for i in experiment*.txt; do find . -name $i -exec rmdir "{}" ; done

Full Access
Question # 17

Some servers in an organization have been compromised. Users are unable to access to the organization’s web page and other services. While reviewing the system log, a systems administrator notices messages from the kernel regarding firewall rules:

Which of the following commands will remediate and help resolve the issue?

A.

B.

C.

D.

Full Access
Question # 18

A systems administrator needs to reconfigure a Linux server to allow persistent IPv4 packet forwarding. Which of the following commands is the correct way to accomplish this task?

A.

echo 1 > /proc/sys/net/ipv4/ipv_forward

B.

sysctl -w net.ipv4.ip_forward=1

C.

firewall-cmd --enable ipv4_forwarding

D.

systemct1 start ipv4_forwarding

Full Access
Question # 19

A Linux administrator needs to redirect all HTTP traffic temporarily to the new proxy server 192.0.2.25 on port 3128. Which of the following commands will accomplish this task?

A.

iptables -t nat -D PREROUTING -p tcp --sport 80 -j DNAT - -to-destination 192.0.2.25:3128

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

Full Access
Question # 20

A Linux administrator needs to correct the permissions of a log file on the server. Which of the following commands should be used to set filename.log permissions to -rwxr—r--. ?

A.

chmod 755 filename.log

B.

chmod 640 filename.log

C.

chmod 740 filename.log

D.

chmod 744 filename.log

Full Access
Question # 21

A systems administrator receives the following errors via email from the system log:

go

XFS (loop0): Metadata CRC error detected at xfs_agi_read_verify+0xcb/0xfe

XFS (loop0): First 128 bytes of corrupted metadata buffer

XFS (loop0): metadata I/O error in "xfs_trans_read_buf_map" at daddr 0x2 len 1 error 74

A few minutes later, the administrator starts receiving reports that some of the images in the company's website are not loading properly. The systems administrator runs some commands and receives the following outputs:

css

Output 1

NAME FSTYPE UUID MOUNTPOINT

sda ext4 02ae47-fe457-45bc /

sdb xfs 347c7056 /var/www/html

Output 2

DocumentRoot "/var/www/html"

Output 3

httpd.service - The Apache HTTP Server

Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)

Active: active (running) since Sun 1991-05-24 16:12:43 UTC; 30y ago

Main PID: 252 (httpd)

Which of the following would be the appropriate steps to take to solve this issue?

A.

systemctl stop httpd umount /dev/sdb1 xfs_repair /dev/sdb1 mount /dev/sdb1 /var/www/html systemctl start httpd

B.

umount /dev/sdb1 xfs_repair /dev/sdb1 xfs_metadump /dev/sdb1 mount /dev/sdb1 /var/www/html systemctl restart httpd

C.

umount /dev/sdb1 systemctl stop httpd xfs_metadump /dev/sdb1 mount /dev/sdb1 /var/www/html systemctl start httpd

D.

systemctl stop httpd xfs_check -L /dev/sdb umount /var/www/html systemctl start httpd

Full Access
Question # 22

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.

Full Access
Question # 23

An administrator runs ping comptia.org. The result of the command is:

ping: comptia.org: Name or service not known

Which of the following files should the administrator verify?

A.

/etc/ethers

B.

/etc/services

C.

/etc/resolv.conf

D.

/etc/sysctl.conf

Full Access
Question # 24

Which of the following actions are considered good security practices when hardening a Linux server? (Select two).

A.

Renaming the root account to something else

B.

Removing unnecessary packages

C.

Changing the default shell to /bin/csh

D.

Disabling public key authentication

E.

Disabling the SSH root login possibility

F.

Changing the permissions on the root filesystem to 600

Full Access
Question # 25

A Linux administrator has defined a systemd script docker-repository.mount to mount a volume for use by the Docker service. The administrator wants to ensure that the Docker service does not start until the volume is mounted. Which of the following configurations needs to be added to the Docker service definition to best accomplish this task?

A.

After=docker-repository.mount

B.

ExecStart=/usr/bin/mount -a

C.

Requires=docker-repository.mount

D.

RequiresMountsFor=docker-repository.mount

Full Access
Question # 26

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:

The administrator reviews the information below:

Which of the following is causing the connectivity issue?

A.

The workstation has the wrong IP settings.

B.

The sshd service is disabled.

C.

The server’s firewall is preventing connections from being made.

D.

The server has an incorrect default gateway configuration.

Full Access
Question # 27

A cloud engineer needs to change the secure remote login port from 22 to 49000. Which of the following files should the engineer modify to change the port number to the desired value?

A.

/etc/host.conf

B.

/etc/hostname

C.

/etc/services

D.

/etc/ssh/sshd_config

Full Access
Question # 28

A systems administrator is investigating why one of the servers has stopped connecting to the internet.

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.

Full Access
Question # 29

A Linux administrator is implementing a stateful firewall on the Linux server. Which of the following iptables options will be required to build the stateful rules? (Select two).

A.

--name established

B.

-m recent

C.

-m conntrack

D.

--state

E.

--remove

F.

-j DROP

Full Access
Question # 30

A systems administrator pressed Ctrl+Z after starting a program using the command line, and the shell prompt was presented. In order to go back to the program, which of the following commands can the administrator use?

A.

fg

B.

su

C.

bg

D.

ed

Full Access
Question # 31

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

D.

docker exec -d app /bin/bash

Full Access
Question # 32

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:

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.

Full Access
Question # 33

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

Full Access
Question # 34

A Linux administrator has set up a new DNS forwarder and is configuring all internal servers to use the new forwarder to look up external DNS requests. The administrator needs to modify the firewall on the server for the DNS forwarder to allow the internal servers to communicate to it and make the changes persistent between server reboots. Which of the following commands should be run on the DNS forwarder server to accomplish this task?

A.

ufw allow out dns

B.

systemct1 reload firewalld

C.

iptables -A OUTPUT -p udp -ra udp -dport 53 -j ACCEPT

D.

flrewall-cmd --zone-public --add-port-53/udp --permanent

Full Access
Question # 35

Ann, a security administrator, is performing home directory audits on a Linux server. Ann issues the su Joe command and then issues the Is command. The

output displays files that reside in Ann's home directory instead of Joe's. Which of the following represents the command Ann should have issued in order to list Joe's files?

A.

su - Joe

B.

sudo Joe

C.

visudo Joe

D.

pkexec joe

Full Access
Question # 36

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:

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.

Full Access
Question # 37

A new Linux systems administrator just generated a pair of SSH keys that should allow connection to the servers. Which of the following commands can be used to copy a key file to remote servers? (Choose two.)

A.

wget

B.

ssh-keygen

C.

ssh-keyscan

D.

ssh-copy-id

E.

ftpd

F.

scp

Full Access
Question # 38

A systems administrator is enabling LUKS on a USB storage device with an ext4 filesystem format. The administrator runs dmesg and notices the following output:

Given this scenario, which of the following should the administrator perform to meet these requirements? (Select three).

A.

gpg /dev/sdcl

B.

pvcreate /dev/sdc

C.

mkfs . ext4 /dev/mapper/LUKSCJ001 - L ENCRYPTED

D.

umount / dev/ sdc

E.

fdisk /dev/sdc

F.

mkfs . vfat /dev/mapper/LUKS0001 — L ENCRYPTED

G.

wipefs —a/dev/sdbl

Full Access
Question # 39

Which of the following data structures is written in JSON?

A)

B)

C)

D)

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Full Access
Question # 40

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

Full Access
Question # 41

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

Full Access
Question # 42

A systems administrator created a new directory with specific permissions. Given the following output:

arduino

$ ls -ld /comptia

drwxr-x--- 2 root root 4096 Oct 20 20:13 /comptia

$ getfacl /comptia

# file: /comptia

# owner: root

# group: root

user::rwx

group::r-x

other::---

default:user::rwx

default:group::r-x

default:group:wheel:rwx

default:mask::rwx

default:other::---

Which of the following permissions are enforced on /comptia?

A.

Members of the wheel group can read files in /comptia.

B.

Newly created files in /comptia will have the sticky bit set.

C.

Other users can create files in /comptia.

D.

Only root can create files in /comptia.

Full Access
Question # 43

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

Full Access
Question # 44

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

Full Access
Question # 45

A Linux administrator is troubleshooting an issue in which users are not able to access https://portal.comptia.org from a specific workstation. The

administrator runs a few commands and receives the following output:

Which of the following tasks should the administrator perform to resolve this issue?

A.

Update the name server in resolv. conf to use an external DNS server.

B.

Remove the entry for portal . comptia.org from the local hosts file.

C.

Add a network route from the 10.10.10.0/24 to the 192.168.0.0/16.

D.

Clear the local DNS cache on the workstation and rerun the host command.

Full Access
Question # 46

Which of the following will prevent non-root SSH access to a Linux server?

A.

Creating the /etc/nologin file

B.

Creating the /etc/nologin.allow file containing only a single line root

C.

Creating the /etc/nologin/login.deny file containing a single line +all

D.

Ensuring that /etc/pam.d/sshd includes account sufficient pam_nologin.so

Full Access
Question # 47

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

Full Access
Question # 48

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 enp1s0f1. 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-enplsOfl

C.

ifconfig 10.0.6.5/24 enpsIs0f1

D.

nmcli conn add lpv4.address-10.0.6.5/24 ifname enpls0f1

Full Access
Question # 49

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.

systemct1 reboot

C.

systemct1 get-default

D.

systemct1 emergency

Full Access
Question # 50

An administrator needs to make some changes in the IaC declaration templates. Which of the following commands would maintain version control?

A.

git clone https://github.com/comptia/linux+-.git

git push origin

B.

git clone https://qithub.com/comptia/linux+-.git

git fetch New-Branch

C.

git clone https://github.com/comptia/linux+-.git

git status

D.

git clone https://github.com/comptia/linuxt+-.git

git checkout -b

Full Access
Question # 51

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

Full Access
Question # 52

Due to performance issues on a server, a Linux administrator needs to termi-nate an unresponsive process. Which of the following commands should the

administrator use to terminate the process immediately without waiting for a graceful shutdown?

A.

kill -SIGKILL 5545

B.

kill -SIGTERM 5545

C.

kill -SIGHUP 5545

D.

kill -SIGINT 5545

Full Access
Question # 53

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.

systemct1 status

B.

systemct1 stop

C.

systemct1 reinstall

D.

systemct1 daemon-reload

Full Access
Question # 54

A systems administrator is implementing a new service task with systems at startup and needs to execute a script entitled test.sh with the following content:

The administrator tries to run the script after making it executable with chmod +x; however, the script will not run. Which of the following should the administrator do to address this issue? (Choose two.)

A.

Add #!/bin/bash to the bottom of the script.

B.

Create a unit file for the new service in /etc/systemd/system/ with the name helpme.service in the location.

C.

Add #!//bin/bash to the top of the script.

D.

Restart the computer to enable the new service.

E.

Create a unit file for the new service in /etc/init.d with the name helpme.service in the location.

F.

Shut down the computer to enable the new service.

Full Access
Question # 55

A Linux administrator modified the SSH configuration file. Which of the following commands should be used to apply the configuration changes?

A.

systemct1 stop sshd

B.

systemct1 mask sshd

C.

systemct1 reload sshd

D.

systemct1 start sshd

Full Access
Question # 56

A Linux administrator needs to expose port 9000 for a container to listen during runtime. The Linux administrator creates a Dockerfile with the following entries:

sql

FROM node:9-alpine

WORKDIR /usr/src/app

COPY package.json ./

RUN npm install

COPY . .

EXPOSE 9000

CMD ["npm", "start"]

Which of the following commands should the administrator use to accomplish this task? (Select two).

A.

docker build -t Test-Container

B.

docker tag Test-Container

C.

docker inspect Test-Container

D.

docker run -p 5000:80 Test-Container

E.

docker push Test-Container

F.

docker run -p 80:9000 Test-Container

Full Access
Question # 57

When trying to log in remotely to a server, a user receives the following message:

The server administrator is investigating the issue on the server and receives the following outputs:

Which of the following is causing the issue?

A.

The wrong permissions are on the user’s home directory.

B.

The account was locked out due to three failed logins.

C.

The user entered the wrong password.

D.

The user has the wrong shell assigned to the account.

Full Access
Question # 58

An administrator is running a web server in a container named WEB, but none of the error output is showing. Which of the following should the administrator use to generate the errors on the container?

A.

docker-compose inspect WEB

B.

docker logs WEB

C.

docker run --name WEB --volume /dev/stdout:/var/log/nginx/error.log

D.

docker ps WEB -f

Full Access
Question # 59

A Linux administrator has installed a web server, a database server, and a web application on a server. The web application should be active in order to render the web pages. After the administrator restarts the server, the website displays the following message in the browser: Error establishing a database connection. The Linux administrator reviews the following relevant output from the systemd init files:

The administrator needs to ensure that the database is available before the web application is started. Which of the following should the administrator add to the HTTP server .service file to accomplish this task?

A.

TRIGGERS=mariadb.service

B.

ONFAILURE=mariadb.service

C.

WANTEDBY=mariadb.service

D.

REQUIRES=mariadb.service

Full Access
Question # 60

A systems administrator is installing various software packages using a pack-age 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

Full Access
Question # 61

A Linux administrator is troubleshooting the root cause of a high CPU load and average.

Which of the following commands will permanently resolve the issue?

A.

renice -n -20 6295

B.

pstree -p 6295

C.

iostat -cy 1 5

D.

kill -9 6295

Full Access
Question # 62

One leg of an LVM-mirrored volume failed due to the underlying physical volume, and a systems administrator is troubleshooting the issue. The following output has been provided:

Given this scenario, which of the following should the administrator do to recover this volume?

A.

Reboot the server. The volume will automatically go back to linear mode.

B.

Replace the failed drive and reconfigure the mirror.

C.

Reboot the server. The volume will revert to stripe mode.

D.

Recreate the logical volume.

Full Access
Question # 63

An administrator is running a web server in a container named web, but none of the error output is not showing. Which of the following should the administrator use to generate the errors on the container?

A.

docker-compose inspect WEB

B.

dockerlogs WEB

C.

dockerrun —nameWEB —volume/dev/stdout:/var/log/nginx/error.log

D.

dockerps WEB -f

Full Access
Question # 64

A systems technician is working on deploying several microservices to various RPM-based systems, some of which could run up to two hours. Which of the following commands will allow the technician to execute those services and continue deploying other microservices within the same terminal section?

A.

gedit & disown

B.

kill 9 %1

C.

fg %1

D.

bg %1 job name

Full Access
Question # 65

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.

Isscsi

B.

fdisk

C.

blkid

D.

partprobe

Full Access
Question # 66

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.

systemct1 enable cleanup

systemct1 is-enabled cleanup

B.

Create a unit file in the /etc/ske1/ directory.

systemct1 enable cleanup

systemct1 is-enabled cleanup

C.

Create a unit file in the /etc/systemd/system/ directory.

systemct1 enable cleanup

systemct1 is-enabled cleanup

D.

Create a unit file in the /etc/sysctl.d/ directory.

systemct1 enable cleanup

systemct1 is-enabled cleanup

Full Access
Question # 67

A Linux systems administrator is working to obtain the installed kernel version of several hundred systems. Which of the following utilities should the administrator use for this task?

A.

Ansible

B.

Git

C.

Docker

D.

Bash

Full Access
Question # 68

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:

Which of the following commands will resolve this issue?

A.

firewall-cmd --zone=public --permanent --add-service=22

B.

systemct1 enable firewalld; systemct1 restart firewalld

C.

firewall-cmd --zone=public --permanent --add-service=ssh

D.

firewall-cmd --zone=public --permanent --add-port=22/udp

Full Access
Question # 69

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

B.

docker info

C.

docker start

D.

docker inspect

Full Access
Question # 70

Which of the following commands is used to configure the default permissions for new files?

A.

setenforce

B.

sudo

C.

umask

D.

chmod

Full Access
Question # 71

A systems administrator is tasked with creating a cloud-based server with a public IP address.

Which of the following technologies did the systems administrator use to complete this task?

A.

Puppet

B.

Git

C.

Ansible

D.

Terraform

Full Access
Question # 72

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

D.

podman exec -p 8443:443 httpd

Full Access
Question # 73

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.

Full Access
Question # 74

A systems administrator needs to know the mail exchange (MX) record for the foo.com domain. Which of the following commands will accomplish this task?

A.

telnet mx foo.com

B.

dig mx foo.com

C.

nslookup mx foo.com

D.

host mx foo.com

Full Access
Question # 75

Joe, a user, is unable to log in to the system. The Linux administrator checks the /etc/passwd file and reviews the following output:

Joe:x:1002:1002::/home/Joe:/sbin/nologin

Which of the following should the administrator do to fix this issue?

A.

Remove the x entry in the /etc/passwd file for Joe

B.

Change the /sbin/nologin entry to /bin/sh for Joe

C.

Issue the usermod -l Joe command

D.

Ensure that a corresponding entry is in the /etc/shadow file for Joe

Full Access
Question # 76

Which of the following technologies provides load balancing, encryption, and observability in containerized environments?

A.

Virtual private network

B.

Sidecar pod

C.

Overlay network

D.

Service mesh

Full Access
Question # 77

Which of the following directories is the mount point in a UEFI system?

A.

/sys/efi

B.

/boot/efi

C.

/efi

D.

/etc/efi

Full Access
Question # 78

The group owner of the / home/ test directory would like to preserve all group permissions on files created in the directory. Which of the following

commands should the group owner execute?

A.

chmod g+s /home/test

B.

chgrp test /home/test

C.

chmod 777 /home/test

D.

chown —hR test /home/test

Full Access
Question # 79

Which of the following can be used as a secure way to access a remote termi-nal?

A.

TFTP

B.

SSH

C.

SCP

D.

SFTP

Full Access
Question # 80

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.

Which of the following commands would ensure the server is set to runlevel 5?

A.

systemct1 isolate multi-user.target

B.

systemct1 isolate graphical.target

C.

systemct1 isolate network.target

D.

systemct1 isolate basic.target

Full Access
Question # 81

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

Full Access
Question # 82

Users have been unable to reach www.comptia.org from a Linux server. A systems administrator is troubleshooting the issue and does the following:

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.

D.

The network interface eth0 is disconnected.

Full Access
Question # 83

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: fl / etc/ passwd > 500

C.

awk -F: ‘$3 > 500 {print $1}' /etc/passwd

D.

sed '/UID/' /etc/passwd < 500

Full Access
Question # 84

A Linux administrator recently downloaded a software package that is currently in a compressed file. Which of the following commands will extract the files?

A.

unzip -v

B.

bzip2 -z

C.

gzip

D.

funzip

Full Access
Question # 85

A Linux administrator would like to measure possible packet loss between a workstation and a remote web application that is running on port 443. Which of the following would be the best command for the administrator to use to display this information?

A.

ping -c 50

B.

tcpdump -p 443

C.

mtr -T -P 443

D.

traceroute -p 443

Full Access
Question # 86

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 root@192.168.2.14

D.

hostnamectl set-hostname Comptia-WebNode --transient

Full Access
Question # 87

A Linux administrator is tasked with moving files in a database server. The administrator must not overwrite any existing files. Which of the following commands would indicate that the file already exists?

A.

mv-ifilename/tmp/backup

B.

mv-bfilename/tmp/backup

C.

mv-nfilename/tmp/backup

D.

mv-ffilename/tmp/backup

Full Access
Question # 88

A systems administrator is working on a security report from the Linux servers. Which of the following commands can the administrator use to display all the firewall rules applied to the Linux servers? (Select two).

A.

ufw limit

B.

iptables —F

C.

systemct1 status firewalld

D.

firewall—cmd ——1ist—a11

E.

ufw status

F.

iptables —A

Full Access
Question # 89

A technician just fixed a few issues in some code and is ready to deploy the code into production. Which of the following steps should the technician take next?

A.

Create a new branch using git checkout.

B.

Perform a git clone to pull main down.

C.

Create a git pull request to merge into main.

D.

Perform a git pull to update the local copy of the code.

Full Access
Question # 90

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? (Select TWO)

A.

rsyslog

B.

cp

C.

rsync

D.

reposync

E.

scp

F.

ssh

Full Access
Question # 91

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

Full Access
Question # 92

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

Full Access
Question # 93

A user reported issues when trying to log in to a Linux server. The following outputs were received:

Given the outputs above. which of the following is the reason the user is una-ble 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 incorrect.

D.

The user1 password is expired.

Full Access
Question # 94

A Linux administrator updated the configuration file for the httpd web service. The administrator needs to apply the updated changes to the service without interrupting any running sessions. Which of the following commands should the administrator run to accomplish this task?

A.

systemctl reload httpd

B.

systemctl restart httpd

C.

systemctl status httpd

D.

systemctl mask httpd

Full Access
Question # 95

A systems administrator is tasked with configuring a repository on an RPM-based Linux system. Which of the following need to be reviewed and modified? (Select two).

A.

/etc/yum.conf

B.

/etc/apt/sources.list.d

C.

/etc/pam.d

D.

/etc/apt.conf

E.

/etc/yum.repos.d

F.

/etc/ssh/ssh_config

Full Access
Question # 96

Which of the following should be used to verify the integrity of a file?

A.

sha256sum

B.

fsck

C.

gpg —d

D.

hashcat

Full Access
Question # 97

A systems administrator creates a public key for authentication. Which of the following tools is most suitable to use when uploading the key to the remote

servers?

A.

scp

B.

ssh-copy-id

C.

ssh-agent

D.

ssh-keyscan

Full Access
Question # 98

Application code is stored in Git. Due to security concerns, the DevOps engineer does not want to keep a sensitive configuration file, app . conf, in the

repository. Which of the following should the engineer do to prevent the file from being uploaded to the repository?

A.

Run git exclude app. conf.

B.

Run git stash app. conf.

C.

Add app . conf to . exclude.

D.

Add app . conf to . gitignore.

Full Access
Question # 99

A cloud engineer needs to check the link status of a network interface named eth1 in a Linux server. Which of the following commands can help to achieve the goal?

A.

ifconfig hw eth1

B.

netstat -r eth1

C.

ss -ti eth1

D.

ip link show eth1

Full Access
Question # 100

A Linux user is trying to execute commands with sudo but is receiving the following error:

$ sudo visudo

>>> /etc/sudoers: syntax error near line 28 <<<

sudo: parse error in /etc/sudoers near line 28

sudo: no valid sudoers sources found, quitting

The following output is provided:

# grep root /etc/shadow

root :* LOCK *: 14600 ::::::

Which of the following actions will resolve this issue?

A.

Log in directly using the root account and comment out line 28 from /etc/sudoers.

B.

Boot the system in single user mode and comment out line 28 from /etc/sudoers.

C.

Comment out line 28 from /etc/sudoers and try to use sudo again.

D.

Log in to the system using the other regular user, switch to root, and comment out line 28 from /etc/sudoers.

Full Access
Question # 101

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"

Full Access
Question # 102

A systems administrator detected corruption in the /data filesystem. Given the following output:

Which of the following commands can the administrator use to best address this issue?

A.

umount /data

mkfs . xfs /dev/sclcl

mount /data

B.

umount /data

xfs repair /dev/ sdcl

mount /data

C.

umount /data

fsck /dev/ sdcl

mount / data

D.

umount /data

pvs /dev/sdcl

mount /data

Full Access
Question # 103

A Linux administrator is configuring a log collector agent to monitor logs in /var/log/collector. The agent is reporting that it cannot write to the directory. The agent runs as the logger user account. The administrator runs a few commands and reviews the following output:

makefile

Output 1:

drwxr-xr-x. 1 root root 0 Oct 20:13 collector

Output 2:

file: /var/log/collector

owner: root

group: root

user::rwx

group::r-x

mask::rwx

other::r-x

Output 3:

uid=1010(logger) gid=1010(monitor) groups=1010(monitor)

Which of the following is the best way to resolve the issue?

A.

setfacl -Rm u:logger

/var/log/collector

B.

usermod -aG root logger

C.

chmod 644 /var/log/collector

D.

chown -R logger

/var/log

Full Access
Question # 104

A junior developer is unable to access an application server and receives the following output:

The systems administrator investigates the issue and receives the following output:

Which of the following commands will help unlock the account?

A.

Pam_tally2 --user=dev2 —-quiet

B.

pam_ tally2 --user=dev2

C.

pam_tally2 -–user+dev2 —-quiet

D.

pam_tally2 --user=dev2 —-reset

Full Access
Question # 105

A Linux engineer set up two local DNS servers (10.10.10.10 and 10.10.10.20) and was testing email connectivity to the local mail server using the mail command on a local machine when the following error appeared:

The local machine DNS settings are:

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

Full Access
Question # 106

An administrator needs to make an application change via a script that must be run only in console mode. Which of the following best represents the sequence the administrator should execute to accomplish this task?

A.

systemct1 isolate multi-user.target

sh script.sh

systemct1 isolate graphical.target

B.

systemct1 isolate graphical.target

sh script.sh

systemct1 isolate multi-user.target

C.

sh script.sh

systemct1 isolate multi-user.target

systemct1 isolate graphical.target

D.

systemct1 isolate multi-user.target

systemct1 isolate graphical.target

sh script.sh

Full Access
Question # 107

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

Full Access
Question # 108

A junior administrator is trying to set up a passwordless SSH connection to one of the servers. The administrator follows the instructions and puts the key in the authorized_key file at the server, but the administrator is still asked to provide a password during the connection.

Given the following output:

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.

systemct1 restart sshd.service

D.

chmod 600 mv .ssh/authorized_key

Full Access
Question # 109

Which of the following would significantly help to reduce data loss if more than one drive fails at the same time?

A.

Server clustering

B.

Load balancing

C.

RAID

D.

VDI

Full Access
Question # 110

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.

Full Access
Question # 111

An administrator wants to execute a long-running script in the terminal while troubleshooting another issue. Which of the following options will achieve this goal?

A.

bash script.sh &

B.

source script.sh

C.

sh script.sh | jobs

D.

nice -10 ./script.sh

Full Access
Question # 112

After starting an Apache web server, the administrator receives the following error:

Apr 23 localhost.localdomain httpd 4618] : (98) Address already in use: AH00072: make_sock: could not bind to address [: :]80

Which of the following commands should the administrator use to further trou-bleshoot this issue?

A.

Ss

B.

Ip

C.

Dig

D.

Nc

Full Access