CompTIA XK0-005 Practice Test - Questions Answers, Page 33
List of questions
Related questions
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?
To automate the process of building, testing, and deploying application components
To perform security penetration tests on deployed applications to identify vulnerabilities
To formalize the approval process of application releases and configuration changes
To leverage code to document the infrastructure, configurations, and dependencies
A systems administrator is customizing a new Linux server. Which of the following settings for umask would ensure that new files have the default permissions of -rw-r--r--?
0017
0027
0038
0640
An administrator accidentally installed the httpd RPM package along with several dependencies. Which of the following options is the best way for the administrator to revert the package installation?
dnf clean all
rpm -e httpd
apt-get clean
yum history undo last
A Linux administrator is configuring a log collector agent to monitor logs in /var/log/collector. The agent is reporting that it cannot write to the directory. The agent runs as the logger user account. The administrator runs a few commands and reviews the following output:
makefile
Output 1:
drwxr-xr-x. 1 root root 0 Oct 20:13 collector
Output 2:
file: /var/log/collector
owner: root
group: root
user::rwx
group::r-x
mask::rwx
other::r-x
Output 3:
uid=1010(logger) gid=1010(monitor) groups=1010(monitor)
Which of the following is the best way to resolve the issue?
setfacl -Rm u:logger /var/log/collector
usermod -aG root logger
chmod 644 /var/log/collector
chown -R logger /var/log
An administrator is running a web server in a container named WEB, but none of the error output is showing. Which of the following should the administrator use to generate the errors on the container?
docker-compose inspect WEB
docker logs WEB
docker run --name WEB --volume /dev/stdout:/var/log/nginx/error.log
docker ps WEB -f
A Linux systems administrator is working to obtain the installed kernel version of several hundred systems. Which of the following utilities should the administrator use for this task?
Ansible
Git
Docker
Bash
A systems administrator identifies multiple processes in a zombie state. Which of the following signals would be best for the administrator to send to the PPID?
SIGTERM
SIGHUP
SIGQUIT
SIGSTOP
A Linux administrator needs to check extended permissions applied to the directory test. Which of the following commands should the administrator use to help with this task?
getsebool test/
getenforce test/
getfacl test/
ls -al test/
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?
git branch -m staging
git commit -m staging
git status -b staging
git checkout -b staging
An operations engineer is planning to start a container running a PostgreSQL database. The engineer wants the container to start automatically at system startup, mount the /home/db directory as /var/lib/postgresql inside the container, and expose port 5432 to the OS. Which of the following commands should the engineer run to achieve this task?
docker run -d --restart always -p 5432:5432 -v /home/db:/var/lib/postgresql postgresql:12
docker run -d --restart -p 5432:5432 --volume /var/lib/postgresql:/home/db postgresql:12
docker run -d --attach --platform 5432:5432 --volume /home/db:/var/lib/postgresql postgresql:12
docker run -d --init --restart --publish 5432:5432 --workdir /home/db:/var/lib/postgresql postgresql:12
Question