Labour Day Special - Limited Time 65% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: top65certs

CompTIA XK0-005 Dumps

Page: 1 / 22
Total 292 questions

CompTIA Linux+ Exam Questions and Answers

Question 1

A Linux administrator has been tasked with installing the most recent versions of packages on a RPM-based OS. Which of the following commands will accomplish this task?

Options:

A.

apt-get upgrade

B.

rpm -a

C.

yum updateinfo

D.

dnf update

E.

yum check-update

Question 2

A Linux administrator is scheduling a system job that runs a script to check available disk space every hour. The Linux administrator does not want users to be able to start the job. Given the following:

The Linux administrator attempts to start the timer service but receives the following error message:

Which of the following is MOST likely the reason the timer will not start?

Options:

A.

The checkdiskspace.timer unit should be enabled via systemct1.

B.

The timers.target should be reloaded to get the new configuration.

C.

The checkdiskspace.timer should be configured to allow manual starts.

D.

The checkdiskspace.timer should be started using the sudo command.

Question 3

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).

Options:

A.

kinit

B.

klist

C.

kexec

D.

kioad

E.

pkexec

F.

realm

Question 4

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?

Options:

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.

Question 5

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?

Options:

A.

dnf remove packagename

B.

apt-get remove packagename

C.

rpm -i packagename

D.

apt remove packagename

Question 6

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?

Options:

A.

chown web:web /home/web

B.

chmod -R 400 /home/web

C.

echo "umask 377" >> /home/web/.bashrc

D.

setfacl read /home/web

Question 7

User1 is a member of the accounting group. Members of this group need to be able to execute but not make changes to a script maintained by User2. The script should not be accessible to other users or groups. Which of the following will give proper access to the script?

Options:

A.

chown user2:accounting script.sh

chmod 750 script.sh

B.

chown user1:accounting script.sh

chmod 777 script.sh

C.

chown accounting:user1 script.sh

chmod 057 script.sh

D.

chown user2:accounting script.sh

chmod u+x script.sh

Question 8

A Linux administrator needs to obtain a list of all volumes that are part of a volume group. Which of the following commands should the administrator use to accomplish this task?

Options:

A.

vgs

B.

lvs

C.

fdisk -1

D.

pvs

Question 9

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?

Options:

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

Question 10

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?

Options:

A.

file filename

B.

touch filename

C.

grep filename

D.

lsof filename

Question 11

To harden one of the servers, an administrator needs to remove the possibility of remote administrative login via the SSH service. Which of the following should the administrator do?

Options:

A.

Add the line DenyUsers root to the /etc/hosts.deny file.

B.

Set PermitRootLogin to no in the /etc/ssh/sshd_config file.

C.

Add the line account required pam_nologin. so to the /etc/pam.d/sshd file.

D.

Set PubKeyAuthentication to no in the /etc/ssh/ssh_config file.

Question 12

A systems engineer has deployed a new application server, but the server cannot communicate with the backend database hostname. The engineer confirms that the application server can ping the database server's IP address. Which of the following is the most likely cause of the issue?

Options:

A.

Incorrect DNS servers

B.

Unreachable default gateway

C.

Missing route configuration

D.

Misconfigured subnet mask

Question 13

A systems administrator is investigating a service that is not starting up. Given the following information:

Which of the following systemd commands should the administrator use in order to obtain more details about the failing service?

Options:

A.

systemct1 analyze network

B.

systemct1 info network

C.

sysctl -a network

D.

journalctl -xu network

Question 14

A Linux administrator would like to use systemd to schedule a job to run every two hours. The administrator creates timer and service definitions and restarts the server to load these new configurations. After the restart, the administrator checks the log file and notices that the job is only running daily. Which of the following is MOST likely causing the issue?

Options:

A.

The checkdiskspace.service is not running.

B.

The checkdiskspace.service needs to be enabled.

C.

The OnCalendar schedule is incorrect in the timer definition.

D.

The system-daemon services need to be reloaded.

Question 15

A Linux administrator booted up the server and was presented with a non-GUI terminal. The administrator ran the command systemct1 isolate graphical.target and rebooted the system by running systemct1 reboot, which fixed the issue. However, the next day the administrator was presented again with a non-GUI terminal. Which of the following is the issue?

Options:

A.

The administrator did not reboot the server properly.

B.

The administrator did not set the default target to basic.target.

C.

The administrator did not set the default target to graphical.target.

D.

The administrator did not shut down the server properly.

Question 16

A Linux systems administrator is setting up a new web server and getting 404 - NOT FOUND errors while trying to access the web server pages from the browser. While working on the diagnosis of this issue, the Linux systems administrator executes the following commands:

Which of the following commands will BEST resolve this issue?

Options:

A.

sed -i 's/SELINUX=enforcing/SELINUX=disabled/' /etc/selinux/config

B.

restorecon -R -v /var/www/html

C.

setenforce 0

D.

setsebool -P httpd_can_network_connect_db on

Question 17

An application developer received a file with the following content:

##This is a sample Image ##

FROM ubuntu:18.04

MAINTAINER demohut@gtmail.com.hac

COPY . /app

RUN make /app

CMD python /app/app.py

RUN apt-get update

RUN apt-get install -y nginx

CMD ["echo","Image created"]

The developer must use this information to create a test bed environment and identify the image (myimage) as the first version for testing a new

application before moving it to production. Which of the following commands will accomplish this task?

Options:

A.

docker build -t myimage:1.0 .

B.

docker build -t myimage: .

C.

docker build -t myimage-1.0 .

D.

docker build -i myimage:1.0 .

Question 18

A Linux administrator is providing a new Nginx image from the registry to local cache. Which of the following commands would allow this to happen?

Options:

A.

docker pull nginx

B.

docker attach nginx

C.

docker commit nginx

D.

docker import nginx

Question 19

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

Options:

A.

Cloud-init

B.

Bash

C.

Docker

D.

Sidecar

Question 20

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?

Options:

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

Question 21

A systems administrator needs to remove a disk from a Linux server. The disk size is 500G, and it is the only one that size on that machine. Which of the following commands can the

administrator use to find the corresponding device name?

Options:

A.

fdisk -V

B.

partprobe -a

C.

lsusb -t

D.

lsscsi -s

Question 22

A Linux administrator needs to resolve a service that has failed to start. The administrator runs the following command:

The following output is returned

Which of the following is MOST likely the issue?

Options:

A.

The service does not have permissions to read write the startupfile.

B.

The service startupfile size cannot be 81k.

C.

The service startupfile cannot be owned by root.

D.

The service startupfile should not be owned by the root group.

Question 23

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?

Options:

A.

df -i /oracle1

B.

fdisk -1 /dev/sdb1

C.

lsblk /dev/sdb1

D.

du -sh /oracle1

Question 24

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?

Options:

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

Question 25

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

Options:

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

Question 26

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).

Options:

A.

ufw limit

B.

iptables —F

C.

systemct1 status firewalld

D.

firewall—cmd ——1ist—a11

E.

ufw status

F.

iptables —A

Question 27

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?

Options:

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.

Question 28

An administrator transferred a key for SSH authentication to a home directory on a remote server. The key file was moved to .ssh/authorized_keys location in order to establish SSH connection without a password. However, the SSH command still asked for the password. Given the following output:

Which of the following commands would resolve the issue?

Options:

A.

restorecon .ssh/authorized_keys

B.

ssh_keygen -t rsa -o .ssh/authorized_keys

C.

chown root:root .ssh/authorized_keys

D.

chmod 600 .ssh/authorized_keys

Question 29

A new file was added to a main Git repository. An administrator wants to synchronize a local copy with the contents of the main repository. Which of the following commands should the administrator use for this task?

Options:

A.

git reflog

B.

git pull

C.

git status

D.

git push

Question 30

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.)

Options:

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.

Question 31

An administrator attempts to connect to a remote server by running the following command:

$ nmap 192.168.10.36

Starting Nmap 7.60 ( https://nmap.org ) at 2022-03-29 20:20 UTC

Nmap scan report for www1 (192.168.10.36)

Host is up (0.000091s latency).

Not shown: 979 closed ports

PORT STATE SERVICE

21/tcp open ftp

22/tcp filtered ssh

631/tcp open ipp

Nmap done: 1 IP address (1 host up) scanned in 0.06 seconds

Which of the following can be said about the remote server?

Options:

A.

A firewall is blocking access to the SSH server.

B.

The SSH server is not running on the remote server.

C.

The remote SSH server is using SSH protocol version 1.

D.

The SSH host key on the remote server has expired.

Question 32

Which of the following files holds the system configuration for journal when running systemd?

Options:

A.

/etc/systemd/journald.conf

B.

/etc/systemd/systemd-journalctl.conf

C.

/usr/lib/systemd/journalctl.conf

D.

/etc/systemd/systemd-journald.conf

Question 33

A Linux administrator is troubleshooting an issue in which users are not able to access 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?

Options:

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.

Question 34

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?

Options:

A.

/etc/ethers

B.

/etc/services

C.

/etc/resolv.conf

D.

/etc/sysctl.conf

Question 35

The journald entries have filled a Linux machine's /var volume. Which of the following is the best command for a systems administrator to use to free up the disk space occupied by these entries?

Options:

A.

journalctl —rotate

journalctl --vacuum-time=ls

B.

systemctl stop systemd-journald

systemctl start systemd-journald

C.

rm -rf /var/log/journal

systemctl restart systemd-journald

D.

pkill -HUP systemd-journald

systemctl restart systemd-journald

Question 36

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?

Options:

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

Question 37

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?

Options:

A.

telinit 0

B.

systemct1 reboot

C.

systemct1 get-default

D.

systemct1 emergency

Question 38

The development team created a new branch with code changes that a Linux administrator needs to pull from the remote repository. When the administrator looks for the branch in Git, the branch in question is not visible. Which of the following commands should the Linux administrator run to refresh the branch information?

Options:

A.

git fetch

B.

git checkout

C.

git clone

D.

git branch

Question 39

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

Options:

A.

Virtual private network

B.

Sidecar pod

C.

Overlay network

D.

Service mesh

Question 40

A systems administrator received a request to change a user's credentials. Which of the following commands will grant the request?

Options:

A.

sudo passwd

B.

sudo userde 1

C.

sudo chage

D.

sudo usermod

Question 41

Which of the following technologies can be used as a central repository of Linux users and groups?

Options:

A.

LDAP

B.

MFA

C.

SSO

D.

PAM

Question 42

A user is unable to remotely log on to a server using the server name server1 and port 22. The Linux engineer troubleshoots the issue and gathers the following information:

Which of the following is most likely causing the issue?

Options:

A.

server 1 is not in the DNS.

B.

sshd is running on a non-standard port.

C.

sshd is not an active service.

D.

serverl is using an incorrect IP address.

Question 43

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?

Options:

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.

Question 44

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?

Options:

A.

tail -v 20

B.

tail -n 20

C.

tail -c 20

D.

tail -l 20

Question 45

A junior administrator updated the PostgreSQL service unit file per the data-base administrator's recommendation. The service has been restarted, but changes have not been applied. Which of the following should the administrator run for the changes to take effect?

Options:

A.

Systemct1 get—default

B.

systemct1 daemon—reload

C.

systemct1 enable postgresq1

D.

systemct1 mask postgresq1

Question 46

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?

Options:

A.

scp

B.

ssh-copy-id

C.

ssh-agent

D.

ssh-keyscan

Question 47

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

Options:

A.

Server clustering

B.

Load balancing

C.

RAID

D.

VDI

Question 48

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?

Options:

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.

Question 49

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

Options:

A.

docker pull

B.

docker stats

C.

docker ps

D.

docker list

Question 50

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?

Options:

A.

chattr +a /opt/app/logs

B.

chattr +d /opt/app/logs

C.

chattr +i /opt/app/logs

D.

chattr +c /opt/app/logs

Question 51

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?

Options:

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

Question 52

A non-privileged user is attempting to use commands that require elevated account permissions, but the commands are not successful. Which of the following most likely needs to be updated?

Options:

A.

/etc/passwd

B.

/etc/shadow

C.

/etc/sudoers

D.

/etc/bashrc

Question 53

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?

Options:

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

Question 54

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?

Options:

A.

docker rm --all

B.

docker rm $(docker ps -aq)

C.

docker images prune *

D.

docker rm --state exited

Question 55

A Linux administrator needs to ensure that Java 7 and Java 8 are both locally available for developers to use when deploying containers. Currently only Java 8 is available. Which of the following commands should the administrator run to ensure both versions are available?

Options:

A.

docker image load java:7

B.

docker image pull java:7

C.

docker image import java:7

D.

docker image build java:7

Question 56

A systems administrator is trying to track down a rogue process that has a TCP listener on a network interface for remote command-and-control instructions.

Which of the following commands should the systems administrator use to generate a list of rogue process names? (Select two).

Options:

A.

netstat -antp | grep LISTEN

B.

lsof -iTCP | grep LISTEN

C.

lsof -i:22 | grep TCP

D.

netstat -a | grep TCP

E.

nmap -p1-65535 | grep -i tcp

F.

nmap -sS 0.0.0.0/0

Question 57

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 ( )

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?

Options:

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.

Question 58

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

Options:

A.

TFTP

B.

SSH

C.

SCP

D.

SFTP

Question 59

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?

Options:

A.

Docker

B.

On-premises systems

C.

Cloud-based systems

D.

Kubernetes

Question 60

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?

Options:

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

Question 61

A systems administrator is notified that the mysqld process stopped unexpectedly. The systems administrator issues the following command:

sudo grep –i -r ‘out of memory’ /var/log

The output of the command shows the following:

kernel: Out of memory: Kill process 9112 (mysqld) score 511 or sacrifice child.

Which of the following commands should the systems administrator execute NEXT to troubleshoot this issue? (Select two).

Options:

A.

free -h

B.

nc -v 127.0.0.1 3306

C.

renice -15 $( pidof mysql )

D.

lsblk

E.

killall -15

F.

vmstat -a 1 4

Question 62

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

Options:

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.

Question 63

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

Options:

A.

LUKS

B.

TLS

C.

SSL

D.

NFS

Question 64

As part of the requirements for installing a new application, the swappiness parameter needs to be changed to O. This change needs to persist across re-boots and be applied immediately. A Linux systems administrator is performing this change. Which of the following steps should the administrator complete to accomplish this task?

Options:

A.

echo "vm. swappiness—()" >> /etc/sysctl . conf && sysctl —p

B.

echo "vrn. >> / proc/meminfo && sysctl —a

C.

sysctl —v >> / proc/meminfo & & echo "vm. swapiness=0"

D.

sysctl —h "vm. swapiness—O" && echo / etc/vmswapiness

Question 65

A systems administrator is deploying three identical, cloud-based servers. The administrator is using the following code to complete the task:

Which of the following technologies is the administrator using?

Options:

A.

Ansible

B.

Puppet

C.

Chef

D.

Terraform

Question 66

A Linux administrator is configuring a new internal web server fleet. The web servers are up and running but can only be reached by users directly via IP address. The administrator is attempting to fix this inconvenience by requesting appropriate records from the DNS team. The details are:

Hostname: devel.comptia.org

IP address: 5.5.5.1, 5.5.5.2, 5.5.5.3, 5.5.5.4

Name server: 5.5.5.254

Additional names: dev.comptia.org, development.comptia.org

Which of the following types of DNS records should the Linux administrator request from the DNS team? (Select three).

Options:

A.

MX

B.

NS

C.

PTR

D.

A

E.

CNAME

F.

RRSIG

G.

SOA

Question 67

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?

Options:

A.

/etc/ssh/sshd_config

B.

/etc/ssh/moduli

C.

~/.ssh/config

D.

~/.ssh/authorized_keys

Question 68

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?

Options:

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.

Question 69

A systems administrator has been tasked with disabling the nginx service from the environment to prevent it from being automatically and manually started. Which of the following commands will accomplish this task?

Options:

A.

systemct1 cancel nginx

B.

systemct1 disable nginx

C.

systemct1 mask nginx

D.

systemct1 stop nginx

Question 70

Which of the following commands will display the operating system?

Options:

A.

uname -n

B.

uname -s

C.

uname -o

D.

uname -m

Question 71

A development team asks an engineer to guarantee the persistency of journal log files across system reboots. Which of the following commands would accomplish this task?

Options:

A.

grep -i auto /etc/systemd/journald.conf && systemct1 restart systemd-journald.service

B.

cat /etc/systemd/journald.conf | awk '(print $1,$3)'

C.

sed -i 's/auto/persistent/g' /etc/systemd/journald.conf && sed -i 'persistent/s/ˆ#//q' /etc/systemd/journald.conf

D.

journalctl --list-boots && systemct1 restart systemd-journald.service

Question 72

A systems administrator is tasked with preventing logins from accounts other than root, while the file /etc/nologin exists. Which of the following PAM modules will accomplish this task?

Options:

A.

pam_login.so

B.

pam_access.so

C.

pam_logindef.so

D.

pam_nologin.so

Question 73

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?

Options:

A.

systemct1 status

B.

systemct1 stop

C.

systemct1 reinstall

D.

systemct1 daemon-reload

Question 74

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)

Options:

A.

rsyslog

B.

cp

C.

rsync

D.

reposync

E.

scp

F.

ssh

Question 75

A Linux administrator cloned an existing Linux server and built a new server from that clone. The administrator encountered the following error after booting the cloned server:

The administrator performed the commands listed below to further troubleshoot and mount the missing filesystem:

Which of the following should administrator use to resolve the device mismatch issue and mount the disk?

Options:

A.

mount disk by device-id

B.

fsck -A

C.

mount disk by-label

D.

mount disk by-blkid

Question 76

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?

Options:

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

Question 77

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?

Options:

A.

if [ -f "$filename" ]; then

B.

if [ -d "$filename" ]; then

C.

if [ -f "$filename" ] then

D.

if [ -f "$filename" ]; while

Question 78

A Linux administrator is troubleshooting a systemd mount unit file that is not working correctly. The file contains:

[root@system] # cat mydocs.mount

[Unit]

Description=Mount point for My Documents drive

[Mount]

What=/dev/drv/disk/by-uuid/94afc9b2-ac34-ccff-88ae-297ab3c7ff34

Where=/home/user1/My Documents

Options=defaults

Type=xfs

[Install]

WantedBy=multi-user.target

The administrator verifies the drive UUID correct, and user1 confirms the drive should be mounted as My Documents in the home directory. Which of the following can the administrator

do to fix the issues with mounting the drive? (Select two).

Options:

A.

Rename the mount file to home-user1-My\x20Documents.mount.

B.

Rename the mount file to home-user1-my-documents.mount.

C.

Change the What entry to /dev/drv/disk/by-uuid/94afc9b2\-ac34\-ccff\-88ae\-297ab3c7ff34.

D.

Change the Where entry to Where=/home/user1/my\ documents.

E.

Change the Where entry to Where=/home/user1/My\x20Documents.

F.

Add quotes to the What and Where entries, such as What="/dev/drv/disk/by-uuid/94afc9b2-ac34-ccff-88ae-297ab3c7ff34" and Where="/home/user1/My Documents".

Question 79

A Linux administrator reviews a set of log output files and needs to identify files that contain any occurrence of the word denied. All log files containing entries in uppercase or lowercase letters should be included in the list. Which of the following commands should the administrator use to accomplish this task?

Options:

A.

find . -type f -print | xrags grep -ln denied

B.

find . -type f -print | xrags grep -nv denied

C.

find . -type f -print | xrags grep -wL denied

D.

find . -type f -print | xrags grep -li denied

Question 80

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?

Options:

A.

gedit & disown

B.

kill 9 %1

C.

fg %1

D.

bg %1 job name

Question 81

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?

Options:

A.

ss -pint

B.

tcpdump -nL

C.

netstat -pn

D.

lsof -It

Question 82

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?

Options:

A.

vmstat

B.

strace

C.

htop

D.

lsof

Question 83

Which of the following is a function of a bootloader?

Options:

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.

Question 84

A DevOps engineer wants to allow the same Kubernetes container configurations to be deployed in development, testing, and production environments. A key requirement is that the containers should be configured so that developers do not have to statically configure custom, environment-specific locations. Which of the following should the engineer use to meet this requirement?

Options:

A.

Custom scheduler

B.

Node affinity

C.

Overlay network

D.

Ambassador container

Question 85

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.

Options:

Question 86

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

Options:

A.

snap list

B.

snap find

C.

snap install

D.

snap try

Question 87

An engineer needs to insert a character at the end of the current line in the vi text editor. Which of the following will allow the engineer to complete this task?

Options:

A.

p

B.

r

C.

bb

D.

A

E.

i

Page: 1 / 22
Total 292 questions