Introducing Process Management In Linux With Illustration: (2024)

Table of Contents
SUMMARY: CONCLUSION: Related

December 13, 2021December 13, 2021 Mayuri DhoteStudio-Scala1 Comment on Basic Process Management commands for Linux:6 min read

Reading Time: 4 minutes

In this blog we will get to know about Process Management In Linux:

Process management on Linux simply operates i.e continue, stop, or terminate , commands that are already running, just started, or already completed.

A process is a running program. This process is created when a command is about to be executed, so you can call it a running instance of a running program. Process optimization or control is called process management.

There are basically two types of Processes:

  1. FOREGROUND PROCESS:

Such processes are also known as interactive processes. These are processes that the user or programmer must run or start and cannot be initialised by system services. Such a process takes input from the user and returns output. You cannot start a new process directly from the same terminal while these processes are running.

2. BACKGROUND PROCESS:

Such processes are also known as non-interactive processes. These are processes that need to be run or started by the system itself or by the user, but can also be managed by the user. These processes have unique PIDs or processes, if assigned, and can start other processes within the same terminal where they were started.

Let’s watch it Practically:

Example of foreground process:

1. sleep 5

Introducing Process Management In Linux With Illustration: (1)

So this command is executed in terminal and after running the above command, you can run another command.

2. Stop the process between runs. To stop the foreground process during execution, press Ctrl + Z to stop it.

sleep 100

Introducing Process Management In Linux With Illustration: (2)

Press CTRL + Z while the command is running to stop the command.

3. Now we want to list of jobs that are either running or stopped.

jobs

Introducing Process Management In Linux With Illustration: (3)

This command will show the stopped processes in this terminal and also the pending one.

4. Now I run all the pending and force stopped jobs in the bg i.e background

bg

Introducing Process Management In Linux With Illustration: (4)

This command will start the stopped or pending processes in the bg.

5. If we want to get details of a process running in bg :

Introducing Process Management In Linux With Illustration: (5)

6. If we want all the pending and force stopped jobs in the fg

fg

Introducing Process Management In Linux With Illustration: (6)

This command will start the stopped and pending processes in the fg.

7. To run a process in the background without getting impacted by the closing of the terminal.

Introducing Process Management In Linux With Illustration: (7)

While executing this command it will store all the output after execution in nohup.outfile.

8. If we want to run some processes in the bg directly

Introducing Process Management In Linux With Illustration: (8)

This command will run the process in the background and display the process id of the particular process.

9. Get the list of all the running processes on your Linux Machine.

top

Introducing Process Management In Linux With Illustration: (9)

Here we get all the process that currently running in my system.

10. PS

This command stands for `processstatus`. This is similar to the “Task Manager” that appears on Windows computers when you use Ctrl + Alt + Del. This command is similar to the `top` command, but the information displayed is different.

To check all the process running under the user use this command:

Introducing Process Management In Linux With Illustration: (10)

11. Also check process id:

Introducing Process Management In Linux With Illustration: (11)

This utility reports the free disk space(Hard Disk) on all the file systems.

Introducing Process Management In Linux With Illustration: (12)

13. If you want to display the above information in a readable format, use command .

df -h

Introducing Process Management In Linux With Illustration: (13)

14. Free,

This command shows the free and used memory (RAM) on the Linux system.

Introducing Process Management In Linux With Illustration: (14)

15. Kill.

This commandterminates running processeson a Linux machine.

To use these utilities you need to know the PID (process id) of the process you want to kill:

Introducing Process Management In Linux With Illustration: (15)

SUMMARY:

  1. A running program or command sent to a Linux system is called a process.
  2. Processes can run in the foreground or in the background The process priority index is called Nice on Linux.
  3. The default value is 0, which varies between 20 and 19.
  4. The lower the Niceness Index, the higher the priority of this task.

CONCLUSION:

In this blog, we learn about Process Management in linux. It is a fundamental concept we should be knowing if we work on linux. Hope this blog will helpful.

HAPPY LEARNING.

Related

Introducing Process Management In Linux With Illustration: (2024)
Top Articles
Latest Posts
Article information

Author: Prof. An Powlowski

Last Updated:

Views: 5828

Rating: 4.3 / 5 (64 voted)

Reviews: 95% of readers found this page helpful

Author information

Name: Prof. An Powlowski

Birthday: 1992-09-29

Address: Apt. 994 8891 Orval Hill, Brittnyburgh, AZ 41023-0398

Phone: +26417467956738

Job: District Marketing Strategist

Hobby: Embroidery, Bodybuilding, Motor sports, Amateur radio, Wood carving, Whittling, Air sports

Introduction: My name is Prof. An Powlowski, I am a charming, helpful, attractive, good, graceful, thoughtful, vast person who loves writing and wants to share my knowledge and understanding with you.