Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

function in bash

killport(){ 

sudo kill -9 $(sudo fuser -n tcp $1 2> /dev/null);

}

Now put this function in your bash configuration file, eg ~/.bashrc and then run:

source  ~/.bashrc
Source by unix.stackexchange.com #
 
PREVIOUS NEXT
Tagged: #function #bash
ADD COMMENT
Topic
Name
9+9 =