How to get the process ID to kill a nohup process?

前端 未结 13 1955
醉酒成梦
醉酒成梦 2020-11-27 08:53

I\'m running a nohup process on the server. When I try to kill it my putty console closes instead.

this is how I try to find the process ID:

ps -ef |         


        
13条回答
  •  隐瞒了意图╮
    2020-11-27 09:42

    I am using red hat linux on a VPS server (and via SSH - putty), for me the following worked:

    First, you list all the running processes:

    ps -ef
    

    Then in the first column you find your user name; I found it the following three times:

    • One was the SSH connection
    • The second was an FTP connection
    • The last one was the nohup process

    Then in the second column you can find the PID of the nohup process and you only type:

    kill PID 
    

    (replacing the PID with the nohup process's PID of course)

    And that is it!

    I hope this answer will be useful for someone I'm also very new to bash and SSH, but found 95% of the knowledge I need here :)

提交回复
热议问题