Newb Question

Discussion in 'General Linux' started by Brandon Buster, Jun 15, 2012.

  1. Brandon Buster

    Brandon Buster New Member

    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    0
    I ran the ps command to check out the processes running on my server. Everything executed properly, but I can't figure out, or find an answer to, how to exit that command.


    I've had this problem with other commands. Is there a default way to exit any Linux process or are there processes that have their own exit methods?
  2. mcneely.mike

    mcneely.mike New Member

    Messages:
    27
    Likes Received:
    6
    Trophy Points:
    0

    Are you a****g how to stop or 'kill' a process? If so, one way is to run top (or for system processes run sudo top).
    once 'top' is running, find the id (pid) # of the process and type 'k'. It will ask you which process id to kill. type it and hit enter. It will ask you with what signal [15]:
    Hitting enter will attempt to kill the process with signal 15. If that doesn't work, try process signal 9. !!!!!!!But always be careful when killing commands, especially system commands!!!!!!!!!

    To find out more about commands, use google or try the command 'man X' where X is the command name: such as

    man top (although the man pages can be intimidating)

    Hope this helps.
  3. Brandon Buster

    Brandon Buster New Member

    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    0
    Thanks for the reply. What prompted this post was I was stuck in the ps menu and couldn't figure out how to exit.

    I figured out it was by clicking "Q." I've been stuck in similar situations before, as with vi and other processes. I guess exiting ps is similar to exiting vi. Also learned today control+C will exit some processes.

    Thanks for the pointers on top.
  4. dale

    dale Member

    Messages:
    115
    Likes Received:
    7
    Trophy Points:
    18
    To exit from vi:
    1. :q! (exit, ignore any change to file)
    2. ZZ (exit, save any change to file)

    Keep in mind that vi has two layers. One is the "edit" layer, where you edit the file. One is the "control" layer, where you enter commands to quickly manipulate the file. These commands must be entered from the control layer, otherwise you would just be typing ":q!" and "ZZ" on screen.

    To break a process, use ctrl + c. But ps should not be doing what you described... It should give you a print out of currently running processes. What access do you have to the machine?

Share This Page