Linux Foreground Process

When working within the Linux terminal and issuing a command to launch an application, the terminal will continue to run that application and it may seem the need to spawn a new terminal window. However, with using the command shortcut to foreground a process (ctrl + z), this will take the current application within terminal and place it as a background process:

root@kali:~# maltego
Config File path = /root/.maltego/v4.2.3/etc/maltego.conf
canonical: /usr/lib/jvm/java-8-openjdk-amd64/jre
javaHome: /usr/lib/jvm/java-8-openjdk-amd64/jre
resource:com/paterva/maltego/java/config/jre/TestJDK.class -> /tmp/temp397219231743671113628418889499750/TestJDK.class
executing: /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java -classpath /tmp/temp397219231743671113628418889499750 TestJDK, in: .
result: 0
command execution finished
out: 1.8.0_212, 25.212-b01, Oracle Corporation, Linux, amd64
jdkhome: /usr/lib/jvm/java-8-openjdk-amd64/jre
canonical: /usr/lib/jvm/java-8-openjdk-amd64/jre
javaHome: /usr/lib/jvm/java-8-openjdk-amd64/jre
executing: /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java -classpath /tmp/temp397219231743671113628418889499750 TestJDK, in: .
result: 0
command execution finished
out: 1.8.0_212, 25.212-b01, Oracle Corporation, Linux, amd64
jdkhome: /usr/lib/jvm/java-8-openjdk-amd64/jre
Checking for updates Sat Jan 04 00:24:29 GMT 2020
Found 0 updates.

When the background a process command shortcut is issued, the current process is backgrounded and awaits for further input from the user. You will now notice the application may seem unresponsive. To resume the process, you will need to bring the process to the foreground using the fg command, e.g.:

root@kali:~# fg 1
maltego

To obtain the number ID for the backgrounded process to restore as a foreground process, you can issue the jobs command:

root@kali:~# jobs
[1]+ Stopped maltego

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.