Lpi LPIC-1 Exam 102, Part 2 of 2, version 5.0 - 102-500 Exam Practice Test

Which command, available with all MTAs, is used to list the contents of the MTA's mail queue? (Specify ONLY the command without any path or parameters.)
Correct Answer:
mailqusrbinmailqsendmailbpusrsbinsendmailbpusrlibsendmailbp
Explanation:
The command that is used to list the contents of the MTA's mail queue is mailq12. This command is available with all MTAs, such as sendmail, postfix, exim, etc12. The mailq command prints the mail queue, which is the list of messages that are waiting to be sent12. The output of the mailq command shows the queue ID, size, time, sender, and recipient of each message12. The mailq command can also take various options to modify the output, such as -v for verbose mode, -Ac for mail submission queue, -qL for lost items, and -qQ for quarantined items3.
What is Irue regarding the statement beginning with #. that is found in the first line of a script? (Choose TWO correct answers.)
Correct Answer: A,C Vote an answer
Which environment variable should be set in order to change the time zone for the commands run from within the environment variable's scope? (Specify the variable name only.)
Correct Answer:
TZ
Explanation:
The TZ environment variable is used to change the time zone for the commands run from within the environment variable's scope. It specifies the name of a time zone as defined in the /usr/share/zoneinfo directory or a custom time zone in the POSIX format12. The TZ variable can be set either globally in a shell profile file or locally in a shell session. For example, to set the time zone to America/New_York for the current shell session, one can use the following command:
export TZ=America/New_York
To verify the change, one can use the date command to display the current date and time according to the TZ variable. The TZ variable can also be used to run a single command with a different time zone without affecting the system's time zone. For example, to run the date command with the Asia/Tokyo time zone, one can use the following syntax:
TZ=Asia/Tokyo date
The TZ variable is useful for testing how applications behave in different time zones or for displaying the time in different locations34. Reference:
How to Set or Change the Time Zone in Linux | Linuxize
Linux / UNIX: TZ Environment Variable - nixCraft
Get Current System Time Zone in Linux | Baeldung on Linux
Setting the TZ Environment Variable on Linux | InterSystems Developer
Which of the following keywords can be used in the file /etc/nsswitch.conf to specify a source for host name lookups? (Choose TWO correct answers.)
Correct Answer: A,C Vote an answer
Explanation: Only visible for PassTestking members. You can sign-up / login (it's free).
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.)
Correct Answer:
etstatbinnetstatssusrbinss
Explanation:
The netstat command, meaning network statistics, is a command-line utility in the Linux system to display network configuration and activity, including network connections, routing tables, interface statistics, masquerade connections, and multicast memberships1. The netstat command can display different types of network data depending on the command line option selected. Some of the common options are:
-a: This option displays active TCP connections, TCP connections with the listening state, as well as UDP ports that are being listened to.
-r: This option displays the routing table information, which is a list of rules that determine where the packets are sent.
-i: This option displays the network interface information, such as the name, MTU, RX-OK, TX-OK, etc.
-s: This option displays the network statistics by protocol, such as TCP, UDP, ICMP, IP, etc.
For example, to display the open network connections, one can run:
netstat -a
To display the routing table, one can run:
netstat -r
To display the network interface statistics, one can run:
netstat -i
To display the network statistics by protocol, one can run:
netstat -s
For more details and examples, please refer to the web search results1 or the question answering results2. Reference:
https://netref.soe.ucsc.edu/node/7
https://bing.com/search?q=command+to+display+network+connections%2c+routing+tables%2c+and+interface+statistics
Which port is the default server port for the HTTPS protocol? (Specify the port number using digits.)
Correct Answer:
443
Explanation:
The port number 443 is the default server port for the HTTPS protocol, which is a secure version of HTTP that uses SSL/TLS certificates to encrypt the data transmission between web servers and browsers. The port number 443 is recognized by the Internet Engineering Task Force (IETF) as the standard port for HTTPS connections1. The port number 443 is part of the topic 109.1: Fundamentals of internet protocols, which is one of the objectives of the LPI Linux Administrator - 102 exam23. Reference: 1: HTTPS Port: What It Is, How to Use It, and More (2023) - Hostinger 2: LPI Linux Administrator - 102 (LPIC-1) 3: Exam 102 Objectives
Which of the following commands connects to the remote host example.com which has OpenSSH listening on TCP port 2222? (Choose TWO correct answers.)
Correct Answer: B,E Vote an answer
Explanation: Only visible for PassTestking members. You can sign-up / login (it's free).
Which of the following statements about sytemd-journald are true? (Choose three.)
Correct Answer: B,D,E Vote an answer
Explanation: Only visible for PassTestking members. You can sign-up / login (it's free).
On a machine running serval X servers. how do programs identify the different instances of theX11 server?
Correct Answer: B Vote an answer
Explanation: Only visible for PassTestking members. You can sign-up / login (it's free).
Which of the following is a valid IPv6 address?
Correct Answer: A Vote an answer
Explanation: Only visible for PassTestking members. You can sign-up / login (it's free).
Which directory holds configuration files for xinetd services? (Specify the full path to the directory
Correct Answer:
tcxinetdd
Which of the following commands configure network interfaces based on the system's existing distribution-specific configuration files? (Choose two.)
Correct Answer: C,D Vote an answer
Explanation: Only visible for PassTestking members. You can sign-up / login (it's free).
Which of the following comparison operators for test work on elements in the file system? (Choose two.)
Correct Answer: B,D Vote an answer
Explanation: Only visible for PassTestking members. You can sign-up / login (it's free).
Which of the following lines is an example of a correct setting for the DISPLAY environment variable?
Correct Answer: D Vote an answer
Explanation: Only visible for PassTestking members. You can sign-up / login (it's free).
What is true regarding a default route?
Correct Answer: B Vote an answer
Explanation: Only visible for PassTestking members. You can sign-up / login (it's free).