Newb Question

B

Brandon Buster

Guest
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?
 


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?


Are you asking 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.
 
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.
 
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?
 

Members online


Latest posts

Top