×



Many new sysadmins find it very difficult to accomplish multiple tasks once a process takes longer. This often happens on servers where multiple applications are deployed. 

Here at LinuxAPT, as part of our Server Management Services, we regularly help our Customers to perform related Linux System processes and queries.

In this context, we shall look into how to send processes to the background in Linux to free our terminal to get back control of our system. 


Why send a process to the background in Linux system ?

The reason for this is to set the terminal free for the next command. Also whenever anything happens, most of the time either using a desktop or a server instance, we have access to a terminal only. At that time, a user doesn’t want it to be occupied by one job. Thanks to Linux, we can free the terminal from sending a job to the background and keep running new commands to get back to our system.


Running a process in Linux system

Running a process is as simple as running any other piece of software on Linux. We are going to run a trimage package for our illustration here. To run a trimage package, simply execute the following command:

$ trimage

You will see that the trimage package is running without any issues but the terminal is now stuck.

Sending a trimage to the background is as simple as hitting Ctrl + Z and it will stop the trimage job for the time being.

This happens when you run the command below and hit enter:

$ bg

The bg Command will send the trimage process to the background. Trimage will keep running as usual whereas the terminal will be free to perform the next command.

If the package has a GUI, you can choose to close it from there, but if the package doesn't have any GUI you can simply use

$ fg

This command will push the process to the foreground.

Now close the process as always we do use Ctrl + C and you'll return to a normal terminal.


[Need assistance in fixing Linux System errors? We can help you. ]


Conclusion


More Linux Tutorials

We create Linux HowTos and Tutorials for Sys Admins. Visit us on IbmiMedia.com

Also for Tech related tips, Visit forum.outsourcepath.com or General Technical tips on www.outsourcepath.com