Guest User

Untitled

a guest
Feb 19th, 2017
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. # How to find the PID of a process using a given port?
  2.  
  3. Sometimes you have a process you lost the PID, and would like to kill it.
  4.  
  5. You can use `top` (or better `htop`) to search for your process name and press `k` to kill it.
  6. But this isn’t optimal when you aren’t sure of its name.
  7. A better alternative is to search by the port opened, for example port 80:
  8.  
  9. ```bash
  10. sudo lsof -i :80
  11. ```
  12.  
  13. Remember to use `sudo`. The process PID will be in the second column.
  14. Happy process killin’ 👾
Add Comment
Please, Sign In to add comment