Skip to content

Instantly share code, notes, and snippets.

@ayuLiao
Created May 17, 2018 02:26
Show Gist options
  • Save ayuLiao/41a8dcc10404f4e2799cd2ea9a4a6259 to your computer and use it in GitHub Desktop.
Save ayuLiao/41a8dcc10404f4e2799cd2ea9a4a6259 to your computer and use it in GitHub Desktop.
自己启动了后台运行的python脚本,可以通过关键字和端口号找到该脚本进程,再用kill命令将其杀死
ubuntu@iZwz92no3ygwxhh603stndZ:$ netstat -anutp | grep 9798 | grep LISTEN
(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)
tcp 0 0 0.0.0.0:9798 0.0.0.0:* LISTEN 11944/python
ubuntu@iZwz92no3ygwxhh603stndZ:$ kill 11944
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment