XK0-006 Practice Test practice questions, page 2 of 7, with answer review and explanations.
Question 6
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?
qetent passwd accounting
id accounting
grep accounting /etc/shadow
who accounting
Question 7
A Linux user needs to download the latest Debian image from a Docker repository. Which of the following commands makes this task possible?
docker image init debian
docker image pull Debian
docker image import debian
docker image save debian
Question 8
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?
echo "profile-$(num)-$name"
echo 'profile-$num-$name'
echo "profile-‘Snum‘-$name"
echo "profile-${num}-$name"
Question 9
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?
tail -f /var/log/apache2/error.log > logfile.txt
tail -f /var/log/apache2/error.log | logfile.txt
tail -f /var/log/apache2/error.log >> logfile.txt
tail -f /var/log/apache2/error.log | tee logfile.txt
Question 10
Which of the following describes the method of consolidating system events to a single location?