13

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

22

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.

  • 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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.