CompTIA XK0-006 - CompTIA Linux+ Exam
Page: 2 / 11
Total 54 questions
Question #6 (Topic: Exam A)
An administrator needs to verify the user ID, home directory, and assigned shell for the user named “accounting.” Which of the following commands should the administrator use to retrieve this information?
A. qetent passwd accounting
B. id accounting
C. grep accounting /etc/shadow
D. who accounting
Answer: A
Question #7 (Topic: Exam A)
A Linux user needs to download the latest Debian image from a Docker repository. Which of the following commands makes this task possible?
A. docker image init debian
B. docker image pull Debian
C. docker image import debian
D. docker image save debian
Answer: B
Question #8 (Topic: Exam A)
In the echo "profile-$num-$name" line of a shell script, the variable $num seems to not be expanding during execution. Which of the following notations ensures the value is expanded?
A. echo "profile-$(num)-$name"
B. echo 'profile-$num-$name'
C. echo "profile-‘Snum‘-$name"
D. echo "profile-${num}-$name"
Answer: D
Question #9 (Topic: Exam A)
A systems administrator wants to review the logs from an Apache 2 error.log file in real time and save the information to another file for later review. Which of the following commands should the administrator use?
A. tail -f /var/log/apache2/error.log > logfile.txt
B. tail -f /var/log/apache2/error.log | logfile.txt
C. tail -f /var/log/apache2/error.log >> logfile.txt
D. tail -f /var/log/apache2/error.log | tee logfile.txt
Answer: D
Question #10 (Topic: Exam A)
Which of the following describes the method of consolidating system events to a single location?
A. Log aggregation
B. Health checks
C. Webhooks
D. Threshold monitoring
Answer: A