Freeing up a TCP/IP port?

前端 未结 11 1077
时光取名叫无心
时光取名叫无心 2020-12-07 06:59

netstat -tulnap shows me what ports are in use. How to free up a port in Linux?

11条回答
  •  轮回少年
    2020-12-07 07:23

    If you really want to kill a process immediately, you send it a KILL signal instead of a TERM signal (the latter a request to stop, the first will take effect immediately without any cleanup). It is easy to do:

    kill -KILL 
    

    Be aware however that depending on the program you are stopping, its state may get badly corrupted when doing so. You normally only want to send a KILL signal when normal termination does not work. I'm wondering what the underlying problem is that you try to solve and whether killing is the right solution.

提交回复
热议问题