Winter Sale - Limited Time 65% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: top65certs

Free XK0-006 CompTIA Updates

Page: 6 / 7
Total 87 questions

CompTIA Linux+ V8 Exam Questions and Answers

Question 21

An administrator wants to search a file named myFile and look for all occurrences of strings containing at least five characters, where characters two and five are i, but character three is not b. Which of the following commands should the administrator execute to get the intended result?

Options:

A.

grep .a*^b-.a myFile

B.

grep .a., [a] myFile

C.

grepa^b*a myFile

D.

grep .i[^b].i myFile

Question 22

A Linux administrator attempts to log in to a server over SSH as root and receives the following error message: Permission denied, please try again. The administrator is able to log in to the console of the server directly with root and confirms the password is correct. The administrator reviews the configuration of the SSH service and gets the following output:

Based on the above output, which of the following will most likely allow the administrator to log in over SSH to the server?

Options:

A.

Log out other user sessions because only one is allowed at a time.

B.

Enable PAM and configure the SSH module.

C.

Modify the SSH port to use 2222.

D.

Use a key to log in as root over SSH.

Question 23

A systems administrator wants to review the amount of time the NetworkManager service took to start. Which of the following commands accomplishes this goal?

Options:

A.

resolvectl

B.

journalctl

C.

systemctl daemon-reload

D.

systemd-analyze blame

Question 24

A Linux administrator needs to securely erase the contents of a hard disk. Which of the following commands is the best for this task?

Options:

A.

sudo rm -rf /dev/sda1

B.

sudo shred /dev/sda1

C.

sudo parted rm /dev/sda1

D.

sudo dd if=/dev/null of=/dev/sda1

Page: 6 / 7
Total 87 questions