30

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..

1 Answer 1

43

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.

3
  • 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, 2018 at 13:45
  • saw the solution on google results but just showing up to say thanks.
    – Minsky
    Jan 5, 2022 at 17:43
  • Ctrl+Z works but, is it possible to move the job to the background without suspending it ?
    – Autechre
    Nov 24, 2023 at 13:12

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .