Linux commands-Work Management command: &,CTRL+Z,JOBS,FG,BG

Source: Internet
Author: User

There are two ways to put a process into the background under Linux:

The first way:& means that the command executes the program in the background, which is equivalent to minimizing the program in Windows.

The second way: Execute a command, for example: top, and then press CTRL + Z shortcut key, put it into the background to execute.

The difference between the two ways is: the first way:& into the background of the process is still executing, the second way: Ctrl + Z into the background of the execution is suspended.

Execute the top command, and then press Ctrl+z,ctrl+c is forced to exit, Q is normal exit, we are here to use CTRL + Z into the background, note the status of stopped

Top

Jobs-l

FG%1 Restores the 1 work number in the background process to the foreground execution, does not write 1 to restore the last work number (+) to the foreground execution, or can not write%,FG 1

For example, top cannot revert back to background execution because the top command needs to interact with the foreground when it executes, so top cannot revert back to the background execution. After you resume the background run, the status changes to running.

Linux commands-Work Management command: &,CTRL+Z,JOBS,FG,BG

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.