Process control and access :

Process control is a complex issue and will be covered in detail in the processes module. However we can experiment with ps and top for a quick peak at currently running processes.

  • ps - list processes running.
  • top - lists the top n (enough to fill the screen) processes running by resource usage.
  • jobs - lists background processes.
  • kill - sends a signal to a process, most often to terminate.
  • bg - restart in the background a paused background process.
  • fg - bring into the foreground a paused or running background process.

    Exercise :

    #( Running ps at the prompt lists user's processes started from the current login session. This should list the command interpreter (bash) reading in the commands you type and the ps command itself. It is possible that additional processes are listed. )

    ps
    
    #( Add the full listing to see additional information. )
    
    ps -f
    
    #( List all processes on the system. Pipe it to less for easy viewing. )
    
    ps -ef | less
    

    #( Run top to see what processes are consuming the most resources. When top is run in the foreground, the screen will update every 3 seconds. Enter q to quit.)

    top

    Editors
    Command list