Shell/Bash: kill a port in ubuntu Example

By

Shell/Bash Example: This is the "kill a port in ubuntu" Example. compiled from many sources on the internet by SimpleTutorials.org

kill port ubuntu

sudo kill -9 `sudo lsof -t -i:9001`

stop port ubintu

sudo kill -9 `sudo lsof -t -i:9001`

kill port ubuntu

sudo kill -9 `sudo lsof -t -i:3002`

ubuntu stop process on port

sudo kill -9 `sudo lsof -t -i:{PORT_NUMBER}`

kill a port in ubuntu

kill -9 $(sudo lsof -t -i:'portName')
//Ex. if portname is 3000
//then we will execute "kill -9 $(sudo lsof -t -i:3000)"

kill port ubuntu

sudo kill -9 `sudo lsof -t -i:8080`


* Summary: This "kill a port in ubuntu" Shell/Bash Example is compiled from the internet. If you have any questions, please leave a comment. Thank you!

Others