Skip to content

XK0-004 CompTIA Linux+ Certification Exams demo

QUESTION 1
Which of the following would be the BEST solution for a systems administrator to access the graphical user
environment of a Linux machine remotely?
A. VNC
B. KDE
C. X11
D. RPC
Correct Answer: A
Section: (none)
Explanation
Explanation/Reference:
Reference: https://www.sfu.ca/computing/about/support/tips/remote-to-linux-with-gui.html
QUESTION 2
A technical support engineer receives a ticket from a user who is trying to create a 1KB file in the /tmp
directory and is getting the following error: No space left on device. The support engineer checks the /
tmp directory, and it has 20GB of free space.
Which of the following BEST describes a possible cause for this error?
A. The /tmp directory is not mounted.
B. The filesystem is formatted with a 4MB block size.
C. the filesystem ran out of inodes.
D. The /tmp directory has been set with an immutable attribute.
Correct Answer: C
Section: (none)
Explanation
Explanation/Reference:
Reference: https://www.maketecheasier.com/fix-linux-no-space-left-on-device-error/
QUESTION 3
Which of the following is the BEST reason for not storing database files in the /var directory?
A. The /var filesystem is not fast enough for database files.
B. The number of files in /var is limited by the available inodes.
C. Files in /var do not have strict file permissions.
D. If log files fill up /var, it might corrupt the database.
Correct Answer: D
Section: (none)
Explanation
Explanation/Reference:
.
.
.
.
QUESTION 6
An administrator receives a warning about a filesystem filling up, and then identifies a large file located at /
tmp/largelogfile. The administrator deletes the file, but no space is recovered on the filesystem.
Which of the following commands would BEST assists the administrator in identifying the problem?
A. lsof | grep largelogfile
B. pkill /tmp/largelogfile
C. pgrep largelogfile
D. ps –ef | grep largelogfile
Correct Answer: A
Section: (none)
Explanation
Explanation/Reference:
Reference: https://access.redhat.com/solutions/2316
QUESTION 7
Which of the following can be used to boot a DVD from a remote device to initialize a Linux system setup on
bare metal hardware as if it is a local DVD?
96CE4376707A97CE80D4B1916F054522
A. UEFI
B. PXE
C. NFS
D. GRUB
Correct Answer: A
Section: (none)
Explanation
Explanation/Reference:
Reference: https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/6/html/installation_guide/
ch-boot-x86
QUESTION 8
After starting a long-running script, a systems administrator needs to verify the frequency of what is filling up the
/var partition and kill it because it is consuming too much space.
Which of the following is the correct sequence given only a terminal is available?
A. 1. CTRL-C
2. bg
3. watch df /var
4. CTRL-C
5. fg
6. CTRL-Z
B. 1. CTRL-C
2. fg
3. watch df /var
4. CTRL-Z
5. bg
6. CTRL-Z
C. 1. CTRL-Z
2. bg
3. watch df /var
4. CTRL-C
5. fg
6. CTRL-C
D. 1. CTRL-Z
2. bg
3. watch df /var
4. CTRL-Z
5. fg
6. CTRL-C
Correct Answer: D
Section: (none)
Explanation
Explanation/Reference:
.
.
.
.
.
.

QUESTION 10
A Linux server has multiple IPs. A Linux administrator needs to verify if the HTTP server port is bound to the
correct IP.
Which of the following commands would BEST accomplish this task?
A. route
B. host
C. nslookup
D. netstat
E. ip
Correct Answer: D
Section: (none)
Explanation
Explanation/Reference:
Reference: https://www.tecmint.com/find-listening-ports-linux/
QUESTION 11
A systems administrator needs to append output of ls –lha /opt command to the contents of a test.txt file.
Which of the following commands will accomplish this?
A. ls –lha /opt > test.txt
B. ls –lha /opt < test.txt
C. ls –lha /opt >> test.txt
D. ls –lha /opt << test.txt
Correct Answer: C
Section: (none)
96CE4376707A97CE80D4B1916F054522
Explanation
Explanation/Reference:
Reference: https://www.cyberciti.biz/faq/linux-append-text-to-end-of-file/
QUESTION 12
A Linux administrator needs to remotely update the contents of the www.comptia.org/contacts URL.
Which of the following commands would allow the administrator to download the current contents of the URL
before updating?
A. curl www.comptia.org/contacts
B. dig www.comptia.org/contacts
C. apt-get www.comptia.org/contacts
D. yum list www.comptia.org/contacts
Correct Answer: A
Section: (none)
Explanation
Explanation/Reference:
Reference: https://www.thegeekstuff.com/2012/04/curl-examples/
QUESTION 13
Which of the following BEST describes containers running on a Linux system?
A. Containers only need the namespaces functionality to run on a Linux system available since kernel 2.6.
B. Containers need a hypervisor to run on a Linux system. Cgroups namespaces are functionalities used for
the kernel but not for running containers.
C. Containers only need the cgroups functionality for running on a Linux system. Namespaces is not a Linux
kernel functionality needed for creating and managing containers.
D. Containers use the cgroups and namespaces functionalities to isolate processes and assign hardware
resources to each of those isolated processes.
Correct Answer: D
Section: (none)
Explanation
Explanation/Reference:
Reference: https://www.linuxjournal.com/content/everything-you-need-know-about-linux-containers-part-iiworking-
linux-containers-lxc
QUESTION 14
A networked has been crashing intermittently. A Linux administrator would like to write a shell script that will
attempt to ping the server and email an alert if the server fails to respond. The script will later be scheduled via
cron job.
Which of the following scripts would BEST accomplish this task?



Buy full version for more questions
Previous article PL-400 Microsoft Power Platform Developer Exams demo
Next article PRINCE2-Foundation exams demo

Leave a comment

* Required fields