2
CompTIA Linux+ XK0-004 Exam Prep
questions with answers
While using the BASH, which of the following commands
will switch the default display in such a way that new
applications will appear on the remote machine
192.168.1.50?
A. display 192.168.1.50
B. export DISPLAY=192.168.1.50
C. export TARGET=192.168.1.50
D. switch 192.168.1.50 - ANSWERS ✔✔B. export
DISPLAY=192.168.1.50
Which of the following commands will display a user's
current environment variables? (Select TWO)
A. env
B. info env
C. displayenv
D. man env
E. printenv - ANSWERS ✔✔A. env & E. printenv
Page 1 of 31
,2
Which of the following is the default location of the Xorg
configuration file?
A. /etc/X11/xorg.conf
B. /etc/X11/X.conf
C. /etc/X/xorg.conf
D. /etc/Xorg/X.conf - ANSWERS ✔✔A. /etc/X11/xorg.conf
Which of the following commands will explicitly start a full
X windows system session?
A. startx
B. xinit
C. X
D. startX - ANSWERS ✔✔A. startx
After installing and enabling the latest accelerated video
card driver, the system fails to start the X Window
System on a reboot. Which of the following drivers is
MOST likely to allow the system to start the GUI?
A. vesa
B. vega
C. xorg
D. krfb - ANSWERS ✔✔A. vesa
Page 2 of 31
,2
Which of the following commands will cause gedit to use
workstation1 for I/O?
A. DISPLAY=workstation1 gedit
B. CONNECT=workstation1 gedit
C. GRAPHICS=workstation1 gedit
D. CONSOLE=workstation1 gedit - ANSWERS ✔✔A.
DISPLAY=workstation1 gedit
Which of the following commands will show status
information of the print queues?
A. lpstatus
B. showprint
C. lpqueue
D. lpstat - ANSWERS ✔✔lpstat
Where is the default location of sendmail binary?
A. /usr/lib/sendmail
B. /etc/mail/sendmail
C. /var/spool/sendmail
D. /sbin/sendmail - ANSWERS ✔✔A. /usr/lib/sendmail
Which of the following files holds information on the
system's time zone?
Page 3 of 31
, 2
A. /etc/timezone
B. /etc/localtime
C. /etc/time
D. /etc/localzone - ANSWERS ✔✔B. /etc/localtime
Which of the following commands will show active
network connections?
A. ipstat
B. ifstat
C. netstat
D. networkstat - ANSWERS ✔✔C. netstat
A user has inserted a USB drive but it has not been
automatically mounted. Which of the following commands
will show the device name of the USB drive?
A. mount -t usb
B. fdisk -l
C. usb_scan
D. partprobe - ANSWERS ✔✔B. fdisk -l
Which of the following will burn an ISO image to a
writable SCSI CD-ROM drive located on SCSI address
0,1,0?
Page 4 of 31
CompTIA Linux+ XK0-004 Exam Prep
questions with answers
While using the BASH, which of the following commands
will switch the default display in such a way that new
applications will appear on the remote machine
192.168.1.50?
A. display 192.168.1.50
B. export DISPLAY=192.168.1.50
C. export TARGET=192.168.1.50
D. switch 192.168.1.50 - ANSWERS ✔✔B. export
DISPLAY=192.168.1.50
Which of the following commands will display a user's
current environment variables? (Select TWO)
A. env
B. info env
C. displayenv
D. man env
E. printenv - ANSWERS ✔✔A. env & E. printenv
Page 1 of 31
,2
Which of the following is the default location of the Xorg
configuration file?
A. /etc/X11/xorg.conf
B. /etc/X11/X.conf
C. /etc/X/xorg.conf
D. /etc/Xorg/X.conf - ANSWERS ✔✔A. /etc/X11/xorg.conf
Which of the following commands will explicitly start a full
X windows system session?
A. startx
B. xinit
C. X
D. startX - ANSWERS ✔✔A. startx
After installing and enabling the latest accelerated video
card driver, the system fails to start the X Window
System on a reboot. Which of the following drivers is
MOST likely to allow the system to start the GUI?
A. vesa
B. vega
C. xorg
D. krfb - ANSWERS ✔✔A. vesa
Page 2 of 31
,2
Which of the following commands will cause gedit to use
workstation1 for I/O?
A. DISPLAY=workstation1 gedit
B. CONNECT=workstation1 gedit
C. GRAPHICS=workstation1 gedit
D. CONSOLE=workstation1 gedit - ANSWERS ✔✔A.
DISPLAY=workstation1 gedit
Which of the following commands will show status
information of the print queues?
A. lpstatus
B. showprint
C. lpqueue
D. lpstat - ANSWERS ✔✔lpstat
Where is the default location of sendmail binary?
A. /usr/lib/sendmail
B. /etc/mail/sendmail
C. /var/spool/sendmail
D. /sbin/sendmail - ANSWERS ✔✔A. /usr/lib/sendmail
Which of the following files holds information on the
system's time zone?
Page 3 of 31
, 2
A. /etc/timezone
B. /etc/localtime
C. /etc/time
D. /etc/localzone - ANSWERS ✔✔B. /etc/localtime
Which of the following commands will show active
network connections?
A. ipstat
B. ifstat
C. netstat
D. networkstat - ANSWERS ✔✔C. netstat
A user has inserted a USB drive but it has not been
automatically mounted. Which of the following commands
will show the device name of the USB drive?
A. mount -t usb
B. fdisk -l
C. usb_scan
D. partprobe - ANSWERS ✔✔B. fdisk -l
Which of the following will burn an ISO image to a
writable SCSI CD-ROM drive located on SCSI address
0,1,0?
Page 4 of 31