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

Exact2Pass Menu

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 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 # 6

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

D.

apt remove packagename

Full Access
Question # 7

A systems administrator is configuring a Linux system so that network traffic from the internal network 172.17.0.0/16 going out through the eth0 interface would appear as if it was sent directly from this interface. Which of the following commands will accomplish this task?

A.

iptables -A POSTROUTING -s 172.17.0.0/16 -o eth0 -j MASQUERADE

B.

firewalld -A OUTPUT -s 172.17.0.0/16 -o eth0 -j DIRECT

C.

nmcli snasq-traffic eth0 -s 172.17.0.0/16 -j MASQUERADE

D.

ifconfig --nat eth0 -s 172.17.0.0/16 -j DIRECT

Full Access
Question # 8

A developer needs to launch an Nginx image container, name it Web001, and ex-pose port 8080 externally while mapping to port 80 inside the container. Which of the following commands will accomplish this task?

A.

docker exec —it -p 8080: 80 ——name Web001 nginx

B.

docker load -it -p 8080:80 ——name Web001 nginx

C.

docker run -it -P 8080:80 ——name Web001 nginx

D.

docker pull -it -p 8080:80 —name Web00l nginx

Full Access
Question # 9

A Linux administrator was notified that a virtual server has an I/O bottleneck. The Linux administrator analyzes the following output:

Given there is a single CPU in the sever, which of the following is causing the slowness?

A.

The system is running out of swap space.

B.

The CPU is overloaded.

C.

The memory is exhausted.

D.

The processes are paging.

Full Access
Question # 10

A new application container was built with an incorrect version number. Which of the following commands should be used to rename the image to match the correct version 2.1.2?

A.

docker tag comptia/app:2.1.1 comptia/app:2.1.2

B.

docker push comptia/app:2.1.1 comptia/app:2.1.2

C.

docker rmi comptia/app:2.1.1 comptia/app:2.1.2

D.

docker update comptia/app:2.1.1 comptia/app:2.1.2

Full Access
Question # 11

An administrator is trying to diagnose a performance issue and is reviewing the following output:

System Properties:

CPU: 4 vCPU

Memory: 40GB

Disk maximum IOPS: 690

Disk maximum throughput: 44Mbps | 44000Kbps

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.

Full Access
Question # 12

A Linux administrator created a virtual clone of a physical server and would like to remove any existing entries related to SSH keys from outside entities on the virtual clone. Which of the following files should the administrator remove? (Select two).

A.

~/.ssh/authorized_keys

B.

~/.ssh/known_hosts

C.

/etc/ssh/ssh_config

D.

~/.ssh/config

E.

/etc/ssh/sshd_config

F.

/etc/ssh/ssh_host_rsa_key.pub

Full Access
Question # 13

A systems administrator checked out the code from the repository, created a new branch, made changes to the code, and then updated the main branch. The systems administrator wants to ensure that the Terraform state files do not appear in the main branch. Which of following should the administrator use to meet this requirement?

A.

clone

B.

gitxgnore

C.

get

D.

.ssh

Full Access
Question # 14

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/f stab 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

Full Access
Question # 15

A Linux administrator found many containers in an exited state. Which of the following commands will allow the administrator to clean up the containers in an exited state?

A.

docker rm --all

B.

docker rm $(docker ps -aq)

C.

docker images prune *

D.

docker rm --state exited

Full Access
Question # 16

A Linux administrator needs to expand a volume group using a new disk. Which of the following options presents the correct sequence of commands to accomplish the task?

A.

partprobe

vgcreate

lvextend

B.

lvcreate

fdisk

partprobe

C.

fdisk

partprobe

mkfs

D.

fdisk

pvcreate

vgextend

Full Access
Question # 17

Users are reporting that a Linux server is responding slowly. A systems administrator troubleshooting the server issue sees the following iostat output, with %iowait at 50.38. Which of the following is most likely the issue?

A.

The CPU is mostly waiting for I/O operations.

B.

/ filesystem does not have enough storage allocated.

C.

/var filesystem is almost full.

D.

The CPU capacity is inadequate.

Full Access
Question # 18

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 # 19

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 # 20

An operations engineer is planning to start a container running a PostgreSQL database. The engineer wants the container to start automatically at system startup, mount the /home/db directory as /var/lib/postgresql inside the container, and expose port 5432 to the OS. Which of the following commands should the engineer run to achieve this task?

A.

docker run -d --restart always -p 5432:5432 -v /home/db:/var/lib/postgresql postgresql:12

B.

docker run -d --restart -p 5432:5432 --volume /var/lib/postgresql:/home/db postgresql:12

C.

docker run -d --attach --platform 5432:5432 --volume /home/db:/var/lib/postgresql postgresql:12

D.

docker run -d --init --restart --publish 5432:5432 --workdir /home/db:/var/lib/postgresql postgresql:12

Full Access
Question # 21

A Linux administrator needs to create an image named sda.img from the sda disk and store it in the /tmp directory. Which of the following commands should be used to accomplish this task?

A.

dd of=/dev/sda if=/tmp/sda.img

B.

dd if=/dev/sda of=/tmp/sda.img

C.

dd --if=/dev/sda --of=/tmp/sda.img

D.

dd --of=/dev/sda --if=/tmp/sda.img

Full Access
Question # 22

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 # 23

Which of the following specifications is used to perform disk encryption in a Linux system?

A.

LUKS

B.

TLS

C.

SSL

D.

NFS

Full Access
Question # 24

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

A.

sysctl

B.

ss

C.

mkinitrd

D.

lsof

Full Access
Question # 25

A developer has been unable to remove a particular data folder that a team no longer uses. The developer escalated the issue to the systems administrator. The following output was received:

Which of the following commands can be used to resolve this issue?

A.

chgrp -R 755 data/

B.

chmod -R 777 data/

C.

chattr -R -i data/

D.

chown -R data/

Full Access
Question # 26

A Linux administrator is configuring network traffic forwarding. Despite having proper iptables rules, the traffic forwarding is not working. Which of the following commands will allow Linux to pass network traffic between different interfaces?

A.

nmcli allow-forwarding eth0

B.

echo 'net.ipv4.ip_forward=1' >> /etc/sysctl.conf; sysctl -p

C.

ip route forward allow --all-interfaces; systemctl restart network

D.

modprobe ip_forward

Full Access
Question # 27

Using AD Query, the security gateway connections to the Active Directory Domain Controllers using what protocol?

A.

Windows Management Instrumentation (WMI)

B.

Hypertext Transfer Protocol Secure (HTTPS)

C.

Lightweight Directory Access Protocol (LDAP)

D.

Remote Desktop Protocol (RDP)

Full Access
Question # 28

As a Systems Administrator, to reduce disk space, you were tasked to create a shell script that does the following:

Add relevant content to /tmp/script.sh, so that it finds and compresses rotated files in /var/log without recursion.

INSTRUCTIONS

Fill the blanks to build a script that performs the actual compression of rotated log files.

If at any time you would like to bring back the initial state of the simulation, please click the Reset All button.

Full Access
Question # 29

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 # 30

After connecting to a remote host via SSH, an administrator attempts to run an application but receives the following error:

[user@workstation ~]$ ssh admin@srv1

Last login: Tue Mar 29 18:03:34 2022

[admin@srvl ~] $ /usr/local/bin/config_manager

Error: cannot open display:

[admin@srv1 ~] $

Which of the following should the administrator do to resolve this error?

A.

Disconnect from the SSH session and reconnect using the ssh -x command.

B.

Add Options X11 to the /home/admin/.ssh/authorized_keys file.

C.

Open port 6000 on the workstation and restart the firewalld service.

D.

Enable X11 forwarding in /etc/ssh/ssh_config and restart the server.

Full Access
Question # 31

A systems administrator wants to list all local account names and their respective UIDs. Which of the following commands will provide output containing this information?

A.

cut -c: -f3,1 /etc/passwd

B.

cut -d: -s2,3 /etc/passwd

C.

cut -d: -f1,3 /etc/passwd

D.

cut -n: -f1,2 /etc/passwd

Full Access
Question # 32

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 # 33

An administrator would like to mirror the website files on the primary web server, www1, to the backup web server, www2. Which of the following commands

should the administrator use to most efficiently accomplish this task?

A.

[wwwl ] rsync —a —e ssh /var/www/html/ user1@www2 : /var/www/html

B.

[ wwwl ] scp —r /var/www/html user1@www2 : / var/www/html

C.

[www2 ] cd /var/www/html; wget —m http: //wwwl/

D.

[wwwl ] cd /var/www/html && tar cvf —

Full Access
Question # 34

A Linux administrator encounters the following error in the Apache log files:

css

SQLSTATE[HY000] [2002] Permission denied

Which of the following commands should the administrator run to safely fix this issue?

A.

chcon -c httpd_sys_content_t /home/apache

B.

setsebool -F httpd_can_network_connect_db on

C.

setenforce 0

D.

touch /.autorelabel

Full Access
Question # 35

Joe, a user, is unable to log in to the Linux system Given the following output:

Which of the following command 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

Full Access
Question # 36

A systems administrator created a new Docker image called test. After building the image, the administrator forgot to version the release. 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:vl

C.

docker image tag test test:vl

D.

docker image version test:v1

Full Access
Question # 37

A file called testfile has both uppercase and lowercase letters:

$ cat testfile

ABCDEfgH

IJKLmnoPQ

abcdefgH

ijklLMNopq

A Linux administrator is tasked with converting testfile into all uppercase and writing it to a new file with the name uppercase. Which of the following commands will achieve

this task?

A.

tr '(A-Z}' '{a-z}' < testfile > uppercase

B.

echo testfile | tr "[Z-A]" "[z-a]" < testfile > uppercase

C.

cat testfile | tr '{z-a)' '{Z-A}' < testfile > uppercase

D.

tr '[a-z]' '[A-Z]' < testfile > uppercase

Full Access
Question # 38

Which of the following is a benefit of a service mesh?

A.

Encrypted communication between two services in a Kubernetes environment

B.

Direct access to the Kubernetes API services through the use of tokens

C.

Elevated privileges in a Kubernetes pod to allow root access in a hardened cluster

D.

Creating PVCs in a Kubernetes cluster to store and manage persistent data

Full Access
Question # 39

A systems administrator received a notification that a system is performing slowly. When running the top command, the systems administrator can see the following values:

Which of the following commands will the administrator most likely run NEXT?

A.

vmstat

B.

strace

C.

htop

D.

lsof

Full Access
Question # 40

A user generated a pair of private-public keys on a workstation. Which of the following commands will allow the user to upload the public key to a remote server and enable passwordless login?

A.

scp ~/.ssh/id_rsa user@server:~/

B.

rsync ~ /.ssh/ user@server:~/

C.

ssh-add user server

D.

ssh-copy-id user@server

Full Access
Question # 41

An administrator would like to list all current containers, regardless of their running state. Which of the following commands would allow the administrator to accomplish this task?

A.

docker ps -a

B.

docker list

C.

docker image ls

D.

docker inspect image

Full Access
Question # 42

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 # 43

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

Full Access
Question # 44

At what point is the Internal Certificate Authority (ICA) created?

A.

During the primary Security Management Server installation process.

B.

Upon creation of a certificate.

C.

When an administrator decides to create one.

D.

When an administrator initially logs into SmartConsole.

Full Access
Question # 45

A Linux administrator logs in to a system and identifies that an important backup has been started. The backup process is consuming a considerable amount of CPU time but needs to continue. Which of the following should the administrator use to reduce the impact this process has on other services?

A.

renice -n 15 -p

B.

nice -n 15 -p

C.

renice -n -15 -p

D.

nice -n -15 -p

Full Access
Question # 46

A systems administrator is adding a Linux-based server and removing a Windows-based server from a cloud-based environment. The changes need to be validated before they are applied to the cloud-based environment. Which of the following tools should be used to meet this requirement?

A.

Ansible

B.

git clone

C.

git pull

D.

terraform plan

Full Access
Question # 47

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 # 48

A user is attempting to log in to a Linux server that has Kerberos SSO ena-bled. Which of the following commands should the user run to authenticate

and then show the ticket grants? (Select TWO).

A.

kinit

B.

klist

C.

kexec

D.

kioad

E.

pkexec

F.

realm

Full Access
Question # 49

A Linux administrator wants to find out whether files from the wget package have been altered since they were installed. Which of the following commands will provide the correct information?

A.

rpm -i wget

B.

rpm -qf wget

C.

rpm -F wget

D.

rpm -V wget

Full Access
Question # 50

Which of the following tools is commonly used for creating CI/CD pipelines?

A.

Chef

B.

Puppet

C.

Jenkins

D.

Ansible

Full Access
Question # 51

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 # 52

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 # 53

A systems administrator configured firewall rules using firewalld. However, after the system is rebooted, the firewall rules are not present:

The systems administrator makes additional checks:

Which of the following is the reason the firewall rules are not active?

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.

Full Access
Question # 54

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, "systemct1 reboot" to reboot, "systemct1 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

B.

/dev/sda

C.

/etc/fstab

D.

/ete/grub.conf

Full Access
Question # 55

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 # 56

A systems administrator wants to check for running containers. Which of the following commands can be used to show this information?

A.

docker pull

B.

docker stats

C.

docker ps

D.

docker list

Full Access
Question # 57

A Linux administrator deployed a large-scale application service as a containerized pod. The Linux administrator needs to continually send the application's log file to the company’s central log store. Which of the following should the Linux administrator do to efficiently perform this task?

A.

Configure a sidecar to perform log shipping

B.

Run docker exec to access the logs within the container

C.

Execute docker inspect and run a log rsync replication

D.

Set up a custom task scheduler via kubectl

Full Access
Question # 58

A systems administrator is compiling a report containing information about processes that are listening on the network ports of a Linux server. Which of the following commands will allow the administrator to obtain the needed information?

A.

ss -pint

B.

tcpdump -nL

C.

netstat -pn

D.

lsof -It

Full Access
Question # 59

A Linux administrator provisioned a new web server with custom administrative permissions for certain users. The administrator receives a report that user1 is unable to restart the Apache web service on this server. The administrator reviews the following output:

[ root@server ] # id user1

UID=1011 (user1) gid=1011 (USER1) groups=1011 (user1), 101 (www-data), 1120 (webadmin)

[ root@server ] # cat /etc/sudoers.d/custom.conf

user1 ALL=/usr/sbin/systemctl start httpd, /usr/sbin/systemctl stop httpd

webadmin ALL=NOPASSWD: /etc/init.d.httpd restart, /sbin/service httpd restart, /usr/sbin/apache2ctl restart

#%wheel ALL=(ALL) NOPASSWD: ALL

Which of the following would most likely resolve the issue while maintaining a least privilege security model?

A.

User1 should be added to the wheel group to manage the service.

B.

User1 should have "NOPASSWD:" after the "ALL=" in the custom. conf.

C.

The wheel line in the custom. conf file should be uncommented.

D.

Webadmin should be listed as a group in the custom. conf file.

Full Access
Question # 60

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

Full Access
Question # 61

A Linux engineer finds multiple failed login entries in the security log file for application users. The Linux engineer performs a security audit and discovers a security issue. Given the following:

# grep -iE '*www*|db' /etc/passwd

www-data:x:502:502:www-data:/var/www:/bin/bash

db:x: 505:505:db: /opt/db:/bin/bash

Which of the following commands would resolve the security issue?

A.

usermod -d /srv/www-data www-data && usermod -d /var/lib/db db

B.

passwd -u www-data && passwd -u db

C.

renice -n 1002 -u 502 && renice -n 1005 -u 505

D.

chsh -s /bin/false www-data && chsh -s /bin/false db

Full Access
Question # 62

A Linux system fails to start and delivers the following error message:

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

Full Access
Question # 63

A user is asking the systems administrator for assistance with writing a script to verify whether a file exists. Given the following:

Which of the following commands should replace the string?

A.

if [ -f "$filename" ]; then

B.

if [ -d "$filename" ]; then

C.

if [ -f "$filename" ] then

D.

if [ -f "$filename" ]; while

Full Access
Question # 64

A systems administrator created a user cron to run a scheduled database backup cronjob on the server at 1 a.m. every day. The following is the cronjob syntax:

0 1 * * * /bin/sh backup.sh

The backups, however, are not being created. When checking the crontab file, the administrator sees the following error:

/var/spool/cron/crontab/cron: Permission denied

Which of the following will permit the cronjob to execute?

A.

Creating the file cron.allow and adding user cron to it

B.

Giving cron ownership of the file /usr/bin/crontab

C.

Running sudo cron restart to activate the cronjob

D.

Running sudo crontab -u cron -e to edit the file with sudo

Full Access
Question # 65

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 # 66

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

D.

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

git checkout -b

Full Access
Question # 67

The MySQL database process that was running on a Linux server suddenly stopped, and the process was killed. Which of the following commands can help identify whether this issue was produced by the OOM killer?

A.

grep /proc/oom_score

B.

grep -ir "out of memory" /var/log

C.

cat /var/run/initramfs/overlayroot.log | grep "out of memory"

D.

cat /sys/block/loop0/events

Full Access
Question # 68

A Linux administrator is creating a user that can run the FTP service but cannot log in to the system. The administrator sets /bin/false as a login shell for the user. When the user tries to run the FTP service, it is rejected with an "invalid shell: /bin/false" message. Which of the following is the best way to resolve the issue?

A.

Change ownership of /bin/false to the FTP user

B.

Add /bin/false entry to the /etc/shells file

C.

Make /bin/false an executable file

D.

Change the user’s default shell to /bin/bash

Full Access
Question # 69

A systems administrator is tasked with setting up key-based SSH authentication. In which of the following locations should the administrator place the public keys for the server?

A.

~/.sshd/authkeys

B.

~/.ssh/keys

C.

~/.ssh/authorized_keys

D.

~/.ssh/keyauth

Full Access
Question # 70

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

Full Access
Question # 71

A Linux administrator is creating a primary partition on the replacement hard drive for an application server. Which of the following commands should the administrator issue to verify the device name of this partition?

A.

sudo fdisk /dev/sda

B.

sudo fdisk -s /dev/sda

C.

sudo fdisk -l

D.

sudo fdisk -h

Full Access
Question # 72

A Linux system is getting an error indicating the root filesystem is full. Which of the following commands should be used by the systems administrator to resolve this issue? (Choose three.)

A.

df -h /

B.

fdisk -1 /dev/sdb

C.

growpart /dev/mapper/rootvg-rootlv

D.

pvcreate /dev/sdb

E.

lvresize –L +10G -r /dev/mapper/rootvg-rootlv

F.

lsblk /dev/sda

G.

parted -l /dev/mapper/rootvg-rootlv

Full Access
Question # 73

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 # 74

A systems administrator is encountering performance issues. The administrator runs 3 commands with the following output

The Linux server has the following system properties

CPU: 4 vCPU

Memory: 50GB

Which of the following accurately describes this situation?

A.

The system is under CPU pressure and will require additional vCPUs

B.

The system has been running for over a year and requires a reboot.

C.

Too many users are currently logged in to the system

D.

The system requires more memory

Full Access
Question # 75

A Linux administrator is configuring a two-node cluster and needs to be able to connect the nodes to each other using SSH keys from the root account. Which of the following commands will accomplish this task?

A.

[root@nodea ssh —i ~/ . ssh/±d rsa root@nodeb

B.

[root@nodea scp -i . ssh/id rsa root@nodeb

C.

[root@nodea ssh—copy-id —i .ssh/id rsa root@nodeb

D.

[root@nodea # ssh add -c ~/ . ssh/id rsa root@nodeb

E.

[root@nodea # ssh add -c ~/. ssh/id rsa root@nodeb

Full Access
Question # 76

Several users reported that they were unable to write data to the /oracle1 directory. The following output has been provided:

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

Full Access
Question # 77

A systems administrator is gathering information about a file type and the contents of a file. Which of the following commands should the administrator use to accomplish this task?

A.

file filename

B.

touch filename

C.

grep filename

D.

lsof filename

Full Access
Question # 78

A systems administrator is investigating an issue in which one of the servers is not booting up properly. The journalctl entries show the following:

Which of the following will allow the administrator to boot the Linux system to normal mode quickly?

A.

Comment out the /opt/app filesystem in /etc/fstab and reboot.

B.

Reformat the /opt/app filesystem and reboot.

C.

Perform filesystem checks on local filesystems and reboot.

D.

Trigger a filesystem relabel and reboot.

Full Access
Question # 79

A Linux administrator is enabling root log-in over SSH on a server. Which of the following combinations of files and parameters should the administrator modify to accomplish this task?

A.

/etc/ssh/ssh_config - PermitRootLogin

B.

/etc/ssh/ssh_config - AllowRootLogin

C.

/etc/ssh/sshd_config - PermitRootLogin

D.

/etc/ssh/sshd_config - AllowRootLogin

Full Access
Question # 80

An administrator has source code and needs to rebuild a kernel module. Which of the following command sequences is most commonly used to rebuild this

type of module?

A.

./configure

make

make install

B.

wget

gcc

cp

C.

tar xvzf

build

cp

D.

build

install

configure

Full Access
Question # 81

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 # 82

A Linux engineer needs to download a ZIP file and wants to set the nice of 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.2ip

C.

$ renice -10 wget https://foo.com/installation.zip

Full Access
Question # 83

Users are unable to create new files on the company's FTP server, and an administrator is troubleshooting the issue. The administrator runs the following commands:

Which of the following is the cause of the issue based on the output above?

A.

The users do not have the correct permissions to create files on the FTP server.

B.

The ftpusers filesystem does not have enough space.

C.

The inodes is at full capacity and would affect file creation for users.

D.

ftpusers is mounted as read only.

Full Access
Question # 84

A Linux administrator is tasked with creating resources using containerization. When deciding how to create this type of deployment, the administrator identifies some key features, including portability, high availability, and scalability in production. Which of the following should the Linux administrator choose for the new design?

A.

Docker

B.

On-premises systems

C.

Cloud-based systems

D.

Kubernetes

Full Access
Question # 85

A systems administrator is customizing a new Linux server. Which of the following settings for umask would ensure that new files have the default permissions of -rw-r--r--?

A.

0017

B.

0027

C.

0038

D.

0640

Full Access
Question # 86

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 # 87

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 # 88

Users are reporting that a Linux server is responding slowly. A systems administrator troubleshooting the server issue sees the following:

# iostat -m 2

Linux 3.10.0-1160.66.1.el7.x86_64 (myhost) 10/19/2022 x86_64 (4 CPU)

avg-cpu: %user %nice %system %iowait %steal %idle

24.30 0.01 0.29 50.38 4.00 19.01

Device: tps MB_read/s MB_wrtn/s MB_read MB_wrtn

sdd 15.65 0.48 0.83 4936250 8513501

# df -h

Filesystem Size Used Avail Use% Mounted on

devtmpfs 16G 0 16G 0% /dev

tmpfs 16G 64K 16G 1% /dev/shm

/dev/mapper/root 35G 8.8G 26G 26% /

/dev/sda2 497M 144M 354M 29% /boot

/dev/mapper/tmp 10G 38M 10G 1% /tmp

/dev/mapper/var 15G 13G 2.2G 86% /var

/dev/mapper/varlib 650G 397G 254G 62% /var/lib

/dev/mapper/varlog 15G 9.5G 5.5G 64% /var/log

/dev/mapper/varaudit 15G 72M 15G 1% /var/log/audit

Which of the following is most likely the issue?

A.

The CPU is mostly waiting for I/O operations.

B.

/ filesystem does not have enough storage allocated.

C.

/var filesystem is almost full.

D.

The CPU capacity is inadequate.

Full Access
Question # 89

A Linux administrator needs to connect securely to a remote server in order to install application software. Which of the following commands would allow this connection?

A.

scp "ABC-key.pem" root@10.0.0.1

B.

sftp rooteiO.0.0.1

C.

telnet 10.0.0.1 80

D.

ssh -i "ABC-key.pem" root@10.0.0.1

E.

sftp "ABC-key.pem" root@10.0.0.1

Full Access
Question # 90

A Linux administrator wants a permission bit on a shared folder that allows only the owner of the file within that directory or the root user to delete or rename the file. Which of the following commands will help achieve this goal?

A.

chmod u-w /directory/

B.

chmod a-r /directory/

C.

chmod o-t /directory/

D.

chmod +t /directory/

Full Access
Question # 91

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

# 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 # 92

A systems administrator is gathering information about a file type and the contents of a file. Which of the following commands should the administrator use to accomplish this task?

A.

file filename

B.

touch filename

C.

grep filename

D.

lsof filename

Full Access
Question # 93

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.

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

Full Access
Question # 94

An administrator thinks that a package was installed using a snap. Which of the following commands can the administrator use to verify this information?

A.

snap list

B.

snap find

C.

snap install

D.

snap try

Full Access
Question # 95

Users report that they cannot access some files located in the /opt/finapp directory after a power outage caused an unexpected server restart. A Linux administrator examines the following filesystem details and system logs:

# mount | grep finapp

/dev/mapper/rhel-opt_finapp on /opt/finapp type xfs (rw,relatime,seclabel,attr2,inode64,logbufs=8,logbsize=32k,noquota)

# lsblk

NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT

sda 8:0 0 931.5G 0 disk

├─sda1 8:1 0 1G 0 part /boot

└─sda2 8:2 0 930.5G 0 part

├─rhel-root 253:0 0 30.5G 0 lvm /

└─rhel-opt_finapp 253:1 0 900G 0 lvm /opt/finapp

# grep opt_finapp /var/log/messages

XFS (opt_finapp): Corruption detected in inode 3645, extent tree

Which of the following commands should the administrator run in an attempt to fix the filesystem?

A.

fdisk /dev/mapper/rhel-opt_finapp

B.

xfs_repair /dev/mapper/rhel-opt_finapp

C.

lvcreate -L900G -n opt_finapp rhel

D.

fsck.ext4 /dev/mapper/rhel-opt_finapp

Full Access
Question # 96

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 # 97

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?

Full Access
Question # 98

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 # 99

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

Full Access
Question # 100

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 # 101

Junior system administrator had trouble installing and running an Apache web server on a Linux server. You have been tasked with installing the Apache web server on the Linux server and resolving the issue that prevented the junior administrator from running Apache.

INSTRUCTIONS

Install Apache and start the service. Verify that the Apache service is running with the defaults.

Typing “help” in the terminal will show a list of relevant event commands.

If at any time you would like to bring back the initial state of the simulation, please click the Reset All button.

Full Access
Question # 102

A Linux administrator has logged in to a server for the first time and needs to know which services are allowed through the firewall. Which of the following options will return the results for which the administrator is looking?

A.

firewall-cmd —get-services

B.

firewall-cmd —check-config

C.

firewall-cmd —list-services

D.

systemct1 status firewalld

Full Access
Question # 103

A DevOps engineer wants to work on a snapshot of the infrastructure as code configuration. Which of the following commands should the engineer use to accomplish this task?

A.

git pull

B.

git push

C.

git branch

D.

git tag

Full Access
Question # 104

Which of the following is the best tool for dynamic tuning of kernel parameters?

A.

tuned

B.

tune2fs

C.

tuned-adm

D.

turbostat

Full Access
Question # 105

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 # 106

A security analyst is monitoring the network to identify latency or slowdowns during a vulnerability scan. Which of the following functions will best achieve this?

bash

function x() {

info=$(ping -c 1 $1 | awk -F "/" 'END {print $5}')

echo "$1 | $info"

}

A.

function x() { info=$(dig $(dig -x $1 | grep ptr | tail -n 1 | awk -F ".in-addr" '{print $1}').origin.asn.cymru.com TXT +short); echo "$1 | $info" }

B.

function x() { info=$(ping -c 1 $1 | awk -F "/" 'END {print $5}'); echo "$1 | $info" }

C.

function x() { info=$(nc -m 40 $1 | awk 'END {print $1}'); echo "$1 | $info" }

D.

function x() { info=$(geoiplookup $1); echo "$1 | $info" }

Full Access
Question # 107

An administrator created an initial Git repository and uploaded the first files. The administrator sees the following when listing the repository:

The administrator notices the file . DS STORE should not be included and deletes it from the online repository. Which of the following should the administrator run from the root of the local repository before the next commit to ensure the file is not uploaded again in future commits?

A.

rm -f .DS STORE && git push

B.

git fetch && git checkout .DS STORE

C.

rm -f .DS STORE && git rebase origin main

D.

echo .DS STORE >> .gitignore

Full Access
Question # 108

A Linux administrator wants to set the SUID of a file named dev_team.text with 744 access rights. Which of the following commands will achieve this goal?

A.

chmod 4744 dev_team.txt

B.

chmod 744 --setuid dev_team.txt

C.

chmod -c 744 dev_team.txt

D.

chmod -v 4744 --suid dev_team.txt

Full Access
Question # 109

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 # 110

Users are experiencing high latency when accessing a web application served by a Linux machine. A systems administrator checks the network interface counters and sees the following:

Which of the following is the most probable cause of the observed latency?

A.

The network interface is disconnected.

B.

A connection problem exists on the network interface.

C.

No IP address is assigned to the interface.

D.

The gateway is unreachable.

Full Access
Question # 111

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 # 112

A Linux administrator is trying to remove the ACL from the file /home/user/data. txt but receives the following error message:

Given the following analysis:

Which of the following is causing the error message?

A.

The administrator is not using a highly privileged account.

B.

The filesystem is mounted with the wrong options.

C.

SELinux file context is denying the ACL changes.

D.

File attributes are preventing file modification.

Full Access
Question # 113

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

Full Access