title: How to kill a process on a port on ubuntu
body: <p>I am trying to kill a process in the command line for a specific port in ubuntu.</p>
  
  <p>If I run this command I get the port:</p>
  
  <pre><code>sudo lsof -t -i:9001
  </code></pre>
  
  <p>so...now I want to run:</p>
  
  <pre><code>sudo kill 'sudo lsof -t -i:9001'
  </code></pre>
  
  <p>I get this error message:</p>
  
  <pre><code>ERROR: garbage process ID "lsof -t -i:9001".
  Usage:
    kill pid ...              Send SIGTERM to every process listed.
    kill signal pid ...       Send a signal to every process listed.
    kill -s signal pid ...    Send a signal to every process listed.
    kill -l                   List all signal names.
    kill -L                   List all signal names in a nice table.
    kill -l signal            Convert between signal numbers and names.
  </code></pre>
  
  <p>I tried <code>sudo kill 'lsof -t -i:9001'</code> as well</p>