Weekend Sale 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: save70

XK0-005 Reviews Questions

Page: 2 / 35
Total 470 questions

CompTIA Linux+ Exam Questions and Answers

Question 5

An administrator added the port 2222 for the SSH server on myhost and restarted the SSH server. The administrator noticed issues during the startup of the service. Given the following outputs:

Which of the following commands will fix the issue?

Options:

A.

semanage port -a -t ssh_port_t -p tcp 2222

B.

chcon system_u:object_r:ssh_home_t /etc/ssh/*

C.

iptables -A INPUT -p tcp -- dport 2222 -j ACCEPT

D.

firewall-cmd -- zone=public -- add-port=2222/tcp

Question 6

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?

Options:

A.

docker run -d --restart always -p 5432:5432 -v /home/db:/var/lib/postgresql postgresql:12

B.

docker run -d --restart -p 5432:5432 --volume /var/lib/postgresql:/home/db postgresql:12

C.

docker run -d --attach --platform 5432:5432 --volume /home/db:/var/lib/postgresql postgresql:12

D.

docker run -d --init --restart --publish 5432:5432 --workdir /home/db:/var/lib/postgresql postgresql:12

Question 7

An administrator is unable to sync servers to the new NTP server IP address given by the service provider despite several attempts. Looking at the below output

Which of the following commands will help resolve the issue?

Options:

A.

A close up of a text AI-generated content may be incorrect.

B.

C.

D.

Question 8

An application requires a configuration file be placed in each user's home directory when an account is created. In which of the following locations should the administrator place the configuration file?

Options:

A.

/etc/ske1

B.

/etc/sysconfig

C.

/etc/ssh

D.

/etc/rc.local

Page: 2 / 35
Total 470 questions