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?
An administrator thinks that a package was installed using a snap. Which of the following commands can the administrator use to verify this information?
A 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?
A systems administrator is tasked with creating an Ansible playbook to automate the installation of patches on several Linux systems. In which of the following languages should the playbook be written?
An administrator would like to list all current containers, regardless of their running state. Which of the following commands would allow the administrator to accomplish this task?
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?
A Linux administrator is troubleshooting an issue in which an application service failed to start on a Linux server. The administrator runs a few commands and gets the following outputs:
Based on the above outputs, which of the following is the MOST likely action the administrator should take to resolve this issue?
The administrator comptia is not able to perform privileged functions on a newly deployed system. Given the following command outputs:
Which of the following is the reason that the administrator is unable to perform the assigned duties?
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).
A Linux systems administrator needs to add additional code to code that resides within a repository without changing the original code. Once completed, the additional code will be merged into the main branch. Which of the following commands should the administrator use first?
Users have reported that the interactive sessions were lost on a Linux server. A Linux administrator verifies the server was switched to rescue.target mode for maintenance. Which of the following commands will restore the server to its usual target?
A Linux administrator needs to harden a system and guarantee that the Postfix service will not run, even after a restart or system upgrade. Which of the following commands allows the administrator to fulfill the requirement?
The security team has identified a web service that is running with elevated privileges A Linux administrator is working to change the systemd service file to meet security compliance standards. Given the following output:
Which of the following remediation steps will prevent the web service from running as a privileged user?
A systems administrator is tasked with creating a cloud-based server with a public IP address.
Which of the following technologies did the systems administrator use to complete this task?
Based on an organization’s new cybersecurity policies, an administrator has been instructed to ensure that, by default, all new users and groups that are created fall within the specified values below.
To which of the following configuration files will the required changes need to be made?
Users are reporting that writes on a system configured with SSD drives have been taking longer than expected, but reads do not seem to be affected. A Linux systems administrator is investigating this issue and working on a solution. Which of the following should the administrator do to help solve the issue?
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?
Which of the following tools is BEST suited to orchestrate a large number of containers across many different servers?
A Linux system is getting an error indicating the root filesystem is full. Which of the following commands should be used by the systems administrator to resolve this issue? (Choose three.)
A Linux engineer has been notified about the possible deletion of logs from the file /opt/app/logs. The engineer needs to ensure the log file can only be written into without removing previous entries.
Which of the following commands would be BEST to use to accomplish this task?
A Linux administrator is investigating the reason a systemd timer is not running every night at midnight. The administrator sees the following unit file:
[Unit]
Description=Execute backup every day at midnight
[Timer]
OnCalendar=--01 00:00:00
Unit=backup.service
RandomizedDelaySec=10800
[Install]
WantedBy=multi-user.target
Which of the following modifications should the administrator make in the unit file? (Select two).
A systems administrator frequently connects to a remote host via SSH and a non-standard port. The systems administrator would like to avoid passing the port parameter on the command line every time. Which of the following files can be used to set a different port value for that host?
A 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?
The application team has reported latency issues that are causing the application to crash on the Linux server. The Linux administrator starts
troubleshooting and receives the following output:
Which of the following commands will improve the latency issue?
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?
A User on a Linux workstation needs to remotely start an application on a Linux server and then forward the graphical display of that application back to the Linux workstation. Which of the following would enable the user to perform this action?
A hardened physical Linux system allows regular, unprivileged users to remotely connect to the server using SSH only. No sudo tool has been installed. Which of the following should the Linux administrator use to perform administrative tasks on this host? (Select two).
Users in the human resources department are trying to access files in a newly created directory. Which of the following commands will allow the users access to the files?
After starting an Apache web server, the administrator receives the following error:
Apr 23 localhost.localdomain httpd 4618] : (98) Address already in use: AH00072: make_sock: could not bind to address [: :]80
Which of the following commands should the administrator use to further trou-bleshoot this issue?
An administrator is running a web server in a container named web, but none of the error output is not showing. Which of the following should the administrator use to generate the errors on the container?
A 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?
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?
A systems administrator intends to use a UI-JID to mount a new partition per-manently on a Linux system. Which of the following commands can the adminis-trator run to obtain information about the UUlDs of all disks attached to a Linux system?
A DevOps engineer is working on a local copy of a Git repository. The engineer would like to switch from the main branch to the staging branch but notices the staging branch does not exist. Which of the following Git commands should the engineer use to perform this task?
A Linux administrator encounters the following error in the Apache log files:
css
SQLSTATE[HY000] [2002] Permission denied
Which of the following commands should the administrator run to safely fix this issue?
A Linux administrator deployed a large-scale application service as a containerized pod. The Linux administrator needs to continually send the application's log file to the company’s central log store. Which of the following should the Linux administrator do to efficiently perform this task?
A Linux system is having issues. Given the following outputs:
# dig @192.168.2.2 mycomptiahost
; << >> DiG 9.9.4-RedHat-9.9.4-74.el7_6.1 << >> @192.168.2.2 mycomptiahost
; (1 server found)
;; global options: +cmd
;; connection timed out; no servers could be reached
# nc -v 192.168.2.2 53
Ncat: Version 7.70 ( https://nmap.org/ncat )
Ncat: Connection timed out.
# ping 192.168.2.2
PING 192.168.2.2 (192.168.2.2) 56(84) bytes of data.
64 bytes from 192.168.2.2: icmp_seq=1 ttl=117 time=4.94 ms
64 bytes from 192.168.2.2: icmp_seq=2 ttl=117 time=10.5 ms
Which of the following best describes this issue?
Users are reporting that a Linux server is responding slowly. A systems administrator troubleshooting the server issue sees the following iostat output, with %iowait at 50.38. Which of the following is most likely the issue?
An administrator has source code and needs to rebuild a kernel module. Which of the following command sequences is most commonly used to rebuild this
type of module?
A Linux administrator is troubleshooting SSH connection issues from one of the workstations.
When users attempt to log in from the workstation to a server with the IP address 104.21.75.76, they receive the following message:
The administrator reviews the information below:
Which of the following is causing the connectivity issue?
A Linux administrator needs to redirect all HTTP traffic temporarily to the new proxy server 192.0.2.25 on port 3128. Which of the following commands will accomplish this task?
A new application container was built with an incorrect version number. Which of the following commands should be used to rename the image to match the correct version 2.1.2?
A network administrator issues the dig www.foo.com command and receives an NXDOMAIN response. Which of the following files should the administrator check first?
A junior Linux administrator is tasked with installing an application. The installation guide states the application should only be installed in a run level 5 environment.
Which of the following commands would ensure the server is set to runlevel 5?
A systems administrator created a new directory with specific permissions. Given the following output:
arduino
$ ls -ld /comptia
drwxr-x--- 2 root root 4096 Oct 20 20:13 /comptia
$ getfacl /comptia
# file: /comptia
# owner: root
# group: root
user::rwx
group::r-x
other::---
default:user::rwx
default:group::r-x
default:group:wheel:rwx
default:mask::rwx
default:other::---
Which of the following permissions are enforced on /comptia?
A Linux administrator needs to expose port 9000 for a container to listen during runtime. The Linux administrator creates a Dockerfile with the following entries:
sql
FROM node:9-alpine
WORKDIR /usr/src/app
COPY package.json ./
RUN npm install
COPY . .
EXPOSE 9000
CMD ["npm", "start"]
Which of the following commands should the administrator use to accomplish this task? (Select two).
A Linux administrator wants to set the SUID of a file named dev_team.text with 744 access rights. Which of the following commands will achieve this goal?
A Linux administrator provisioned a new web server with custom administrative permissions for certain users. The administrator receives a report that user1 is unable to restart the Apache web service on this server. The administrator reviews the following output:
[ root@server ] # id user1
UID=1011 (user1) gid=1011 (USER1) groups=1011 (user1), 101 (www-data), 1120 (webadmin)
[ root@server ] # cat /etc/sudoers.d/custom.conf
user1 ALL=/usr/sbin/systemctl start httpd, /usr/sbin/systemctl stop httpd
webadmin ALL=NOPASSWD: /etc/init.d.httpd restart, /sbin/service httpd restart, /usr/sbin/apache2ctl restart
#%wheel ALL=(ALL) NOPASSWD: ALL
Which of the following would most likely resolve the issue while maintaining a least privilege security model?
A Linux administrator reviews a set of log output files and needs to identify files that contain any occurrence of the word denied. All log files containing entries in uppercase or lowercase letters should be included in the list. Which of the following commands should the administrator use to accomplish this task?
A systems administrator is encountering performance issues. The administrator runs 3 commands with the following output
The Linux server has the following system properties
CPU: 4 vCPU
Memory: 50GB
Which of the following accurately describes this situation?
A Linux systems administrator is troubleshooting an I/O latency on a single CPU server. The administrator runs a top command and receives the following output:
%Cpu(s): 0.2 us, 33.1 sy, 0.0 ni, 0.0 id, 52.4 wa, 0.0 hi, 0.2 si, 0.0 st
Which of the following is correct based on the output received from the exe-cuted command?
A systems administrator is reviewing the following output on the text editor that is being used to update the company's internal database records:
Which of the following extensions should the systems administrator use when saving the file?
A user (userA) has reported issues while logging in to the system. The following output has been provided:
bash
Could not chdir to home directory /home/userA: Permission denied
-bash: /home/userA/.bash_profile: Permission denied
# cat /etc/passwd | grep userA
userA:x:1234:3400:userA account:/home/userA/:/bin/bash
# passwd -S userA
userA PS 2022-10-17 1 99999 0 (Password set. SHA512 crypt.)
# groups userA
admin dev usergrp
# ls -lth /home/
drwx------ 7 root admin 9 Jan 17 2019 userA
drwxr-xr-x 4 userC app 9 Jan 23 2020 userC
Which of the following describes the issue userA is having?
A Linux administrator needs to connect securely to a remote server in order to install application software. Which of the following commands would allow this connection?
A Linux administrator is trying to start the database service on a Linux server but is not able to run it. The administrator executes a few commands and receives the following output:
Which of the following should the administrator run to resolve this issue? (Select two).
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?
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?
To harden one of the servers, an administrator needs to remove the possibility of remote administrative login via the SSH service. Which of the following should the administrator do?
A Linux systems administrator is updating code. After completing the update, the administrator wants to publish the updated code without including the configuration files. Which of the following should the administrator use to accomplish this task?
Which of the following commands is used to configure the default permissions for new files?
A systems administrator received a request to change a user's credentials. Which of the following commands will grant the request?
A Linux administrator is implementing a CI/CD process for the company’s internal accounting web application. Which of the following best defines the purpose of this process?
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?
Which of the following specifications is used to perform disk encryption in a Linux system?
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?
An administrator thinks that a package was installed using a snap. Which of the following commands can the administrator use to verify this information?
A systems administrator is installing various software packages using a pack-age manager. Which of the following commands would the administrator use on the Linux server to install the package?
Users are experiencing high latency when accessing a web application served by a Linux machine. A systems administrator checks the network interface counters and sees the following:
Which of the following is the most probable cause of the observed latency?
A cloud engineer wants to delete all unused networks that are not referenced by any container. Which of the following commands will achieve this goal?
A Linux administrator has defined a systemd script docker-repository.mount to mount a volume for use by the Docker service. The administrator wants to ensure that Docker
service does not start until the volume is mounted. Which of the following configurations needs to be added to the Docker service definition to best accomplish this task?
A systems administrator created a web server for the company and is required to add a tag for the API so end users can connect. Which of the following would the administrator do to complete this requirement?
A hardened physical Linux system allows regular, unprivileged users to remotely connect to the server using SSH only. No sudo tool has been installed. Which of the following should the Linux administrator use to perform administrative tasks on this host? (Select two).
A Linux administrator is providing a new Nginx image from the registry to local cache. Which of the following commands would allow this to happen?
Which of the following technologies can be used as a central repository of Linux users and groups?
As a Systems Administrator, to reduce disk space, you were tasked to create a shell script that does the following:
Add relevant content to /tmp/script.sh, so that it finds and compresses rotated files in /var/log without recursion.
INSTRUCTIONS
Fill the blanks to build a script that performs the actual compression of rotated log files.
If at any time you would like to bring back the initial state of the simulation, please click the Reset All button.
Users are reporting that a production application has slow performance. A systems administrator logs in to the server and performs some basic checks. Given the following:
yaml
[root@comptia]# ps -o pcpu; pidstat 1
Average: UID PID %usr %system %wait %CPU Command
Average: 0 937242 32.39 0 63.21 32.39 app_prd
Average: 0 937245 44.97 0.31 51.57 45.28 app_prd
Average: 0 937244 23.62 0 63.55 28.62 app_prd
[root@comptia]# vmstat 1
procs memory swap io system cpu
r b swpd free buff cache si so bi bo in cs us sy id wa st
16 0 978912 376320 50804 10296312 0 0 0 44 5503 2962 98 2 0 0 0
[root@comptia]# free -m
total used free shared buff/cache available
Mem: 15533 5063 365 164 10104 9975
Swap: 7931 955 6976
Which of the following is causing the performance issue?
Which of the following actions are considered good security practices when hardening a Linux server? (Select two).
After connecting to a remote host via SSH, an administrator attempts to run an application but receives the following error:
[user@workstation ~]$ ssh admin@srv1
Last login: Tue Mar 29 18:03:34 2022
[admin@srvl ~] $ /usr/local/bin/config_manager
Error: cannot open display:
[admin@srv1 ~] $
Which of the following should the administrator do to resolve this error?
A senior Linux administrator has created several scripts that will be used to install common system applications. These scripts are published to a reposito-ry to share with the systems team. A junior Linux administrator needs to re-trieve the scripts and make them available on a local workstation. Which of the following Git commands should the junior Linux administrator use to accom-plish this task?
A systems technician is working on deploying several microservices to various RPM-based systems, some of which could run up to two hours. Which of the following commands will allow the technician to execute those services and continue deploying other microservices within the same terminal section?
A 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?
Linux system users report that over the past few months, a server has stopped responding at least twice each day. Every time this happens, the users have to restart the server to recover it. A systems administrator diagnosing the issue collects the following outputs:
csharp
Output 1
[Tue Aug 31 16:36:42 2021] oom-killer invoked by java: gfp_mask=0x280da2 order=0, oom_score_adj=0
[Tue Aug 31 16:36:42 2021] java cpuset=/ mems_allowed=0
makefile
Output 2
[root@server]# free -m
total used free shared buff/cache available
Mem: 15819 15026 174 92 619 134
Swap: 0 0 0
Which of the following is the best permanent resolution for the system?
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?
A developer wants to ensure that all files and folders created inside a shared folder named /GroupOODEV inherit the group name of the parent folder. Which of the following commands will help achieve this goal?
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?
Joe, a user, is unable to log in to the Linux system. Given the following output:
Which of the following commands would resolve the issue?
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?
A Linux administrator needs to determine whether a hostname is in the DNS. Which of the following would supply the information that is needed?
A systems administrator created a new directory with specific permissions. Given the following output:
# file: comptia
# owner: root
# group: root
user: : rwx
group :: r-x
other: :---
default:user :: rwx
default:group :: r-x
default:group:wheel: rwx
default:mask :: rwx
default:other ::-
Which of the following permissions are enforced on /comptia?
A DevOps engineer wants to work on a snapshot of the infrastructure as code configuration. Which of the following commands should the engineer use to accomplish this task?
The MySQL database process that was running on a Linux server suddenly stopped, and the process was killed. Which of the following commands can help identify whether this issue was produced by the OOM killer?
A Linux administrator is troubleshooting a memory-related issue. Based on the output of the commands:
Which of the following commands would address the issue?
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?
An administrator made a change to a system’s network configuration. Which of the following best represents what the administrator should do to have the new configuration take effect?
A systems administrator is receiving tickets from users who cannot reach the application app that should be listening on port 9443/tcp on a Linux server.
To troubleshoot the issue, the systems administrator runs netstat and receives the following output:
Based on the information above, which of the following is causing the issue?
Application code is stored in Git. Due to security concerns, the DevOps engineer does not want to keep a sensitive configuration file, app . conf, in the
repository. Which of the following should the engineer do to prevent the file from being uploaded to the repository?
A cloud engineer needs to remove all dangling images and delete all the images that do not have an associated container. Which of the following commands will help to accomplish this task?
An administrator would like to mirror the website files on the primary web server, www1, to the backup web server, www2. Which of the following commands
should the administrator use to most efficiently accomplish this task?
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?
A Linux administrator created a virtual clone of a physical server and would like to remove any existing entries related to SSH keys from outside entities on the virtual clone. Which of the following files should the administrator remove? (Select two).
A database administrator requested the installation of a custom database on one of the servers. Which of the following should the Linux administrator configure so the requested packages can be installed?
A 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).
During a security scan, the password of an SSH key file appeared to be too weak and was cracked. Which of the following commands would allow a user to choose a stronger password and set it on the existing SSH key file?
A Linux administrator has logged in to a server for the first time and needs to know which services are allowed through the firewall. Which of the following options will return the results for which the administrator is looking?
A 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?
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?