Skip to content

Instantly share code, notes, and snippets.

@alamnr
Last active October 5, 2018 19:21
Show Gist options
  • Save alamnr/02a8031fd507b1f72e24177b3bcd2826 to your computer and use it in GitHub Desktop.
Save alamnr/02a8031fd507b1f72e24177b3bcd2826 to your computer and use it in GitHub Desktop.
How to kill a process on a port in ubuntu

You want to use backtick not regular tick:

sudo kill `sudo lsof -t -i:9001` If that doesn't work you could also use $() for command interpolation:

sudo kill $(sudo lsof -t -i:9001)

Tuklified from : Stack Overflow

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment