Thursday, November 13, 2014

Linux Putting Process Into Background

When you are running a process that takes a long time and you need to logout of the server, and if you didn't run it with the "&" at the end to run it in the background, you can still send the process to the background with the following steps:

  1. CTRL-Z (This will give you your bash prompt back)
  2. If you type "jobs" you will be able to see the list of jobs (YMMV but what I saw was my process listed as "Job 1" but it was stopped)
  3. To resume it in the background, I had to tell issue the command "bg 1" (or whatever the job number is)
  4. You can also move it back to the foreground with "fg 1"

No comments:

Post a Comment