- Home
- Lpi Certification
- 102-500 Exam
- Lpi.102-500.v2026-05-15.q167 Practice Test
Question 91
Which of the following commands can identify the PID od a process which opened a TCP port?
Correct Answer: D
The lsof command, meaning list open files, is a command-line utility in the Linux system to display information about files that are opened by processes1. The lsof command can take various options and arguments to filter and format the output. One of the options that can be used to identify the PID of a process which opened a TCP port is the -i option, which selects the listing of files whose Internet address matches the specified address. The address can be specified as a port number, a host name, or a combination of both. For example, to list the processes that are listening on TCP port 80, one can run:
lsof -i TCP:80
The output shows the command name, the PID, the user name, the file descriptor, the type, the device, the size/off, the node, and the name for each process. The name column shows the local and remote addresses and port numbers for the TCP connection. For example, the output may look like:
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME httpd 1234 root 4u IPv4 12345 0t0 TCP *:80 (LISTEN) httpd 2345 www-data 4u IPv4 12345 0t0 TCP *:80 (LISTEN) httpd 3456 www-data 4u IPv4 23456 0t0 TCP 192.168.1.10:80->192.168.1.20:1234 (ESTABLISHED) This shows that the httpd command, which is the Apache web server, is listening on TCP port 80 with the PID
1234 and 2345, and has an established connection with the remote address 192.168.1.20 and port 1234 with the PID 3456. To kill the process by PID, one can use the kill command with the -SIGTERM option, which sends a termination signal to the process. For example, to kill the process with the PID 3456, one can run:
kill -SIGTERM 3456
The other options are not correct because:
* ptrace: This is not a command, but a system call that allows a process to trace and control the execution of another process. It is used by debuggers and other tools that need to monitor and manipulate the behavior of other processes2. It does not display the PID of a process which opened a TCP port.
* strace: This is a command that traces the system calls and signals of a process. It can be used to diagnose, debug, and monitor the interaction between a process and the kernel3. It does not display the PID of a process which opened a TCP port.
* debug: This is not a command, but a general term that refers to the process of finding and fixing errors
* in a program or system. There are various tools and methods that can be used for debugging, such as debuggers, loggers, profilers, etc4. It does not display the PID of a process which opened a TCP port.
* nessus: This is a command that runs the Nessus vulnerability scanner, which is a tool that scans a network or a system for security flaws and potential attacks5. It does not display the PID of a process which opened a TCP port. References:
https://www.howtogeek.com/28609/how-can-i-tell-what-is-listening-on-a-tcpip-port-in-windows/
https://bing.com/search?q=identify+PID+of+process+that+opened+a+TCP+port
lsof -i TCP:80
The output shows the command name, the PID, the user name, the file descriptor, the type, the device, the size/off, the node, and the name for each process. The name column shows the local and remote addresses and port numbers for the TCP connection. For example, the output may look like:
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME httpd 1234 root 4u IPv4 12345 0t0 TCP *:80 (LISTEN) httpd 2345 www-data 4u IPv4 12345 0t0 TCP *:80 (LISTEN) httpd 3456 www-data 4u IPv4 23456 0t0 TCP 192.168.1.10:80->192.168.1.20:1234 (ESTABLISHED) This shows that the httpd command, which is the Apache web server, is listening on TCP port 80 with the PID
1234 and 2345, and has an established connection with the remote address 192.168.1.20 and port 1234 with the PID 3456. To kill the process by PID, one can use the kill command with the -SIGTERM option, which sends a termination signal to the process. For example, to kill the process with the PID 3456, one can run:
kill -SIGTERM 3456
The other options are not correct because:
* ptrace: This is not a command, but a system call that allows a process to trace and control the execution of another process. It is used by debuggers and other tools that need to monitor and manipulate the behavior of other processes2. It does not display the PID of a process which opened a TCP port.
* strace: This is a command that traces the system calls and signals of a process. It can be used to diagnose, debug, and monitor the interaction between a process and the kernel3. It does not display the PID of a process which opened a TCP port.
* debug: This is not a command, but a general term that refers to the process of finding and fixing errors
* in a program or system. There are various tools and methods that can be used for debugging, such as debuggers, loggers, profilers, etc4. It does not display the PID of a process which opened a TCP port.
* nessus: This is a command that runs the Nessus vulnerability scanner, which is a tool that scans a network or a system for security flaws and potential attacks5. It does not display the PID of a process which opened a TCP port. References:
https://www.howtogeek.com/28609/how-can-i-tell-what-is-listening-on-a-tcpip-port-in-windows/
https://bing.com/search?q=identify+PID+of+process+that+opened+a+TCP+port
Question 92
The correct crontab entry to execute the script chklog three times per month between 3 p.m. and 5 p.m.:
Correct Answer: C
The correct crontab entry to execute the script chklog three times per month between 3 p.m. and 5 p.m. is:
3 15,16,17 * * * chklog
The crontab entry has five fields that specify the time and frequency of the job, followed by the command or script to be executed. The fields are:
Minute: the minute of the hour when the job should run, from 0 to 59
Hour: the hour of the day when the job should run, from 0 to 23 (in 24-hour format) Day of month: the day of the month when the job should run, from 1 to 31 Month: the month of the year when the job should run, from 1 to 12 Day of week: the day of the week when the job should run, from 0 to 6 (where 0 and 7 are Sunday) The asterisk (*) means any value, and the comma (,) means a list of values. Therefore, the crontab entry above means:
Run the job at the 3rd minute of the hour
Run the job at the 15th, 16th, and 17th hour of the day (which are 3 p.m., 4 p.m., and 5 p.m.) Run the job on any day of the month Run the job on any month of the year Run the job on any day of the week This will execute the script chklog three times per day, every day of the month, and every month of the year, which is equivalent to three times per month.
The other options are incorrect because:
A . This will run the job at any minute of the hour, but only at the 3rd, 4th, and 5th hour of the day (which are 3 a.m., 4 a.m., and 5 a.m.), and only on the 1st day of the month.
B . This will run the job at the 3rd minute of the hour, but only at the 3rd, 4th, and 5th hour of the day (which are 3 a.m., 4 a.m., and 5 a.m.), and only on the 1st day of the month.
D . This will run the job at the 0th minute of the hour (which is the top of the hour), but only at the 15th, 16th, and 17th hour of the day (which are 3 p.m., 4 p.m., and 5 p.m.), and only on the 1st day of the month.
E . This will run the job at any minute of the hour, but only at the 15th, 16th, and 17th hour of the day (which are 3 p.m., 4 p.m., and 5 p.m.), and only on the 1st day of the month.
Reference:
Crontab Explained in Linux [With Examples]
'crontab' in Linux with Examples - GeeksforGeeks
Linux Crontab Command Help and Examples - Computer Hope
Crontab in Linux with 20 Useful Examples to Schedule Jobs - TecAdmin
Linux crontab tutorial with Examples - Linux Tutorials - Learn Linux ...
3 15,16,17 * * * chklog
The crontab entry has five fields that specify the time and frequency of the job, followed by the command or script to be executed. The fields are:
Minute: the minute of the hour when the job should run, from 0 to 59
Hour: the hour of the day when the job should run, from 0 to 23 (in 24-hour format) Day of month: the day of the month when the job should run, from 1 to 31 Month: the month of the year when the job should run, from 1 to 12 Day of week: the day of the week when the job should run, from 0 to 6 (where 0 and 7 are Sunday) The asterisk (*) means any value, and the comma (,) means a list of values. Therefore, the crontab entry above means:
Run the job at the 3rd minute of the hour
Run the job at the 15th, 16th, and 17th hour of the day (which are 3 p.m., 4 p.m., and 5 p.m.) Run the job on any day of the month Run the job on any month of the year Run the job on any day of the week This will execute the script chklog three times per day, every day of the month, and every month of the year, which is equivalent to three times per month.
The other options are incorrect because:
A . This will run the job at any minute of the hour, but only at the 3rd, 4th, and 5th hour of the day (which are 3 a.m., 4 a.m., and 5 a.m.), and only on the 1st day of the month.
B . This will run the job at the 3rd minute of the hour, but only at the 3rd, 4th, and 5th hour of the day (which are 3 a.m., 4 a.m., and 5 a.m.), and only on the 1st day of the month.
D . This will run the job at the 0th minute of the hour (which is the top of the hour), but only at the 15th, 16th, and 17th hour of the day (which are 3 p.m., 4 p.m., and 5 p.m.), and only on the 1st day of the month.
E . This will run the job at any minute of the hour, but only at the 15th, 16th, and 17th hour of the day (which are 3 p.m., 4 p.m., and 5 p.m.), and only on the 1st day of the month.
Reference:
Crontab Explained in Linux [With Examples]
'crontab' in Linux with Examples - GeeksforGeeks
Linux Crontab Command Help and Examples - Computer Hope
Crontab in Linux with 20 Useful Examples to Schedule Jobs - TecAdmin
Linux crontab tutorial with Examples - Linux Tutorials - Learn Linux ...
Question 93
Which command can be used to delete a group from a Linux system?
Correct Answer: A
The groupdel command is used to delete a group from a Linux system. It removes the group name from the
/etc/group and /etc/gshadow files, but not the group's configuration files, entries, or account files. The groupdel command requires root or sudo privileges and does not accept any options except for one for chroot.
The groupdel command does not print any output on success, but it will display an error message if the group does not exist or if it is the primary group of an existing user. The groupdel command is part of the shadow-utils package, which provides tools for managing user and group accounts. The groupdel command is also compatible with the Linux Standard Base (LSB) specification, which defines a common set of commands and utilities for Linux distributions. References: 1234
/etc/group and /etc/gshadow files, but not the group's configuration files, entries, or account files. The groupdel command requires root or sudo privileges and does not accept any options except for one for chroot.
The groupdel command does not print any output on success, but it will display an error message if the group does not exist or if it is the primary group of an existing user. The groupdel command is part of the shadow-utils package, which provides tools for managing user and group accounts. The groupdel command is also compatible with the Linux Standard Base (LSB) specification, which defines a common set of commands and utilities for Linux distributions. References: 1234
Question 94
Which of the following commands can be used to customize all kernel compilation options?
(Choose Three)
(Choose Three)
Correct Answer: B,C,D
Question 95
What is true regarding a default route?
Correct Answer: C
A default route is a special type of route that specifies where to send packets when there is no explicit route for the destination in the routing table. A default route is usually configured on a router or a gateway that connects to another network, such as the internet. A default route is often represented by the destination 0.0.0.0/0, which means any IP address.
A default route is not always used first. It is only used as a last resort, when there is no more specific route for the destination. For example, if a host wants to send a packet to 192.168.1.10, and the routing table contains the following entries:
Destination Gateway Genmask Flags Metric Ref Use Iface 192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
0.0.0.0 192.168.1.1 0.0.0.0 UG 0 0 0 eth0
The host will use the first entry, which is more specific, and send the packet directly to 192.168.1.10 via eth0 interface. The second entry, which is the default route, will not be used in this case. However, if the host wants to send a packet to 8.8.8.8, which is not in the same network, the host will use the default route and send the packet to 192.168.1.1, which is the gateway to the internet.
Setting a default route does not disable other routes. It only adds an entry to the routing table that can be used when no other route matches the destination. Other routes are still valid and can be used if they are more specific.
Without a default route, network communication in directly attached networks is still possible, as long as there are routes for those networks in the routing table. However, network communication to other networks that are not directly connected will not be possible, unless there are specific routes for those networks in the routing table.
References:
* How to Set the Default Gateway in Linux - How-To Geek
* Linux setup default gateway with route command - nixCraft
* How to set a default route permanently in Linux - Xmodulo
A default route is not always used first. It is only used as a last resort, when there is no more specific route for the destination. For example, if a host wants to send a packet to 192.168.1.10, and the routing table contains the following entries:
Destination Gateway Genmask Flags Metric Ref Use Iface 192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
0.0.0.0 192.168.1.1 0.0.0.0 UG 0 0 0 eth0
The host will use the first entry, which is more specific, and send the packet directly to 192.168.1.10 via eth0 interface. The second entry, which is the default route, will not be used in this case. However, if the host wants to send a packet to 8.8.8.8, which is not in the same network, the host will use the default route and send the packet to 192.168.1.1, which is the gateway to the internet.
Setting a default route does not disable other routes. It only adds an entry to the routing table that can be used when no other route matches the destination. Other routes are still valid and can be used if they are more specific.
Without a default route, network communication in directly attached networks is still possible, as long as there are routes for those networks in the routing table. However, network communication to other networks that are not directly connected will not be possible, unless there are specific routes for those networks in the routing table.
References:
* How to Set the Default Gateway in Linux - How-To Geek
* Linux setup default gateway with route command - nixCraft
* How to set a default route permanently in Linux - Xmodulo
- Other Version
- 590Lpi.102-500.v2026-03-14.q132
- 2593Lpi.102-500.v2025-02-06.q139
- 1957Lpi.102-500.v2024-09-19.q139
- 2705Lpi.102-500.v2023-12-04.q138
- 3356Lpi.102-500.v2022-11-07.q113
- 3719Lpi.102-500.v2022-07-02.q103
- 3852Lpi.102-500.v2022-02-05.q101
- 106Lpi.Braindumpspass.102-500.v2021-12-27.by.caroline.101q.pdf
- Latest Upload
- 180Cisco.300-610.v2026-08-19.q170
- 192CompTIA.PT0-003.v2026-08-19.q179
- 151Databricks.Databricks-Generative-AI-Engineer-Associate.v2026-08-18.q40
- 147SAP.C_CR125_2601.v2026-08-17.q28
- 210Salesforce.Field-Service-Consultant.v2026-08-17.q134
- 166Oracle.1Z0-1170.v2026-08-16.q64
- 172Oracle.1Z1-1170.v2026-08-16.q64
- 198Juniper.JN0-336.v2026-08-13.q60
- 365EMC.NCP-AII.v2026-08-13.q200
- 217CIRO.RSE.v2026-08-12.q41
[×]
Download PDF File
Enter your email address to download Lpi.102-500.v2026-05-15.q167 Practice Test
