Receive all updates via Facebook. Just Click the Like Button Below

What is a Process?

What is a Process?
Process is kind of program or task in execution.
Each command, program or a script in linux is a process.

Process Management in Linux Shell Scripting

Managing a process
You might have seen some process taking long time to execute. You can run such process in the background.
Example:

 
ls / -R | wc -l
            

The above command can be used to find the total count of the files on your system. This takes a long a time, so to get the command prompt and to start an other process, you can run the above command in background.

Running a process in background

 
ls / -R | wc -l &
            

The ampersand (&) at the end of command tells the shell to run the command in background. You will a number printed on your screen. It is the process Id.
So for each process you will have a process Id.

Some of the important commands assosiated with processes.

ps -> display currently running process
kill {PID} -> to kill a particular process
killall {Process-name} -> to kill all the process having the same name.
ps -ag -> to get information about all running process
kill 0 -> to kill all process except your shell
linux-command & -> start a process in background
ps aux -> to get all the details regarding the running process.
ps ax | grep process-name -> to check a particular process.
top -> to see currently running processes and there memory usage.
pstree -> to see currently running processes in a tree structure.

Related posts:

Advertise here

picture picture

Follow us

picture

- Tech-Tutorials twitter.com/techcuriosity

Like us

About Techcuriosity

I am Telson, the webmaster of Techcuriosity.com and through this site, I share my knowledge and curiosities in the Tech World.


What We Offer

  • What is ..?
  • How to ..?
  • Difference between ..?
  • How .. works?
  • Get in Touch

    techcuriosity@gmail.com
    UAE : +971-55-83-566-04
    India : +91 - 9526244217

    picture picture

    Our Partners

  • Website Design Dubai
  • SEO Link Exchange
  • picture

    picture