LX0-104 Premium Bundle

LX0-104 Premium Bundle

CompTIA Linux+ [Powered by LPI] - Exam 2 Certification Exam

4.5 
(34725 ratings)
0 QuestionsPractice Tests
0 PDFPrint version
January 4, 2025Last update

CompTIA LX0-104 Free Practice Questions

Q1. CORRECT TEXT - (Topic 2) 

What is the default name of the configuration file for the Xorg X11 server? (Specify the file name only without any path.) 

Answer: xorg.conf 

Q2. CORRECT TEXT - (Topic 5) 

Which keyword must be listed in the hosts option of the Name Service Switch configuration file in order to make host lookups consult the /etc/hosts file? 

Answer: files 

Q3. - (Topic 6) 

Which of the following commands connects to the remote host example.com which has OpenSSH listening on TCP port 2222? (Choose TWO correct answers.) 

A. ssh --port 2222 example.com 

B. ssh -p 2222 example.com 

C. ssh -o Port=2222 example.com 

D. ssh -o GatewayPort=2222 example.com 

E. ssh example.com:2222 

Answer: B,C 

Q4. - (Topic 1) 

After issuing: 

function myfunction { echo $1 $2 ; } 

in Bash, which output does: 

myfunction A B C 

Produce? 

A. A B 

B. A B C 

C. A C 

D. B C 

E. C B A 

Answer:

Q5. - (Topic 5) 

Which of the following commands will help identify a broken router between the local and the remote machine? 

A. ps 

B. netstat 

C. nslookup 

D. ifconfig 

E. traceroute 

Answer:

Q6. - (Topic 1) 

What output will the following command sequence produce? 

echo '1 2 3 4 5 6' | while read a b c; do 

echo result: $c $b $a; 

done 

A. result: 3 4 5 6 2 1 

B. result: 1 2 3 4 5 6 

C. result: 6 5 4 

D. result: 6 5 4 3 2 1 

E. result: 3 2 1 

Answer:

Q7. - (Topic 1) 

What is the difference between the commands test -e path and test -f path? 

A. They are equivalent options with the same behaviour. 

B. The -f option tests for a regular file. The -e option tests for an empty file. 

C. Both options check the existence of the path. The -f option also confirms that it is a regular file. 

D. The -f option tests for a regular file. The -e option tests for an executable file. 

Answer:

Q8. - (Topic 6) 

Which configuration file would be edited to change the default options for outbound SSH 

sessions? 

A. /etc/ssh/sshd_config 

B. /etc/ssh/ssh 

C. /etc/ssh/client 

D. /etc/ssh/ssh_config 

E. /etc/ssh/ssh_client 

Answer:

Q9. - (Topic 4) 

Which file inside the CUPS configuration directory contains the definition of the printers? 

A. cups-devices.conf 

B. snmp.conf 

C. printcap.conf 

D. printers.conf 

E. cupsd.conf 

Answer:

Q10. - (Topic 5) 

Which of the following keywords can be used in the file /etc/resolv.conf? (Choose TWO correct answers.) 

A. substitute 

B. nameserver 

C. search 

D. lookup 

E. method 

Answer: B,C 

Q11. - (Topic 3) 

What is NOT contained in the locale setting of the operating system? 

A. currency symbol 

B. language 

C. timezone 

D. thousands separator 

Answer:

Q12. - (Topic 3) 

Each entry in a crontab must end with what character? 

A. Tab 

B. Space 

C. Backslash 

D. Newline 

Answer:

Q13. CORRECT TEXT - (Topic 6) 

The presence of what file will temporarily prevent all users except root from logging into the system? (Specify the full name of the file, including path.) 

Answer: /etc/nologin 

Q14. - (Topic 6) 

Which of the following find commands will print out a list of files owned by root and with the SUID bit set in /usr? 

A. find /usr -uid 0 -perm +4000 

B. find -user root +mode +s /usr 

C. find -type suid -username root -d /usr 

D. find /usr -ls \*s\* -u root 

E. find /usr -suid -perm +4000 

Answer:

Q15. CORRECT TEXT - (Topic 2) 

What is the name of the simple graphical login manager that comes with a vanilla X11 installation? (Specify ONLY the command without any path or parameters.) 

Answer: xdm 

Q16. - (Topic 1) 

When the command echo $ outputs 1, which of the following statements is true? 

A. It is the process ID of the echo command. 

B. It is the process ID of the current shell. 

C. It is the exit value of the command executed immediately before echo. 

D. It is the exit value of the echo command. 

Answer:

Q17. - (Topic 6) 

Which of the following commands preloads and manages keys that are used for automatic authentication while logging in to other machines using SSH? 

A. sshd 

B. ssh-agent 

C. ssh-keygen 

D. ssh-add 

Answer:

START LX0-104 EXAM