The background running in linuxshell and the conversion from front-end to front-end

Source: Internet
Author: User
The background running of linuxshell and the conversion from the front-end-general Linux technology-Linux technology and application information. The following is a detailed description. When you use bash to start a program, you can use it after adding & to implement the program to run in the background;

Example: emacs &

But if you forget to enter &; but you do not want to stop the program and restart it;

You can do this:

Press Ctrl + Z to pause front-end work, such as the Emacs mentioned above;

Run the jobs command to check the total number of programs started by bash. You can see that your emacs is in it,

Its status is Stoped, and its jobID can also be viewed, for example, 2

Run the bg 2 command.

In this way, you can achieve the same effect as emacs.

Some jobs, such as updatedb and find, take some time. You can consider putting them in the background.

Run, and you can use bash to do other work.

To return the task to the foreground, you only need fg 2.
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.