LX0-104 Premium Bundle

LX0-104 Premium Bundle

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

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

CompTIA LX0-104 Free Practice Questions

Q1. CORRECT TEXT - (Topic 3) 

Which file specifies the user accounts that can NOT submit jobs via at or batch? (Provide the full path and filename) 

Answer: /etc/at.deny 

Q2. CORRECT TEXT - (Topic 4) 

After adding a new email alias to the configuration, which command must be run in order to ensure the MTA knows about it? (Specify the command without any path but including all required parameters.) 

Answer: newaliases, sendmail -bi 

Q3. - (Topic 3) 

Which character in the password field of /etc/passwd is used to indicate that the encrypted password is stored in /etc/shadow? 

A. * 

B. -

C. s 

D. x 

Answer:

Q4. - (Topic 1) 

Which command makes the shell variable named VARIABLE visible to subshells? 

A. export $VARIABLE 

B. export VARIABLE 

C. set $VARIABLE 

D. set VARIABLE 

E. env VARIABLE 

Answer:

Q5. - (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 

Q6. CORRECT TEXT - (Topic 5) 

Which port is the default server port for the HTTPS protocol? (Specify the port number using digits.) 

Answer: 443 

Q7. CORRECT TEXT - (Topic 5) 

What is the lowest numbered unprivileged TCP port? (Specify the number in digits only.) 

Answer: 1024 

Q8. - (Topic 3) 

Which of the following steps prevents a user from obtaining an interactive login session? 

A. Run the command chsh -s /bin/false with the user name. 

B. Set the UID for the user to 0. 

C. Remove the user from the group staff. 

D. Add the user to /etc/noaccess. 

E. Create a .nologin file in the user's home directory. 

Answer:

Q9. - (Topic 5) 

Which of the following commands can be used to display the local routing table? (Choose TWO correct answers.) 

A. ifconfig 

B. dig 

C. netstat 

D. route 

E. trackroute 

Answer: C,D 

Q10. - (Topic 4) 

Which of the following tasks can be accomplished using the command date? (Choose TWO correct answers.) 

A. Synchronize the hardware and system clocks. 

B. Output date and time in different formats. 

C. Set the system clock. 

D. Set the hardware clock. 

E. Update the time via NTP. 

Answer: B,C 

Q11. - (Topic 4) 

What is true regarding the file ~/.forward? 

A. As it is owned by the MTA and not writable by the user, it must be edited using the editaliases command. 

B. After editing ~/.forward the user must run newaliases to make the mail server aware of the changes. 

C. Using ~/.forward, root may configure any email address whereas all other users may configure only their own addresses. 

D. When configured correctly, ~/.forward can be used to forward each incoming mail to more than one other recipient. 

Answer:

Q12. - (Topic 3) 

Which of the following files assigns a user to its primary group? 

A. /etc/pgroup 

B. /etc/shadow 

C. /etc/group 

D. /etc/passwd 

E. /etc/gshadow 

Answer:

Q13. - (Topic 4) 

What entry can be added to the syslog.conf file to have all syslog messages generated by a system displayed on console 12? 

A. *.* /dev/tty12 

B. /var/log/messages | /dev/tty12 

C. | /dev/tty12 

D. syslog tty12 

E. mail.* /dev/tty12 

Answer:

Q14. CORRECT TEXT - (Topic 4) 

Which command is used to sync the hardware clock to the system clock? (Specify ONLY the command without any path or parameters.) 

Answer: hwclock, /sbin/hwclock, /usr/sbin/hwclock 

Q15. CORRECT TEXT - (Topic 5) 

Which command, depending on its options, can display the open network connections, the routing tables, as well as network interface statistics. (Specify ONLY the command without any path or parameters.) 

Answer: netstat, /bin/netstat, ss, /usr/bin/ss 

Q16. - (Topic 3) 

What is true about the file /etc/localtime? 

A. It is a plain text file containing a string such as Europe/Berlin. 

B. It is created and maintained by the NTP service based on the geolocation of the system's IP address. 

C. It is a symlink to /sys/device/clock/ltime and always contains the current local time. 

D. It is either a symlink to or a copy of a timezone information file such as /usr/share/zoneinfo/Europe/Berlin. 

Answer:

Q17. - (Topic 3) 

Which file contains the date of the last change of a user's password? 

A. /etc/gshadow 

B. /etc/passwd 

C. /etc/pwdlog 

D. /etc/shadow 

E. /var/log/shadow 

Answer:

START LX0-104 EXAM