How to make the background process run back to the foreground in Linux

Time:2019-11-8

How to make the background process run back to the foreground in Linux

WeChat public address:51 yards of rural network
Professional programming Q & a community
www.51manong.com

For example, using characters & running a script in the background, how can I get this process back to the foreground?

[[email protected] ~]#  51mn.sh  &
[1] 5821

First, use the jobs command to view the running jobs

[[email protected] ~]#  jobs
[1] + Running   51mn.sh

Then use the FG command, followed by a percentage symbol and job number

[[email protected] ~]#  fg %1
51mn.sh

At this time, the process has returned to the foreground to run. Press ctrl-c to terminate the 51mn.sh command

Recommended Today

Configure Apache to support PHP in the Apache main configuration file httpd.conf Include custom profile in

In Apache’s main configuration file / conf/ http.conf Add at the bottom Include “D:workspace_phpapache-php.conf” The file path can be any In D: workspace_ Create under PHP file apache- php.conf file Its specific content is [html] view plain copy PHP-Module setup LoadFile “D:/xampp/php/php5ts.dll” LoadModule php5_module “D:/xampp/php/php5apache2_2.dll” <FilesMatch “.php$”> SetHandler application/x-httpd-php </FilesMatch> <FilesMatch “.phps$”> SetHandler application/x-httpd-php-source </FilesMatch> […]