close running port linux code example
Example 1: kill port linux
kill -9 $(lsof -t -i:8080)
Example 2: kill port
sudo kill -9 $(sudo lsof -t -i:8080)
Example 3: kill process linux using port
sudo kill -9 $(sudo lsof -t -i:8000)
Example 4: kill a process at a port
fuser -k 8080/tcp
Example 5: how to close port in linux
sudo ufw deny PORT
Example 6: how to close port in linux
sudo ufw allow PORT