Question & Answer
Question
How do I place an interactive process into the background on Linux?
Answer
A Linux user who is using the /bin/bash shell can put a running process into the background by performing the following:
1. Start the process, for example nzsql -f .
2. Enter ctrl-Z. You will be informed the nzsql process has stopped.
3. Enter bg to resume the nzsql process started in Step 1. It will resume as a background process.
To return the process back to the foreground, enter fg.
To determine if you have multiple processes in the background, enter the Linux command jobs, which may return output similar to:
- [1]+ Running nzsql proddb1 -f query1.sql
[2]+ Running nzsql proddb1 -f query2.sql
To change the second running background process enter:
- jobs 2
[{"Product":{"code":"SSULQD","label":"IBM PureData System"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":null,"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"1.0.0","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]
Historical Number
NZ932290
Was this topic helpful?
Document Information
Modified date:
17 October 2019
UID
swg21573378