Pass the CompTIA Linux+ XK0-005 Questions and answers with CertsForce

Viewing page 9 out of 15 pages
Viewing questions 81-90 out of questions
Questions # 81:

A systems administrator needs to create a new service unit file. This new unit file is required to start when all services are running with the command-line interface only. Which of the following options should the administrator use to accomplish this task?

Options:

A.

WantedBy=basic.target


B.

WantedBy=network-online.target


C.

WantedBy=multi-user.target


D.

WantedBy=graphical.target


Expert Solution
Questions # 82:

A Linux administrator wants to display a list of all containers, including ones that are stopped. Which of the following commands should the administrator run?

Options:

A.

docker ps -a


B.

docker image list


C.

docker stats


D.

docker list -a


Expert Solution
Questions # 83:

A systems administrator receives reports of issues in one of the Linux systems. The following output has been provided:

$ dig node.mycomptia.org

; <<>> DiG 9.11.36.x.x <<>> node.mycomptia.org

;; global options: +cmd

;; connection timed out; no servers could be reached

$ cat /etc/resolv.conf

search mycomptia.org

Which of the following actions will best resolve this issue? (Select two.)

Options:

A.

echo "8.8.8.8 node.mycomptia.org" >> /etc/hosts


B.

echo "nameserver 8.8.8.8" >> /run/systemd/resolve/resolv.conf


C.

systemctl restart networkd


D.

echo "nameserver 8.8.8.8" >> /etc/resolv.conf


E.

echo "DNS1=8.8.8.8" >> /etc/sysconfig/network-scripts/ifcfg-eth0


F.

systemctl restart NetworkManager


G.

systemctl restart named


Expert Solution
Questions # 84:

A Linux administrator is tasked with moving files in a database server. The administrator must not overwrite any existing files. Which of the following commands would indicate that the file already exists?

Options:

A.

mv-ifilename/tmp/backup


B.

mv-bfilename/tmp/backup


C.

mv-nfilename/tmp/backup


D.

mv-ffilename/tmp/backup


Expert Solution
Questions # 85:

A user is unable to log on to a Linux workstation. The systems administrator executes the following command:

cat /etc/shadow | grep user1

The command results in the following output:

user1 :! $6$QERgAsdvojadv4asdvaarC/9dj34GdafGVaregmkdsfa:18875:0:99999:7 :::

Which of the following should the systems administrator execute to fix the issue?

Options:

A.

chown -R userl:user1 /home/user1


B.

sed -i '/ ::: / :: /g' /etc/shadow


C.

chgrp user1:user1 /home/user1


D.

passwd -u user1


Expert Solution
Questions # 86:

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

Options:

A.

sysctl


B.

ss


C.

mkinitrd


D.

lsof


Expert Solution
Questions # 87:

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?

Options:

A.

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


B.

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


C.

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


D.

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


Expert Solution
Questions # 88:

A Linux administrator needs to rebuild a container with the httpd service in order to change some default parameters. Which of the following should be the first command line in the Dockerfile?

Options:

A.

FROM httpd


B.

BASE httpd


C.

USE httpd


D.

INHERIT httpd


Expert Solution
Questions # 89:

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?

Options:

A.

docker-compose inspect WEB


B.

dockerlogs WEB


C.

dockerrun —nameWEB —volume/dev/stdout:/var/log/nginx/error.log


D.

dockerps WEB -f


Expert Solution
Questions # 90:

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?

Options:

A.

docker-compose inspect WEB


B.

docker logs WEB


C.

docker run --name WEB --volume /dev/stdout:/var/log/nginx/error.log


D.

docker ps WEB -f


Expert Solution
Viewing page 9 out of 15 pages
Viewing questions 81-90 out of questions