Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

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

Say I'm running a minecraft server on my ubuntu server and I log into this machine from a remote ubuntu machine over ssh. I startup the server running a script I have e.g. minecraft.

If I want to log out and keep the server running, I usually minecraft &. say I actually log out after running minecraft &. I log back in an want to restore the same info window I get when I originally ran minecraft &. How would I restore this?

share|improve this question
A search for screen minecraft on Google, on this site and on Unix Stack Exchange is likely to turn up a few articles that'll interest you. – Gilles Nov 2 '11 at 23:38

You can use byobu. It can be installed easily by with

sudo apt-get install byobu

and can be started with


You can set an option through the menus that it will be automatically started when you ssh into the server.

byobu is a front-end that uses screen. It allows the convenient usage of multiple terminal windows through one ssh connection.

share|improve this answer
wow byobu is awesome so far! how do you close a window? nothing about it in their quickstart guide – tester Nov 2 '11 at 17:40
ah nevermind. found it in this guide: (Ctrl+a k) – tester Nov 2 '11 at 17:43
Say I setup byobu-enable (so it starts every time) and I reboot my server, will byobu restore my processes? – tester Nov 2 '11 at 18:43
after reading through this, it looks like screen doesn't do it by default.. – tester Nov 2 '11 at 18:47

You can use screen or tmux to do this. screen is used more and installed by default, so if you are new to this it's probably best to start with that. Also recommended when you use screen is Byobu (screencast video here), which is a wrapper around screen that makes it easier to use and adds lots of useful extensions to screen (and in the future it will also support tmux).

share|improve this answer

If the server's interface is console-only, you can use GNU screen to get the persistence you want. If it's graphical, use VNC or nx for persistence.

Or if you don't care about reattaching the process later on, the nohup ("no hangup") command will run a process that ignores the terminate signal triggered when the ssh session ends.

share|improve this answer

Look into GNU Screen. It allows long-running programs to execute, and you can "detach" and "reattach" to these sessions at will.

Search the software centre for "screen". The package name is screen.

To detach, just close the ssh session with the red X, (don't exit). Or type ctrl-a d.

To reattach, do

screen -r <screen-id>

Where can be obtained from

screen -list
share|improve this answer

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.