Advertisement
Templario_7777

LSOF examples

Feb 20th, 2025 (edited)
163
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.43 KB | None | 0 0
  1.  
  2. Show ports LISTENING
  3.  
  4. -P -n (Evita lsofla resolución de nombres y no bloquea. Si falta alguno de estos, puede resultar muy lento.)
  5.  
  6. sudo lsof -iTCP -sTCP:LISTEN -P -n
  7.  
  8. UDP:
  9. sudo lsof -iUDP -P -n | egrep -v '(127|::1)'
  10.  
  11. SOLO EL PUERTO 8080 LISTEN
  12.  
  13. sudo lsof -iTCP:8080 -sTCP:LISTEN -P -n
  14.  
  15. Filtra Solo el Process ID
  16. sudo lsof -iTCP:8080 -sTCP:LISTEN -P -n -t
  17.  
  18.  
  19. kill process using 8080
  20. sudo kill -9 $(sudo lsof -t -i:8080)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement