close port linux code example
Example 1: kill port linux
kill -9 $(lsof -t -i:8080)
Example 2: debian kill open port
fuser -k 3000/tcp //will kill that process.
Example 3: kill linux port
sudo fuser -k 1883/tcp
Example 4: kill process linux using port
sudo kill -9 $(sudo lsof -t -i:8000)
Example 5: how to close port in linux
sudo ufw deny PORT
Example 6: how to close port in linux
sudo ufw allow PORT