29

Once in a while I will issue a command that takes longer than I had thought it would (archiving a directory or something). How do I escape the process, send it to the background, and return to the prompt? I think there's a keyboard shortcut, but I can't find it..

doub1ejack
  • 567
  • 1
  • 6
  • 12

1 Answers1

41

If you're using BASH, just press CTRL-Z, which will suspend the process, and then use the bg command to send it to the background. If you want more detail have a look at this article on BASH job control.

Evan Anderson
  • 141,881
  • 20
  • 196
  • 331
  • 4
    FYI, you can use `command &` - if need to run process with long duration in the background (for example, in GUI processes that waits until closed, you can initially run it with `&` ). – Noam Manos Jan 17 '18 at 13:45
  • saw the solution on google results but just showing up to say thanks. – Minsky Jan 05 '22 at 17:43