ubuntu:processes:kill_a_process_which_occupies_a_port
Ubuntu - Processes - Kill a process which occupies a port
This example shows how to detect and kill a process running on port 500 on Ubuntu machine.
1. Verify that port 500 is occupied on the machine:
netstat -an | grep 500
- -a is for listing active connections
- -n is to disable DNS lookup and only show IP address.
2. Show the ID of the process that uses port 500:
sudo fuser 500/udp
3. Kill the process:
sudo fuser -k 500/udp
ubuntu/processes/kill_a_process_which_occupies_a_port.txt · Last modified: 2020/07/15 09:30 by 127.0.0.1