The role of CTRL+Z when running commands under Linux operating system

  
                  Use CTRL+Z when the command is run, forcing the current process to go to the background and stop it. 1. Let the process resume running (background) (1) Use the command bg Example: zuii@zuii-desktop:~/unp/tcpcliserv$ . /tcpserv01 *This uses CTRL+Z, where serv01 is stopped* [1]+ Stopped ./tcpserv01 zuii@zuii-desktop:~/unp/tcpcliserv$ bg [1]+ ./tcpserv01 & *serving serv01 at this time Running in the background * zuii@zuii-desktop:~/unp/tcpcliserv$ (2) If you stop several programs with CTRL+Z? Example: zuii@zuii-desktop:~/unp/tcpcliserv$ jobs [1]- Running ./tcpserv01 & [2]+ Stopped ./tcpcli01 127.0.0.1 zuii@zuii-desktop:~/unp/tcpcliserv$ bg %1 bash: bg: Task 1 has been transferred to the background* background running* 2. Make the process Resume to the foreground and run Example: zuii@zuii-desktop:~/unp/tcpcliserv$ ./tcpserv04 [1]+ Stopped ./tcpserv04 zuii@zuii-desktop:~/unp/tcpcliserv$ fg ./tcpserv04 Summary: (1) CTRL+Z stops the process and puts it into the background (2) jobs shows the currently suspended process (3) bg %N causes the Nth task to run in the background (with spaces before %) (4) fg %N makes the Nth task The foreground runs the default bg, fg Represents a process for the last operation!
belt% N
Copyright © Windows knowledge All Rights Reserved