Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

So lets say I'm executing a command on the CLI and it spawns a GUI and I forget the & at the end. Now I want my shell back, so I hit a ctrl-z but the GUI locks up! Is there any way to do a ctrl-z without locking up the GUI? I am using Linux with a bash shell, xorg and gnome. This is an Ubuntu system.

share|improve this question
up vote 7 down vote accepted

Use bg to put the command that you have stopped in the background.

share|improve this answer
It says "no such job" – Rook Sep 28 '10 at 19:49
When you stop the job you will get something like [n]+ command stopped enter bg n to backgrounds the job – Iain Sep 28 '10 at 20:02
Type 'jobs' to see currently running jobs. You should be able to pick the one you need from here. It'll probably be marked 'stopped'. – wzzrd Sep 28 '10 at 20:18
and @wzzrd yeah but its not a job, its just a command like firefox. – Rook Sep 29 '10 at 1:01

Check out GNU Screen. It is very useful for this type of thing as well as offering a bunch of other terminal multiplexing functionality that can be very nice.

share|improve this answer
I would call screen a lot of things, but a place to start GUI apps from and them (and it) leave them running until eternity wouldn't be one of them. Standard job control fits this job a lot better. – wzzrd Sep 28 '10 at 20:33
And why is that? X11 forwarding works perfectly fine through screen. The OP wasn't asking how to suspend and resume his application, he really just wanted his shell back, which screen will give him. – EEAA Sep 28 '10 at 20:42

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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