Display PIDs using local TCP port 8080 with fuser.
Do not send a signal to the processes.
Which command is appropriate?
fuser PORT/tcp displays processes using the port. The -k option would send a signal and should be omitted for inspection.
Detailed explanation
fuser -k 8080/tcpIncorrect. -k sends a signal to matching processes.
Incorrect. -k sends a signal to matching processes.
fuser /tcp/8080Incorrect. The network resource syntax is PORT/PROTOCOL.
Incorrect. The network resource syntax is PORT/PROTOCOL.
lsof 8080/tcpIncorrect. This is not lsof's network-endpoint syntax.
Incorrect. This is not lsof's network-endpoint syntax.
fuser 8080/tcpCorrect. It displays PIDs using TCP port 8080.
Correct. It displays PIDs using TCP port 8080.
Try it yourself
An example you can run in a temporary verification environment.
fuser --help 2>&1 | grep -E -- 'namespace|tcp|-n' | head -n 3Expected result
network namespaceまたはtcp指定に関するhelp行Key points
- PORT/tcp syntax
- -k sends a signal
- Omit -k for inspection
Notes
- Environment: psmisc fuser help / process操作なし
- Command output formatting can vary slightly by distribution or tool version.
- Run the example in a temporary directory or process when possible.
Foundation review
Read the scope first
Check whether the command acts on the current shell, a new process, an existing process, or a file.
Verify the observable result
Use the supplied command and compare the output with the expected result.