Skip to content

Instantly share code, notes, and snippets.

View hoaronal-project's full-sized avatar
🏠
Working from home

hoaronal-project

🏠
Working from home
View GitHub Profile
@hoaronal-project
hoaronal-project / kill_port_process.sh
Created December 11, 2020 10:56 — forked from marcosvidolin/kill_port_process.sh
Linux: How to list and kill a process using a port
# to list all ports that are used
sudo netstat -ntlp | grep LISTEN
# you can obtain a specific port using the following command
sudo netstat -ntlp | grep :8080
# when you execute the command above you will see something like that
tcp 0 0 0.0.0.0:27370 0.0.0.0:* LISTEN 4394/skype
tcp 0 0 127.0.1.1:53 0.0.0.0:* LISTEN 2216/dnsmasq
tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN 4912/cupsd