10 free sample questions from a bank of 401, with the correct answers and explanations. No signup required — start practising right now.
1A Linux administrator needs to create and then connect to the app-01-image container. Which of the following commands accomplishes this task?
docker run -it app-01-image
docker start -td app-01-image
docker build -ic app-01-image
docker exec -dc app-01-image
Answer: A
2To perform a live migration, which of the following must match on both host servers? (Choose two).
USB ports
Network speed
Available swap
CPU architecture
Available memory
Disk storage path
Answer: D, F
3A Linux systems administrator needs to extract the contents of a file named /home/dev/web.bkp to the /var/www/html/ directory. Which of the following commands should the administrator use?
cd /var/www/html/ && gzip -c /home/dev/web.bkp | tar xf -
4Which of the following Ansible components contains a list of hosts and host groups?
Fact
Inventory
Playbook
Collection
Answer: B
5Which of the following filesystems contains non-persistent or volatile data?
/boot
/usr
/proc
/var
Answer: C
6An 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
Answer: A
7A 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
Answer: B
8In 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"
Answer: D
9A 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
Answer: D
10Which of the following describes the method of consolidating system events to a single location?