Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # How to find the PID of a process using a given port?
- Sometimes you have a process you lost the PID, and would like to kill it.
- You can use `top` (or better `htop`) to search for your process name and press `k` to kill it.
- But this isn’t optimal when you aren’t sure of its name.
- A better alternative is to search by the port opened, for example port 80:
- ```bash
- sudo lsof -i :80
- ```
- Remember to use `sudo`. The process PID will be in the second column.
- Happy process killin’ 👾
Add Comment
Please, Sign In to add comment