Linux frontend and backend Conversion

Source: Internet
Author: User

Linux Shell background running and foreground Conversion


When Bash is used to startProgram, You can use it in the background to add and 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, for example, the Emacs


Run the jobs command to check the total number of programs started by Bash. You can see that your Emacs is in the stoped state, and its jobid can also be seen, for example, 2.


Then run the command BG 2;


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


Some work, such as updatedb and find, takes some time. These work can be considered to run in the background, and you can use Bash to do other work.


If you want to return the task to the foreground, you only need FG 2.

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.