Answers for "ask ubuntu kill port"

43

kill port ubuntu

sudo kill -9 `sudo lsof -t -i:9001`
Posted by: Guest on May-03-2020
3

kill port ubuntu

sudo kill -9 `sudo lsof -t -i:8080`
Posted by: Guest on April-17-2021
1

kill port ubuntu

fuser -n tcp -k 9001
Posted by: Guest on August-25-2021
1

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)"
Posted by: Guest on January-21-2021
0

ubuntu kill port

You want to use backtick not regular tick:
sudo kill -9 `sudo lsof -t -i:9001`

If that doesn't work you could also use $() for command interpolation:
sudo kill -9 $(sudo lsof -t -i:9001)
Posted by: Guest on November-08-2021

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language