251-257 Flashcards

1
Q

cat /etc/resolv.conf

A Linux administrator is troubleshooting an issue in which users are not able to access https://portal.comptia.org from a specific workstation. The administrator runs a few commands and receives the following output:

cat /etc/hosts
10.10.10.55 portal.comptia.org

host portal.comptia.org
portal.comptia.org has address 192.168.1.55

nameserver 10.10.10.5

Which of the following tasks should the administrator perform to resolve this issue?

A. Update the name server in resolv.conf to use an external DNS server.
B. Remove the entry for portal.comptia.org from the local hosts file.
C. Add a network route from the 10.10.10.0/24 to the 192.168.0.0/16.
D. Clear the local DNS cache on the workstation and rerun the host command.

A

B. Remove the entry for portal.comptia.org from the local hosts file.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

systemctl status mariadb

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:

mariadb.service
Loaded: masked (Reason: Unit mariadb.service is masked)
Active: inactive (dead)

Failed to enable unit: …

Failed to start mariadb.service …

Which of the following should the administrator run to resolve this issue? (Choose two.)

A. systemctl unmask mariadb
B. journalctl -g mariadb
C. dnf reinstall mariadb
D. systemctl start mariadb
E. chkconfig mariadb on
F. service mariadb reload

A

A. systemctl unmask mariadb

D. systemctl start mariadb

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

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?

A. docker ps -a
B. docker list
C. docker image ls
D. docker inspect image

A

A. docker ps -a

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Which of the following should be used to verify the integrity of a file?

A. sha256sum
B. fsck
C. gpg -d
D. hashcat

A

A. sha256sum

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

An administrator created an initial Git repository and uploaded the first files. The administrator sees the following when listing the repository:

initi.py Initial Commit Just now
main.py Initial Commit Just now
.DS_STORE Initial Commit Just now
setup.sh Initial Commit Just now
README.md Initial Commit Just now

The administrator notices the file .DS.STORE should not be included and deletes it from the online repository. Which of the following should the administrator run from the root of the local repository before the next commit to ensure the file is not uploaded again in future commits?

A. rm -f .DS STORE && git push
B. git fetch && git checkout .DS_STORE
C. rm -f .DS_STORE && git rebase origin main
D. echo .DS_STORE&raquo_space; .gitignore

A

D. echo .DS_STORE&raquo_space; .gitignore

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

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?

A. /etc/ethers
B. /etc/services
C. /etc/resolv.conf
D. /etc/sysctl.conf

A

C. /etc/resolv.conf

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

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. docker tag comptia/app:2.1.1 comptia/app:2.1.2
B. docker push comptia/app:2.1.1 comptia/app:2.1.2
C. docker rmi comptia/app:2.1.1 comptia/app:2.1.2
D. docker update comptia/app:2.1.1 comptia/app:2.1.2

A

A. docker tag comptia/app:2.1.1 comptia/app:2.1.2

How well did you know this?
1
Not at all
2
3
4
5
Perfectly