Search code examples
bashterminalbackground-process

How to Exit An App in Terminal While Leaving it Running in Background


I learned how do to do this in my Linux class last year, but can't for the life of me remember how to do it. I've google searched probably about 30 different combinations of words to try to find out how, but nothing is turning up the correct search.

I'm trying to recall how to close an application (Like pico or emacs) and leave it running in the background.

Additionally, it might be nice to know how to pick that app back up where I left off, which I never learned. Any help would be much appreciated.


Solution

  • When using Bash and some other shells, you can use Ctrl+Z suspend a program then run "fg" to bring it back to the foreground. If you want the program to continue running in the background, typing "bg" will resume the process. If the process prints any output while it's in the background, your display will probably end up being mangled.