我试图在命令行中为ubuntu中的特定端口终止进程。
如果我运行此命令,我将获得端口:
sudo lsof -t -i:9001
所以…现在我想跑:
sudo kill 'sudo lsof -t -i:9001'
我收到以下错误消息:
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.
我也尝试过杀“lsof-t-I:9001”