#Kill the process of a specific port number
#method one:
kill -9 `lsof -i:18100 | awk'NR ==2{print $2}' `# start from the second line
#Method Two:
kill -9 `lsof -i | grep 18100 | awk '{print $2}'`
#Method Three:
kill -9 `ss -antlup | grep 18100 | awk '{print $7}' | awk -F'[=,]' '{print $3}'`
Kill the process of a specific port
Guess you like
Origin blog.51cto.com/zhzhgo/2588849
Recommended
Ranking