Home Process Management in Linux
Post
Cancel

Process Management in Linux

Some process management commands in Linux

  • jobs: Will show active jobs
  • bg: Resume jobs to the background
  • fg: Resume job to the foreground

  • To resume a speciic jobs
    1
    2
    3
    4
    
          Syntax: 
              bg %<job_id> (To resume the job in backround)
              gh %<job_id> (To resume the job in foreground)
    
    

Nice value

Every process has a nice value which range goes from -20 to 10. The lower the value is, the more priority that the process gets.

1
2
3
4
5
6
7
8
9
```
    # To check the nice value of a process
    Syntax: 
        ps -l <PID>

    # To change the priority of a process by chaning its nice value
    Syntax:
        ps -n <nice vlaue> <PID>
```

nohup

If we want our process to keep running even after closing our terminal, we can use nohup.

1
2
3
4
```
    Syntax:
        nohup process &
```
This post is licensed under CC BY 4.0 by the author.