CompTIA Linux+ XK005 (171Q).

Description

Recurso de estudio para certificación CompTIA Linux + XK005.
Sc Con
Quiz by Sc Con, updated more than 1 year ago
Sc Con
Created by Sc Con over 1 year ago
1735
2

Resource summary

Question 1

Question
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?
Answer
  • fg
  • su
  • bg
  • ed

Question 2

Question
A Linux administrator is alerted to a storage capacity issue on a server without a specific mount point or directory. Which of the following commands would be MOST helpful for troubleshooting? (Choose two).
Answer
  • parted
  • df
  • mount
  • du
  • fdisk
  • dd
  • ls

Question 3

Question
A Linux administrator needs to resolve a service that has failed to start. The administrator runs the following command: ls -l startup file The following output is retorned ---------. root root 81k Sep 13 19:01 startupfile Which of the following is MOST likely the issue?
Answer
  • The service does not have permissions to read write the startupfile.
  • The service startupfile size cannot be 81k.
  • The service startupfile cannot be owned by root.
  • The service startupfile should not be owned by the root group.

Question 4

Question
Users report that connections to a MariaDB service are being closed unexpectedly. A systems administrator troubleshoots the issue and finds the following message in /var/log/messages. dbserver kernel: out of Memory: Killed process 1234 (mysqld) . Which of the following is causing the connection issue?
Answer
  • The process mysqld is using too many semaphores.
  • The server is running out of file descriptors.
  • Something is starving the server resources.
  • The amount of RAM allocated to the server is too high.

Question 5

Question
A cloud engineer needs to launch a container named web-01 in background mode. Which of the following commands will accomplish this task?
Answer
  • docker builder -f --name web-01 httpd
  • docker load --name web-01 httpd
  • docker ps -a --name web-01 httpd
  • docker run -d --name web-01 httpd

Question 6

Question
A Linux administrator is tasked with adding users to the system. However, the administrator wants to ensure ther users access will be disebled once the project is over. The expiration date should be 2021-09-30. Which of the following commands will accomplish this task?
Answer
  • sudo useradd -e 2021-09-30 Project_user
  • sudo useradd -c 2021-09-30 Project_user
  • sudo modinfo -F 2021-09-30 Project_user
  • sudo useradd -m -d 2021-09-30 Project_user

Question 7

Question
A systems administrator frequently connects to a remote host via SSH and a non-standard port. The system 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?
Answer
  • /etc/ssh/sshd_config
  • /etc/ssh/moduli
  • ~/.ssh/config
  • ~/.ssh/authorized_keys

Question 8

Question
A systems administrator installed a new software program on a Linux server. When the system administrator tries to run the program, the following message appears on the screen. Hardware virtualization support is not available on this system. Either is not present or disabled in the system's BIOS. Which of the following commands will allow the system administrator to check whether the system supports virtualization?
Answer
  • dmidecode -s system-version
  • Iscpu
  • sysctl-a
  • cat /sys/device/system/cpu/possible

Question 9

Question
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?
Answer
  • docker run -ti app /bin/sh
  • podman exec -ti app /bin/sh
  • podman run -d app /bin/sh
  • docker exec -d app /bin/bash

Question 10

Question
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?
Answer
  • podman run -d -p 443:8443 httpd
  • podman run -d -p 8443:443 httpd
  • podman run -d -e 443:8443 httpd
  • podman exec -p 8443:443 httpd

Question 11

Question
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?
Answer
  • chown web:web /home/web
  • chmod -R 400 /home/web
  • echo "umask 377" >> /home/web/.bashrc
  • setfacl read /home/web

Question 12

Question
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: [image] 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?
Answer
  • TRIGGERS=mariadb.service
  • ONFAILURE=mariadb.service
  • WANTEDBY=mariadb.service
  • REQUIRES=mariadb.service

Question 13

Question
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).
Answer
  • free -h
  • nc -v 127.0.0.1 3306
  • renice -15 $(pidof mysql)
  • lsblk
  • killall -15
  • vmstat -a 1 4

Question 14

Question
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 password. However, the SSH command still asked for the password. Given the following ouput; [image] Which of the following commands would resolve the issue?
Answer
  • restorecon .ssh/authorized_keys
  • ssh_keygen -t rsa -o .ssh/authorized_keys
  • chown root:root .ssh/authorized keys
  • chmod 600 .ssh/authorized_keys

Question 15

Question
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?
Answer
  • docker pull nginx
  • docker attach ngninx
  • docker commit nginx
  • docker import nginx

Question 16

Question
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).
Answer
  • wget
  • ssh-keygen
  • ssh-keyscan
  • ssh-copy-id
  • ftpd
  • scp

Question 17

Question
A Linux engineer is setting the sticky bit on a directory called devops with 755 file permission. Which of the following commands will accomplish this task?
Answer
  • chown -s 755 devops
  • chown 1755 devops
  • chmod -s 755 devops
  • chmod 1755 devops

Question 18

Question
An administrator accidentally deleted the /boot/vmlinuz file and must resolve the issue before the server is rebooted. Which of the following commands should the administrator use to identify the correct version of this file?
Answer
  • rpm -qa | grep kernel, uname -a
  • yun -y update; shutdown -r now
  • cat /etc/centos-release; rpm -Uvh --nodeps
  • telinit 1; restorecon -Rv /boot

Question 19

Question
A Linux administrator was notified that a virtual server has an I/O bottleneck. The Linux administrator analyzes the following ouput: [image] Given there is a single CPU in the server, which of the following is causing the slowness?
Answer
  • The system is running out of swap space.
  • The CPU is overloaded.
  • The memory is exhausted.
  • The processes are paging.

Question 20

Question
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?
Answer
  • chmod 4744 dev_team.txt
  • chmod 744 --seduid dev_team.txt
  • chmod -c 744 dev_team.txt
  • chmod -v 4744 --suid dev_team.txt

Question 21

Question
Which of the following commands will display the operating system?
Answer
  • uname -n
  • uname -s
  • uname -o
  • uname -m

Question 22

Question
A system administrator is tasked with installing GRUB on the legacy MBR of the SATA hard drive. Which of the following commands will help the administrator accomplish this task?
Answer
  • grub-install /dev/hda
  • grub-install /dev/sda
  • grub-install /dev/sr0
  • grub-install /dev/hd0,0

Question 23

Question
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?
Answer
  • route -e get to 192.168.1.40 from 10.0.2.15
  • ip route get 192.163.1.40 from 10.0.2.15
  • ip route 192.169.1.40 to 10.0.2.15
  • route -n 192.168.1.40 from 10.0.2.15

Question 24

Question
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?
Answer
  • Docker
  • On-premises systems
  • Cloud-based systems
  • Kubernetes

Question 25

Question
A systems administrator made some unapproved changes prior to leaving the company. The newly hired administrator has been tasked whit revealing the system to a compliant state. Which of the following commands will list and remove the correspondent packages?
Answer
  • dnf list and dnf remove last
  • dnf remove and dnf check
  • dnf info and dnf upgrade
  • dnf history and dnf history undo last

Question 26

Question
Which of the following enables administrators to configure and enforce MFA on a Linux system?
Answer
  • Kerberos
  • SELinux
  • PAM
  • PKI

Question 27

Question
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?
Answer
  • ifconfig hw eth1
  • netstat -r eth1
  • ss -ti eth1
  • ip link show eth1

Question 28

Question
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?
Answer
  • apt-get upgrade
  • rpm -a
  • yum updateinfo
  • dnf update
  • yum check-update

Question 29

Question
A systems administrator is tasked with mounting a USB drive on a system. The USB drive has a single partition, and it has been mapped by the system to the device /dev/sdb. Which of the following commands will mount the USB to /media/usb?
Answer
  • mount /dev/sdb1 /media/usb
  • mount /dev/sdb0 /media/usb
  • mount /dev/sdb /media/usb
  • mount -t usb /dev/sdb1 /media/usb

Question 30

Question
A Linux administrator created a new file system. Which of the following files must be updated to ensure the filesystem mounts at boot time?
Answer
  • /etc/sysctl
  • /etc/filesystems
  • /etc/fstab
  • /etc/nfsmount.conf

Question 31

Question
A system administrator is troubleshooting connectivity issues and trying to find out why a Linux server is not able to reach other servers on the same subnet it is connected to. When listing link parameters, the following is presented: [image] Based on the output above, which of following is the MOST probable cause of the issue?
Answer
  • The address ac:00:11:22:33:cd is not a valid Ethernet address.
  • The Ethernet broadcast address should be ac:00:11:22:33:ff instead.
  • The network interface eth0 is using an old kernel module.
  • The network interface cable is not connected to a switch.

Question 32

Question
A system administrator wants to be sure the sudo rules just added to /etc/sudoers are valid. Which of the following commands can be used for this task?
Answer
  • visudo -c
  • test -f /etc/sudoers
  • sudo vi check
  • cat /etc/sudoers | tee test

Question 33

Question
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?
Answer
  • ~/.ssh/authkeys
  • ~/.ssh/keys
  • ~/.ssh/authorized_keys
  • ~/.ssh/keyauth

Question 34

Question
A systems administrator has been unable to terminate a process. Which of the following should the administrator use to forcibly stop the process?
Answer
  • kill -1
  • kill -3
  • kill -15
  • kill -HUP
  • kill -TERM

Question 35

Question
A junior Linux administrator is tasked with installing an application. The installation guide states the application should only be installed in a run level 5 environment. $systemctl get-default getty.target Which of the following commands would ensure the server is set to run level 5?
Answer
  • systemctl isolate multi-user.target
  • systemctl isolate graphical.target
  • systemctl isolate network.target
  • systectl isolate basic.target

Question 36

Question
When trying to log in remotely to a server, a user receives the following message: [image] Which of the following is causing the issue?
Answer
  • The wrong permissions are on the user's home directory.
  • The account was locked out due to three failed logins.
  • The user entered the wrong password.
  • The user has the wrong shell assigned to the account.

Question 37

Question
Which of the following technologies provides load balancing, encryption, and obsiervability in containerized enviroments?
Answer
  • Virtual private network
  • Sidecar pod
  • Overlay network
  • Service mesh

Question 38

Question
At what point is the Internal Certificate Authority (ICA) created?
Answer
  • During the primary Security Management Server installation process.
  • Upon creation of a certificate.
  • When an administrator decides to create one.
  • When an administrator initially logs into SmartConsole.

Question 39

Question
A could engineer need to remove all dangling images and delete all the images that do not have and associated container. Which of the following commands will help to accomplish this task?
Answer
  • docker images prune -a
  • docker push images -a
  • docker rmi -a images
  • docker images rmi --all

Question 40

Question
A systems administrator is tasked with creating a cloud-based server with a public IP address. The code is as follows: [img] Which of the following technologies did the systems administrator use to complete this task?
Answer
  • Puppet
  • Git
  • Ansible
  • Terraform

Question 41

Question
Employees in the finance department are having trouble accessing the file /opt/work/file. All IT employees can read and write the file. Systems administrator reviews the following output: [img] Which of the following commands would permanently fix the access issue while limiting access to IT and finance department employees?
Answer
  • chattr +i file
  • chown it:finance file
  • chmod 666 file
  • setfacl -m g:finance:rw file

Question 42

Question
A Linux administrator is reviewing changes to a configuration file that includes the following section: [img] The linux administrator is trying to select the appropiate syntax formatter to correct any issues with the configuration file. Which of the following should the syntax formatter support to meet this goal?
Answer
  • Markdown
  • XML
  • YAML
  • JSON

Question 43

Question
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: [img]
Answer
  • The checkdiskspace.timer unit should be enabled via systemctl.
  • The timers.target should be reloaded to get the new configuration.
  • The checkdiskspace.timer should be configured to allow manual starts.
  • The checkdiskspace.timer should be started using the sudo command.

Question 44

Question
One leg of an LVM-mirrored volume failed due the underlying physical volume, and a systems administrator is troubleshooting the issue. The following ouput has been provided: [img]
Answer
  • Reboot the srever. The volume will automatically go back to linear mode.
  • Replace the failed drive and reconfigure the mirror.
  • Reboot the server. The volume will revert to stripe mode.
  • Recreate the logical volume.

Question 45

Question
A Linux administrator recently downloaded a software package that is currently in a compressed file. Which of the following commands will extract the files?
Answer
  • unzip -v
  • bzip2 -z
  • gzip
  • funzip

Question 46

Question
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?
Answer
  • rpm -qf /etc/httpd/conf/httpd.conf
  • rpm -ql /etc/httpd/conf/httpd.conf
  • rpm --query /etc/httpd/conf/httpd.conf
  • rpm -q /etc/httpd/conf/httpd.conf

Question 47

Question
A cloud engineer is installing packages during VM provisioning. Which of the following should the engineer use to accomplish this task?
Answer
  • Cloud-init
  • Bash
  • Docker
  • Sidecar

Question 48

Question
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?
Answer
  • scp ~/.ssh/id_rsa user@server:~/
  • rsync ~/.ssh/ user@server:~/
  • ssh-add user server
  • ssh-copy-id user@server

Question 49

Question
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?
Answer
  • docker image load java: 7
  • docker image pull java:7
  • docker image import java:7
  • docker image build java:7

Question 50

Question
A Linux administrator is troubleshooting SSH connection issues from one of the workstations. When users attempt to log in from the workstation to a server with the IP address 104.21.75.76, they receive the following message: ssh: connect to host 104.21.75.76 port 22: Connection refused. The administrator reviews the information bellow: [img]
Answer
  • The workstation has the wrong IP settings.
  • The sshd service is disabled.
  • The server's firewall is preventing connections from being made.
  • The server has an incorrect default gateway configuration.

Question 51

Question
A database administrator requested the installation of a custom database on one of the server. Which of the following should the Linux administrator configure so the requested packages can be installed?
Answer
  • /etc/yum.conf
  • /etc/ssh/sshd.conf
  • /etc/yum.repos.d/db.repo
  • /etc/resolv.conf

Question 52

Question
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?
Answer
  • ufw allow out dns
  • systemctl reload firewalld
  • iptables -A OUTPUT -p udp -m udp-dport 53 -j ACCEPT
  • firewall-cmd --zone=public --add-port=53/udp --permanent

Question 53

Question
A Linux administrator modified the SSH configuration file. Which of the following commands should be used to apply the configuration changes?
Answer
  • systemctl stop sshd
  • systemctl mask sshd
  • systemctl reload sshd
  • systemctl start sshd

Question 54

Question
A Linux administrator needs to create a new cloud.cpio archive containing all the files from the currently directory. Which of the following commands can help to accomplish this task?
Answer
  • ls | cpio -iv > cloud.epio
  • ls | cpio -iv < cloud.epio
  • ls | cpio -ov > cloud.cpio
  • ls cpio -ov < cloud.cpio

Question 55

Question
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?
Answer
  • sudo fdisk /dev/sda
  • sudo fdisk -s /dev/sda
  • sudo fdisk -l
  • sudo fdisk -h

Question 56

Question
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?
Answer
  • telinit 0
  • systemctl reboot
  • systenctl get-default
  • systemctl emergency

Question 57

Question
A Linux systems administrator is configuring a new filesystem that needs the capability to be mounted persistently across reboots. Which of the following commands will accomplish this task (Choose two).
Answer
  • df -h /data
  • mkfs.ext4 /dev/sdc1
  • fsck /dev/sdc1
  • fdisk -l /dev/sdc1
  • echo "/data/dev/sdc1 ext4 defaults 0 0" >> /etc/fstab
  • echo "/dev/sdc1 /data ext4 defaults 0 0" >> /etc/fstab

Question 58

Question
Which of the following tools is BEST suited to orchestrate a large number of containers across many different servers?
Answer
  • Kubernetes
  • Ansible
  • Podman
  • Terraform

Question 59

Question
A Linux engineer receives reports that files created within certain group are being modified by users who are not group members. The engineer wants to reconfigure the server so that only file owners and group members can modify new files by default. Which of the following commands would accomplish this task?
Answer
  • chmod 775
  • umask 002
  • chattr -Rv
  • chown -cf

Question 60

Question
An administrator attempts to rename a file on a server but receives the following error. mv: cannot move 'files/readme.txt' to 'files/readme.txt.orig': Operation not permitted. The administrator then runs a few commands and obtains the following output: [img] Which of the following commands should the administrator run NEXT to allow the file to be renamed by any user?
Answer
  • chgrp reet files
  • chacl -R 644 files
  • chown users files
  • chmod -t files

Question 61

Question
A Linux administrator would like to use the systemd to schedule a job to run every two hours. The administrator creates timer and services definition 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?
Answer
  • The checkdiskspace.service is not running.
  • The checkdiskspace.service needs to be enabled.
  • The OnCalendar schedule is incorrect in the timer definition.
  • The system-daemon services need to be reloaded.

Question 62

Question
After listing the propierties of a system account, a systems administrator wants to remove the expiration date of a user account. Which of the following commands will accomplish this task?
Answer
  • chgrp system accountname
  • passwd -s accountname
  • chmod -G system account name
  • change -E -1 accountname

Question 63

Question
A Linux system is getting an error indicating the root filesystem is full. Which of the following commads should be used by the systems administrator to resolve this issue? (Choose three).
Answer
  • df -h /
  • fdisk -1 /dev/sdb
  • growpart /dev/mapper/rootvg-rootlv
  • pvcreate /dev/sdb
  • lvresize -L +10G -r /dev/mapper/rootvg-rootlv
  • lsblk /dev/sda
  • parted -l /dev/mapper/rootvg-rootlv
  • vgextend /dev/rootvg /dev/sdb

Question 64

Question
A Linux administrator needs to create an imagen 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?
Answer
  • dd of=/dev/sda if=/tmp/sda.img
  • dd if=/dev/sda of=/tmp/sda.img
  • dd --if=/dev/sda --of=/tmp/sda.img
  • dd --of=/dev/sda --if=/tmp/sda.img

Question 65

Question
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?
Answer
  • gedit & disown
  • kill 9 %1
  • fg %1
  • bg %1 job name

Question 66

Question
A Linux administrator is adding a new configuration file to a Git repository. Which of the following describes the correct order of Git commands to accomplish the task successfully?
Answer
  • pull _> push _> add _> checkout
  • pull _> add _> commit _> push
  • checkout _> push _> add _> pull
  • pull _> add _> push _> commit

Question 67

Question
Users have been unable to reach www.comptia.org from a Linux server. A systems administrator is troubleshooting the issue and does the following: [img] Based on the information above, which of the following is causing the issue?
Answer
  • The name www.comptia.org does not point to a valid IP address.
  • The server 192.168.168.53 is unreachable.
  • No default route is set on the server.
  • The network interface eth0 is dissconected.

Question 68

Question
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?
Answer
  • echo 1 > /proc/sys/net/ipv4/ipv_forward
  • sysctl -w net.ipv4.ip_forward=1
  • firewall-cmd --enable ipv4_forwarding
  • systemctl start ipv4_forwarding

Question 69

Question
A Linux administrator reviews a set of log output files and needs to identify files that contain any occurrence of the word denied. All logs 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?
Answer
  • find .-type f -print | xrags grep -In denied
  • find .-type f -print | xrags grep -nv denied
  • find .-type f -print | xrags grep -wL denied
  • find .-type f -print | xrags grep -li denied

Question 70

Question
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 system administrator executed the following commands in the Linux system while trying to diagnose the issue: [img] Which of the following commands will resolve this issue?
Answer
  • firewall-cmd --zone=public --permanent --add-service=22
  • systemctl enable firewalld; systemctl restart firewalld
  • firewall-cmd --zone=public --permanent -add-service=ssh
  • firewall-cmd --zone=public --permanent --add-port=22/udp

Question 71

Question
A cloud enginner need to block the IP address 192.168.10.50 from accessing a Linux server. Which of the following commands will achieve this goal?
Answer
  • iptables -F INPUT -j 192.168.10.50 -m DROP
  • iptables -A INPUT -s 192.168.10.30 -j DROP
  • iptables -i INPUT --ipv4 192.168.10.50 -z DROP
  • iptables -j INPUT 192.168.10.50 -p DROP

Question 72

Question
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: [img] Which
Answer
  • restorecon -rv .ssh/authorized_key
  • mv .ssh/authorized_key .ssh/authorized_keys
  • systemctl restart sshd.service
  • chmod 600 mv .ssh/authorized_key

Question 73

Question
A systems engineer is adding a new 1GB XFS filesystem that should be temporarily mounted under /ops/app. Which of the following is the correct list of commands to achieve this goal?
Answer
  • pvcreate -L1G /dev/app mkfs.xfs /dev/app mount /dev/app /opt/app
  • parted /dev/sdb --script mkpart primary xfs 1GB mkfs.xfs /dev/sdb mount /dev/sdb /opt/app
  • lvs --create 1G --name app mkfs.xfs /dev/app mount /dev/app /opt/app
  • lvcreate -L 1G -n app app_vq mkfs.xfs /dev/app_vg/app mount /dev/app_vg/app /opt/app

Question 74

Question
An administrator installed an application from source into/opt/operations1/ and has received numerous reports that users are not able to access the application without having to use the full path /opt/operations1/bin/*. Which of the following commands should be used to resolve this issue?
Answer
  • echo 'exportPATH=$PATH:/opt/operations1/bin' >> /etc/profile
  • echo 'exportPATH=/opt/operations1/bin' >> /etc/profile
  • echo 'exportPATH=$PATH/opt/operations1/bin' >> /etc/profile
  • echo 'export $PATH:/operations1/bin' >> /etc/profile

Question 75

Question
Which of the following files holds the system configuration for journal when running systemd?
Answer
  • /etc/systemd/journald.conf
  • /etc/systemd/systemd-journalctl.conf
  • /usr/lib/systemd/journalctl.conf
  • /etc/systemd/systemd-journald.conf

Question 76

Question
A junior systems administrator has just generated public and private authentication keys for passwordless login. Which of the following files will be moved to the remote servers?
Answer
  • id_dsa.pem
  • id_rsa
  • id_ecdsa
  • id_rsa.pub

Question 77

Question
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?
Answer
  • grep -i auto /etc/systemd/journald.conf && systemctl restart systemd-journald.service
  • cat /etc/systemd/journald.conf | awk '(print $1, $3)'
  • sed -i 's/auto/persistent/g' /etc/systemd/journald.conf && sed -i 'persistent/s/¨#//q' /etc/systemd/journald.conf
  • journalctl --list-boots && systemctl restart systemd-journald.service

Question 78

Question
A systems administrator is investigating why one of the servers has stopped connecting to the internet. [img] Which of the following is causing the issue?
Answer
  • The DNS address has been commented out in the configuration file.
  • The search entry in the /etc/resolv.conf file is incorrect.
  • Wired connection 1 is offline.
  • No default route is defined.

Question 79

Question
A Linux administrator is installing a web server and needs to check whether web traffic has already been allowed through the firewall. Which of the following commands should the administrator use to accomplish this task?
Answer
  • firewalld query-service-http
  • firewall-cmd --check-service http
  • firewall-cmd --query-service http
  • firewall --check-service http

Question 80

Question
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?
Answer
  • rpm -i wget
  • rpm -qf wget
  • rpm -F wget
  • rpm -V wget

Question 81

Question
A Linux administrator is troubleshooting a memory-related issue. Based on the output of the commands. [img] Which of the following commands would address the issue?
Answer
  • top -p 8321
  • kill -9 8321
  • renice -10 8321
  • free 8321

Question 82

Question
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?
Answer
  • docker export <container_id>
  • docker info <container_id>
  • docker start <container_id>
  • docker inspect <container_id>

Question 83

Question
Using AD Query, the security gateway connections to the Active Directory Domain Controllers using what protocol?
Answer
  • Windows Management Instrumentation (WMI)
  • Hypertext Transfer Protocol Secure (HTTPS)
  • Lightweight Directory Access Protocol (LDAP)
  • Remote Desktop Protocol (RDP)

Question 84

Question
To harden one of the servers, and administrator needs to remove the possibility of remote administrative login via the SSH service. Which of the following should the administrator do?
Answer
  • Add the line DenyUsers root to the /etc/hosts.deny file.
  • Set PermitRootLogin to no in the /etc/ssh/sshd_config fie.
  • Add the line account required pam_nologin. so the /etc/pam.d/sshd file.
  • Set PubKeyAuthentication to no in the /etc/ssh/ssh_config file.

Question 85

Question
Some servers in an organization have been comprised. 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: [img] Wich of the following commands will remediate and help resolve the issue?
Answer
  • IPtables -A FORWARD -i eth0 -p tcp --dport 80 -j ACCEPT IPtables -A FORWARD -i eth0 -p tcp --dport 22 -j ACCEPT
  • IPtables -A INPUT -i eth0 -p tcp --dport 80 -j ACCEPT IPtables -A INPUT -i eth0 -p tcp --dport 22 -j ACCEPT
  • IPtables -A INPUT -i eth0 -p tcp --sport 80 -j ACCEPT IPtables -A INPUT -i eth0 -p tcp --sport 22 -j ACCEPT
  • IPtables -A INPUT -i eth0 -p tcp --dport :80 -j ACCEPT IPtables -A INPUT -i eth0 -p tcp --dport :22 -j ACCEPT

Question 86

Question
A systems administrator was tasked with assigning the temporary IP address/netmask 192.168.168.1/255.255.255.255 to the interface eth0 of a Linux server. When adding the address, the following error appears: #ip address add 192.168.168.1/33 dev eth0 Error: any valid prefix is expected rather than "192.168.168.1.33". Based on the command and its output above, which of the following is the cause of the issue?
Answer
  • The CIDR value /33 should be /32 instead.
  • There is no route to 192.168.168.1/33.
  • The interface eth0 does not exist.
  • The IP address 192.168.168.1 is already in use.

Question 87

Question
A Linux administrator needs to create a new user named user02. However, user02 must be in a different home directory, which is under /comptia/projects. Which of the following commands will accomplish this task?
Answer
  • useradd -d /comptia/projects user02
  • useradd -m /comptia/projects user02
  • useradd -b /comptia/projects user02
  • useradd -s /comptia/projects user02

Question 88

Question
An administrator deployed a Linux server that is running a web application on port 6379/tcp. SELinux is in enforcing mode based an organization policies. The port is open on the firewall. Users who are trying to connect to a local instance of the web application receive Error 13, Permission denied. The administrator ran some commands that resulted in the following ouput: [img] Which of the following commands should be used to resolve the issue?
Answer
  • semanage port -d -t http_port_t -p tcp 6379
  • semanage port -a -t http_port_t -p tcp 6379
  • semanage port -a http_port_t -p top 6379
  • semanage port -I -t http_port_tcp 6379

Question 89

Question
Which of the following commands is used to configure the default permissions for new files?
Answer
  • setenforce
  • sudo
  • umask
  • chmod

Question 90

Question
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?
Answer
  • route -i etho -p add 10.0.213.5 10.0.5.1
  • route modify eth0 +ipv4.routes "10.0.213.5/32 10.0.5.1"
  • echo "10.0.213.5 10.0.5.1 eth0" > /proc/net/route
  • ip route add 10.0.213.5/32 via 10.0.5.1 dev eth0

Question 91

Question
An administrator needs to make some changes in the laC declaration templates. Which of the following commands would maintain version control?
Answer
  • git clone https://github.com/comptia/linux+-.git git push origin
  • git clone https://github.com/comptia/linux+-.git git fetch New-Branch
  • git clone https://github.com/comptia/linux+-.git git status
  • git clone https://github.com/comptia/linux+-.git git checkout -b <new-branch>

Question 92

Question
Based on a 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. [img] To which of the following configuration files will the required changes needs to be made?
Answer
  • /etc/login.defs
  • /etc/security/limits.conf
  • /etc/default/useradd
  • /etc/profile

Question 93

Question
A user is asking the systems administrator for assistance with writing a script to verify whether a file exists. Give the following: [img] Which of the following commands should replace the <CONDITIONAL> string?
Answer
  • if [-f "$filename"]; then
  • if [-d "$filename"]; then
  • if [-f "$filename"] then
  • if [-f "$filename"]; while

Question 94

Question
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 troubleoshoot the issue, the system administrator runs netstat and receives the following output. #netstat -anp | grep appd | grep -w LISTEN tcp 0 0 127.0.0.1:9443 0:0:0:0:* LISTEN 1234/appd Based on the information above, which of the following is causing the issue?
Answer
  • The IP address 0.0.0.0 is not valid.
  • The application is listening on the loopback interface.
  • The application is listening on port 1234.
  • The application is not running.

Question 95

Question
A junior administrator is setting up a new Linux server that is intended to be a used as a router at a remote site. Which of the following parameters will accomplish this goal?
Answer
  • echo 1 > /proc/sys/net/ipv4/ip_forward iptables -t nat -A PREROUTING -i eth0 -j MASQUERADE
  • echo 1 > /proc/sys/net/ipv4/ip_forward iptables -t nat -D POSTROUTING -o eth0 -j MASQUERADE
  • echo 1 > /proc/sys/net/ipv4/ip_forward iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
  • echo 1 > /proc/sys/net/ipv4/ip_forward iptables -t nat -A PREROUTING -o eth0 -j MASQUERADE

Question 96

Question
A Linux administrator is troubleshooting an issue in which an application service failed to start on a Linux server. The administrator runs a few commands and gets the following ouputs: [img] Based on the above ouputs, which of the following is the MOST likely action the administrator should take to resolve this issue? Based
Answer
  • Enable the logsearch.service and restart the service.
  • Increase the TimeoutStartUSec configuration for the logsearch.service
  • Update the OnCalendar configuration to schedule the start of the logsearch.service.
  • Update the KillSignal configuration for the logsearch.service to use TERM.

Question 97

Question
A Linux enginner has been notified about the possible deletion of logs from the file /opt/app/logs. The enginner needs to ensure the log file can only be written into without removing previous entries. #lsattz /opt/app/logs ------------------e--- logs Which of the following commands would be BEST to use to accomplish this task?
Answer
  • chattr +a /opt/app/logs
  • chattr +d /opt/app/logs
  • chattr +i /opt/app/logs
  • chattr +c /opt/app/logs

Question 98

Question
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?
Answer
  • scp "ABC-key.pem" root@10.0.0.1
  • sftp root@10.0.0.1
  • telnet 10.0.0.1 80
  • ssh -i "ABC-key.perm" root@10.0.0.1
  • sftp "ABC-key.perm" root@10.0.0.1

Question 99

Question
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 system administrator executes the following commands: [img] Which of the following commands will BEST resolve this issue?
Answer
  • sed -i 's/SELINUX=enforcing/SELINUX=disabled/' /etc/selinux/config
  • restorecon -R -v /var/www/html
  • setenforce 0
  • setsebool -P hhtpd_can_network_connect_db on

Question 100

Question
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?
Answer
  • dnf remove packagename
  • apt-get remove packagename
  • rpm -i packagename
  • apt remove packagename

Question 101

Question
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?
Answer
  • systemctl cancel nginx
  • systemctl disable ngninx
  • systemctl mask nginx
  • systemctl stop nginx

Question 102

Question
An administrator is trying to diagnose a performance issue and is reviewing the following output: [img] Based on the above ouput, which of the following BEST describes the root cause?
Answer
  • The system has reached its maximum IOPS, causing the system to be slow.
  • The system has reached its maximum permitted throughput, therefore iowait is increasing.
  • The system is motly idle, therefore the iowait is high.
  • The system has a partitioned disk, which cuases the IOPS to be doubled.

Question 103

Question
Severals users reported that they were unable to write data to the /oracle1 directory. The following ouput has been provided. [img] Which of the following commands should the administrator use to diagnose the issue?
Answer
  • df -i /oracle1
  • fdisk -1 /dev/sdb1
  • lsblk /dev/sdb1
  • du -sh /oracle1

Question 104

Question
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--.?
Answer
  • chmod 755 filename.log
  • chmod 640 filename.log
  • chmod 740 filename.log
  • chmod 744 filename.log

Question 105

Question
A Linux administrator cloned an existing Linux server and built a new server from that clone. The administrator encountered the following error after booting the cloned server. Device mismatch detected. The administrator performed the commands listen below to further troubleshoot and mount the missing filesystem: [img] Which of the following should administrator use to resolve the device mismatch issue and mount the disk? Which of the following
Answer
  • mount disk by device-id
  • fsck -A
  • mount disk by-label
  • mount disk by-blkid

Question 106

Question
A Linux engineer set up two local DNS server (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: Send-mail: Cannot open mail:25 The local machine DNS settings are: [img] Which of the following commands could the engineer use to query the DNS server to get mail server information?
Answer
  • dig@example.com 10.10.10.20 a
  • dig@10.10.10.20 example.com.mx
  • dig@example.com 10.10.10.20 ptr
  • dig@10.10.10.20 example.com ns

Question 107

Question
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 ouput was received: [img] Which of the following commands can be used to resolve this issue?
Answer
  • chgrp -R 755 data/
  • chmod -R 777 data/
  • chattr -R -i data/
  • chown -R data/

Question 108

Question
A systems administrator made some changes in the ~/.bashrc file and added an alias command. When the administrator tried to use the alias command, it did not work. Which of the following should be executed FIRST?
Answer
  • source ~/.bashrc
  • read ~./bashrc
  • touch ~./bashrc
  • echo ~./bashrc

Question 109

Question
A system administrator needs to clone the partition /dev/sdc1 to /dev/sdd1. Which of the following commands will accomplish this task?
Answer
  • tar -cvzf /dev/sdd1 /dev/sdc1
  • rsync /dev/sdc1 /dev/sdd1
  • dd if=/dev/sdc1 of=/dev/sdd1
  • scp /dev/sdc1 /dev/sdd1

Question 110

Question
A Linux engineer needs to create a custom script, cleanup.sh, to run a boot as part of the system services. Which of the following processes would accomplish this task?
Answer
  • Create a unit file in the /etc/default/ directory. systemctl enable cleanup systemctl is-enabled cleanup
  • Create a unit file in the /etc/ske1/directory. systemctl enable cleanup systemctl is-enable cleanup
  • Create a unit file in the /etc/systemd/system/ directory. systemctl enable cleanup systemctl is-enable cleanup
  • Create a unit file in the /etc/sysctl.d/ directory. systemctl enable cleanup systemctl is-enable cleanup

Question 111

Question
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?
Answer
  • git reflog
  • git pull
  • git status
  • git push

Question 112

Question
A Linux systems administrator receives reports from various users that an application hosted on a server has stopped responding at similar times for several days in a row. The administrator logs in to the system and obtains the following ouput: [img] Which of the following should the administrator do to provide the BEST solution for the reported issue?
Answer
  • Configure memory allocation policies during business hours and prevent the Java process from going into a zombie state while the server is idle.
  • Configure a different nice value for the Java process to allow for more users and prevent the Java process from restarting during business hours.
  • Configure more CPU core to allow for the server to allocate more processing and prevent the Java process from consuming all of the available resources.
  • Configure the swap space to allow for spikes in usage during peak hours and prevent the Java process from stopping due to a lack of memory.

Question 113

Question
A systems administrator is deploying three identical, cloud-based servers. The administrator is using the following code to complete the task: [img] Which of the following technologies is the administrator using?
Answer
  • Ansible
  • Puppet
  • Chef
  • Terraform

Question 114

Question
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 propper access to the script?
Answer
  • chown user2:accounting script.sh chmod 750 script.sh
  • chown user1:accounting script.sh chmod 777 script.sh
  • chown accounting:user1 script.sh chmod 057 script.sh
  • chown user2:accounting script.sh chmod u+x script.sh

Question 115

Question
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?
Answer
  • pam_login.so
  • pam_access.so
  • pam_logindef.so
  • pam_nologin.so

Question 116

Question
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?
Answer
  • ss -plnt
  • tcpdump -nL
  • netstat -pn
  • lsof -lt

Question 117

Question
What is the main objective when using Application Control?
Answer
  • To filter out specific content.
  • To assist the firewall blade with handling traffic.
  • To see what users are doing.
  • Ensure security and privacy of information.

Question 118

Question
A Linux system administrator receives a notification that one of the server's filesystem is full. Which of the following commands would help the administrator to identify this filesystem?
Answer
  • lsblk
  • fdisk
  • df -h
  • du -ah

Question 119

Question
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?
Answer
  • /etc/host.conf
  • /etc/hostname
  • /etc/services
  • /etc/ssh/sshd_config

Question 120

Question
A developer is trying to install an application remotly that requires a graphical interface for installation. The developer requested assistance to set up the necessary environment variables along with X11 forwarding in SSH. Which of the following environment variables must be set in remote shell in order to launch the graphical interface?
Answer
  • $RHOST
  • SETENV
  • $SHELL
  • $DISPLAY

Question 121

Question
Which of the following technologies can be used as a central repository of Linux users and groups?
Answer
  • LDAP
  • MFA
  • SSO
  • PAM

Question 122

Question
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?
Answer
  • hostnamectl status --no-ask-password
  • hostnamectl set-hostname "$(perl -le "print" "A" x86)"
  • hostnamectl set-hostname Comptia-WebNode -H root@192.168.2.14
  • hostnamectl set-hostname Comptia-WebNode --transient

Question 123

Question
A Linux administrator needs to determine whether a hostname is in the DNS. Which of the following would supply the information that is needed?
Answer
  • nslookup
  • rsync
  • netstat
  • host

Question 124

Question
A systems administrator wants to back up the directory /data and all its contents to /backup/data on a remote server named remote. Which of the following commands will achieve the desired effect?
Answer
  • scp -p /data remote:/backup/data
  • ssh -i /remote:/backup/ /data
  • rsync -a /data remote:/backup/
  • cp -r /data/remote/backup

Question 125

Question
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: [img] Which of the following commands will the administrator most likely run NEXT?
Answer
  • vmstat
  • strace
  • htop
  • lsof

Question 126

Question
A Linux administrator is troubleshooting the root cause of a high CPU load and average. [img] Which of the following commands will permanently resolve the issue?
Answer
  • renice -n -20 6295
  • pstree -p 6295
  • iostat -cy 1 5
  • kill -9 6295

Question 127

Question
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.)
Answer
  • sysctl net.ipv4.ip_forward
  • sysctl -w net.ipv4.ip_forward=1
  • echo "net.ipv4.ip_forward=1" >> /etc/sysctl.conf
  • echo 1 > /proc/sys/net/ipv4/ip_forward
  • sysctl -p
  • echo "net.ipv6.conf.all.forwarding=l" >> /etc/sysctl.conf

Question 128

Question
A Linux administrator is trying to remove the ACL from the file /home/user/data.txt but receives the following error message: setfacl: data.txt: operation not permitted Given the following analysis: [img] Which of the following is causing the error message?
Answer
  • The administrator is not using a highly privileged account.
  • The filesystem is mounted with the wrong options.
  • SELinux file context is denying the ACL changes.
  • File attributes are preventing file modification.

Question 129

Question
Which of the following tools is commonly used for creating CI/CD pipelines?
Answer
  • Chef
  • Puppet
  • Jenkins
  • Ansible

Question 130

Question
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?
Answer
  • vgs
  • lvs
  • fdisk -1
  • pvs

Question 131

Question
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?
Answer
  • git clone https://git.company.com/admin/project.git
  • git checkout https://git.company.com/admin/project.git
  • git pull https://git.company.com/admin/project.git
  • git branch https://git.company.com/admin/project.git

Question 132

Question
A Linux system fails to start and delievers the following error message: [img] Which of the following commands can be used to address this issue?
Answer
  • fsck.ext4 /dev/sda1
  • partprobe /dev/sda1
  • fdisk /dev/sda1
  • mkfs.ext4 /dev/sda1

Question 133

Question
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 filesystem was missing. The filesystem was not listed in /etc/fstab and might have been mounted manually by someone prior the reboot. Which of the following would prevent this issue from reoccurring in the future?
Answer
  • Sync the mounts units.
  • Mount the filesystem manually.
  • Create a mount unit and enable it to be started at boot.
  • Remount all the missing filesystems.

Question 134

Question
A Linux engineer needs to download a ZIP file and wants to set the nice value to -10 for this new process. Which of the following commands will help to accomplish the task?
Answer
  • nice -v -10 wget https://foo.com/installation.zip
  • renice -v -10 wget https://foo.com/installation.zip
  • renice -10 wget https://foo.com/installation.zip
  • nice -10 wget https://foo.com/installation.zip

Question 135

Question
A systems administrator needs to check if the service systemd-resolved.service is running without any errors. Which of the following commands will show this information?
Answer
  • systemctl status systemd-resolved.service
  • systemctl enable systemd-resolved.service
  • systemctl mask systemd-resolved.service
  • systemctl show system

Question 136

Question
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?
Answer
  • partprobe vpcreate lvextend
  • lvcreate fdisk partprobe
  • fdisk partprobe mkfs
  • fdisk pvcreate vgextend

Question 137

Question
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).
Answer
  • Execute the following command from the GRUB rescue shell: mount -o remount, ro/sysroot.
  • Interrupt the boot process in the GRUB menu and add systemd.unit=single in the kernel line.
  • Interrupt the boot process in the GRUB menu and add systemd.unit=rescue.target in the kernel line.
  • Interrupt the boot process in the GRUB menu and add single=user in the kernel line.
  • Interrupt the boot process in the GRUB menu and add init=/bin/bash in the kernel line.
  • Interrupt the boot process in the GRUB menu and add systemd.unit=single.target in the kernel line.

Question 138

Question
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 any time would like to bring back the initial state of the simulation, please click the Reset All button. [blank_start]yum install httpd[blank_end] systemctl --now enable httpd systemctl status httpd netstat -tunlp | grep 80 pkill <processname> systemctl restart httpd systemctl status httpd
Answer
  • yum install httpd
  • systemctl --now enable httpd
  • (check 1) systemctl status httpd
  • netstat -tunlp | grep 80
  • pkill <processname>
  • systemctl restart httpd
  • (check2) systemctl status httpd

Question 139

Question
A Linux systems administrator needs to copy files and directories from Server A to Server B. Which of the following commands can be used for this purpose? (Choose two).
Answer
  • rsyslog
  • cp
  • rsync
  • reposync
  • scp
  • ssh

Question 140

Question
Rugged appliances are small appliances with ruggedized hardware and like Quantum Spark appliance they use which operating system?
Answer
  • Centos Linux
  • Gaia embedded
  • Gaia
  • Red Hat Enterprise Linux version 5

Question 141

Question
As a System Administrator, to reduce disk space, you were tasked to create a shell script that does the following: Add a relevant content to /tmp/script.sh, so that it finds and compresses related files in /var/log/ without recursion. INTRUCTIONS Drag and drop snippets to 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.
Answer
  • egrep
  • "$log.[1-6]$"
  • "log.[1-6]$"
  • for
  • while
  • repeat
  • xz
  • in
  • then
  • /tmp/tempfile
  • /var/log
  • filename
  • gzip
  • rar
  • tar
  • awk
  • done
  • until

Question 142

Question
A systems administrator needs to verify whether the built container has the app.go file in its root directory. Which of the following can the administrator use to verify the root directory has this file?
Answer
  • docker image inspect
  • docker container inspect
  • docker exec <container_name> ls
  • docker ps <container_name>

Question 143

Question
A DevOps engineer needs to allow incoming traffic to ports in the range of 4000 to 5000 on a Linux server. Which of the following commands will enforce this rule?
Answer
  • iptables -f filter -l INPUT -p tcp --dport 4000:5000 -A ACCEPT
  • iptables -t filter -A INPUT -p tcp --dport 4000:5000 j ACCEPT
  • iptables filer -A INPUT -p tcp --dport 4000:5000 -D ACCEPT
  • iptables filter -S INPUT -p tcp --dport 4000:5000 -A ACCEPT

Question 144

Question
Which of the following data structure is written in JSON?
Answer
  • --- name: user1 position: DevOps floor: 3
  • <table> <thbody><tr> <td>user1</td> <td>DevOps</td> <td>3</td> </tr> </tbody></table>
  • <root> <floor>3</floor> <name>user1</name> <position>DevOps</position> </root>
  • { "name": "user1", "job": "DevOps", "floor":3 }

Question 145

Question
Which of the following directories is the mount point in a UEFI system?
Answer
  • /sys/efi
  • /boot/efi
  • /efi
  • /etc/efi

Question 146

Question
A Linux administrator needs to remove software from the server. Which of the following RPM options should be used?
Answer
  • rpm -s
  • rpm -d
  • rpm -q
  • rpm -e

Question 147

Question
In which of the following filesystems are system logs commonly stored?
Answer
  • /var
  • /tmp
  • /etc
  • /opt

Question 148

Question
Which of the following is a function of a bootloader?
Answer
  • It initializes all the devices that are required to load the OS.
  • It mounts the root filesystem that is required to load the OS.
  • It helps to load the different kernels to initiate the OS startup process.
  • It triggers the start of all the system services.

Question 149

Question
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?
Answer
  • firewall-cmd --get-services
  • firewall-cmd --check-config
  • firewall-cmd --list-services
  • systemctl status firewalld

Question 150

Question
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?
Answer
  • tail -v 20
  • tail -n 20
  • tail -c 20
  • tail -l 20

Question 151

Question
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?
Answer
  • docker image save test test:v1
  • docker image build test:vl
  • docker image tag test test:vl
  • docker image version test:v1

Question 152

Question
A Linux administrator copied a Git repository locally, created a feature branch, and commited some changes to the feature branch. Which of the following Git actions should the Linux administrator use to publish the changes to the main brach of the remote repository?
Answer
  • rebase
  • tag
  • commit
  • push

Question 153

Question
A Linux system is failing to boot with the following error: error: no such partitions Entering rescue mode... grub rescue> Which of the following actions will resolve this issue? (Choose two).
Answer
  • Execute grub-install --root-directory=/mnt and reboot.
  • Execute grub-install /dev/sdX and reboot.
  • Interrupt the boot process in the GRUB menu and add rescue to the kernel line.
  • Fix the partition modifying /etc/default/grub and reboot.
  • Interrupt the boot process in the GRUB menu and add single to the kernel line.
  • Boot the system on a LiveCD/ISO.

Question 154

Question
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?
Answer
  • iptables -t nat -D PREROUTING -p tcp --sport 80 -j DNAT --to-destination 192.0.2.25:3128
  • iptables -t nat -A PREROUTING -p top -dport 81 -j DNAT --to-destination 192.0.2.25:3129
  • iptables -t nat -I PREROUTING -p top --sport 80 -j DNAT --to-destination 192.0.2.25:3129
  • iptables -t nat -A PREROUTING -p tcp --dport 80 -j DNAT --to-destination 192.0.2.25:3128

Question 155

Question
Due to low disk space, a Linux administrator finding and removing all log files that were modified more than 180 days ago. Which of the following commands will accomplish this task?
Answer
  • find /var/log -type d -mtime +180 -print -exec rm{}/;
  • find /var/log -type f -modified +180 -rm
  • find /var/log -type f -mtime +180 -exec rm {} /
  • find /var/log -type c -atime +180 -remove

Question 156

Question
A cloud engineer is asked to copy the file deployment.yaml from a container to the host where the container is running. Which of the following commands can accomplish this task?
Answer
  • docker cp container_id/deployment.yaml deployment.yaml
  • docker cp container_id:/deployment.yaml deployment.yaml
  • docker cp deployment.yaml local://deployment.yaml
  • docker cp container_id/deployment.yaml local://deplyment.yaml

Question 157

Question
A Linux administrator created the directory /project/access2all. By creating this directory, the administrator is trying to avoid the deletion or modification of files from non-owners. Which of the following will accomplish this goal?
Answer
  • chmod +t /project/access2all
  • chmod +rws /project/access2all
  • chmod 2770 /project/access2all
  • chmod ugo+rwx /project/access2all

Question 158

Question
A systems administrator is investigating an issue in which one of the servers is not booting up properly. The journalctl entries show the following: [img] Which of the following will allow the administrator to boot the Linux system to normal mode quickly?
Answer
  • Comment out the /opt/app filesystem in /etc/fstab and reboot.
  • Reformat the /opt/app filesystem and reboot.
  • Perform filesystem checks on local filesystems and reboot.
  • Trigger a filesystem relabel and reboot.

Question 159

Question
A system administrator configured firewall rules using firewalld. However, after the system is rebooted, the firewall rules are not present: [img] Which of the following is the reason the firewall rules are not active?
Answer
  • iptables is conflicting with firewalld.
  • The wrong system target is actived.
  • FIREWALL_ARGS has no value assigned.
  • The firewalld service is not enanbled.

Question 160

Question
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: TIMESTAMP=$ (date '+%Y-%m-%d %H:%M:%S') echo "helpme.service: timestamp $(Timestamp)" | systemd -cat -p info sleep 60 done The administrator tries to run the sript after making it executable with chmod +x; however, the script will not run. Which of the following should the administrator do the address this issue? (Choose two).
Answer
  • Add #!/bin/bash to the bottom of the script.
  • Create a unit file for the new service in /etc/systemd/system/ with the name helpme.service in the location
  • Add #!/bin/bash to the top of the script
  • Restart the computer to enable the new service.
  • Create a unit file for the new service in /etc/init.d with the name helpme.service in the location.
  • Shut down the computer to enable the new service.

Question 161

Question
A Linux administrator was tasked with deleting all files and directories with names that are contained in the sobelete.txt file. Which of the following commands will accomplish this task?
Answer
  • xargs -f cat toDelete.txt -rm
  • rm -d -r -f toDelete.txt
  • cat toDelete.txt | rm -frd
  • cat toDelete.txt | xargs rm -rf

Question 162

Question
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?
Answer
  • systemctl status
  • systemctl stop
  • systemctl reinstall
  • systemctl daemon-reload

Question 163

Question
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 model After logging in, type "journalctl -xb" to viewsystem logs, "systemctl reboot" to reboot, "systemctl default" to try again to boot into default mode. Give root password for maintenance (or type Control-D to continue} Which of the following files will need to be modified for this server to be able to boot again?
Answer
  • /etc/mtab
  • /dev/sda
  • /etc/fstab
  • /etc/grub.conf

Question 164

Question
A system administrator is troubleshooting a connectivity issue pertaining to access to a system named db.example.com. The system IP address should be 192.168.20.88. The administrator issues the dig command and receives the following output: ;;ANSWER SECTION: db.example.com. 15 IN A 192.168.20.89 The administrator runs grep db.example.com /etc/hosts and receives the following output: 192.168.20.89 db.example.com Given this scenario, which of the following should the administrator do to address this issue?
Answer
  • Modify the /etc/hosts file and change the db.example.com entry to 192.168.20.89.
  • Modify the /etc/network file and change the db.example.com entry to 192.168.20.88.
  • Modify the /etc/network file and change the db.example.com entry to 192.168.20.89.
  • Modify the /etc/hosts file and change the db.example.com entry to 192.168.20.88.

Question 165

Question
A server is experiencing intermittent connection issues. Some connections to the Internet work as intended, but some fail as if there is no connectivity. The systems administrator inspects the server configuration: [img] Which of the following is MOST likely the cause of the issue?
Answer
  • An internal-only DNS server is configured.
  • The IP netmask is wrong for ens3.
  • Two default routes are configured.
  • The ARP table contains incorrect entries.

Question 166

Question
Joe, a user, is unable to log in to the Linux system. Given the following ouput: [img] Which of the following commands would resolve the issue?
Answer
  • usermod -s /bin/bash joe
  • pam_tally2 -u joe -r
  • passwd -u joe
  • change -E 90 joe

Question 167

Question
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 enpls0f1. Which of the following commands should the administrator run to achieve the goal?
Answer
  • ip addr add 10.0.6.5/24 dev enpls0f1
  • echo "IPV4_ADDRESS=10.0.6.5/24" > /etc/sysconfig/network-scripts/ifcfg-enpls0f1
  • ifconfig 10.0.6.5/24 enpsls0f1
  • nmcli conn add ipv4.address=10.0.6.5/24 if name snspls0f1

Question 168

Question
A Linux administrator booted up the server and was presented with a non-GUI terminal. The administrator ran the command systemctl isolate graphical.target and rebooted the system by running systemctl reboot, which fixed the issue?
Answer
  • The administrator did not reboot the server properly.
  • The administrator did not set the default target to basic.target.
  • The administrator did not set the default target to graphical.target.
  • The administrator did not shut down the server properly.

Question 169

Question
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 see 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?
Answer
  • cp /home/tmp/tempa /home/tmp/temp
  • mv /home/tmp/tempa /home/tmp/temp
  • cd /temp/tmp/tempa
  • ls /home/tmp/tempa

Question 170

Question
A systems administrator is encountering performance issues. The administrator runs a command with the following output: 09:10:18 up 457 days, 32 min, 5 users, load average: 4.22 6.63 5.58 The Linux server has the following system properties: CPU4 vCPU Memory: 50GB Which of the following accurately describes this situation?
Answer
  • The system is under CPU pressure and will requires additional vCPUs.
  • The system has been running for over a year and requires a reboot.
  • Too many users are currently logged in to the system.
  • The system requires more memory.

Question 171

Question
A Linux administrator found many containers in an exited state. Which of the following commands will allow the administrator to clean up the contaners in an exited state?
Answer
  • docker rm --all
  • docker rm $(docker ps -aq)
  • docker images prune*
  • docker rm --state exited
Show full summary Hide full summary

Similar

'The Merchant of Venice' - William Shakespeare
cian.buckley
Enzymes
daniel.praecox
AP Chemistry
Cathal Darby
Waves
kate.siena
Geography Restless Earth
sophieelizabeth
Command Words
Mr Mckinlay
2PR101 1.test - 8. část
Nikola Truong
Salesforce Admin 201 Exam Chunk 3 (66-90)
Brianne Wright
SFDC App Builder 1 (126-150)
Connie Woolard
Which GoConqr Product is Right for Me?
Sarah Egan
Specifc Topic 7.4 Timber (Impacts)
T Andrews