Lesson 1

Date: 1/18/2017
User accounts, files and directories, processes, system commands.
Linux System Administration


Processes

  • Program running on a system is a process. Linux is a multi-processing (multi-tasking) system.

  • Attributes: Lifetime, PID, PPID, UID, GID, env variables, CWD.

  • Process with PID=1 is init

  • Monitoring: ps (for full listing, use ps -ef or ps -aux), top, pstree

  • Signal a running processes with PID=1009:
        kill -HUP 1009    #Hang up; re-read config files
        kill -1   1009
     
        kill -9  1009     #Kill; stop unconditionally
        kill -KILL 1009
    
        kill -15   1009    #Terminate gracefully
        kill -TERM 1009
    
        kill -TSTP 1009   #Suspend; can be continued
        kill -18   1009
    

  • Process can be started with lower and higher priority through nice
    (range: -20 highest, +19 lowest)
        nice -10 matlab
        nice --10 matlab
     
  • Process can be re-niced at run time:
        renice 5 1009
        renice -5 1009
    
  • Suspend interactive process and move it to the background: Ctrl-Z
      jobs
      bg %1
      jobs
    
  • Move a background process to the foreground:
     fg %1  
    



  • Take me to the Course Website