Switch between the frontend and backend of the linux Program

Source: Internet
Author: User
Article Title: switch between the frontend and backend of a linux program. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.

A. Shell supports role control and has the following commands:

1. command & run the process in the background

2. jobs view the processes running in the background

3. fg % n bring the processes running in the background to the foreground

4. bg % n let the process n go to the background;

PS: "n" indicates the process number viewed by jobs.

B. Conversion of the following: http://blog.chinaunix.net/u/1604/showart_1079559.html

Fg, bg, jobs, &, ctrl + z are all related to system tasks. Although these commands are rarely used, they are also very practical.

I. & Most frequently used

This command is used at the end of a command and can be executed in the background.

II. Ctrl + z

You can put a command that is being executed on the foreground in the background and pause it.

3. Jobs

View the number of commands currently running in the background

4. Fg

Move the commands in the background to the foreground to continue running.

If there are multiple commands in the background, you can use fg % jobnumber to call up the selected command. % jobnumber is the serial number (not pid) of the command being executed in the background found through the jobs command)

5. Bg

Pause a command in the background to continue execution.

If there are multiple commands in the background, you can use bg % jobnumber to call up the selected command. % jobnumber is the serial number (not pid) of the command being executed in the background found by the jobs command)

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.