linux background execution

July 2, 2014 1.9k views

I have embed jetty java application and I want to execute in linux digitalocean. When console is closed, application is stop. How can I execute java application without stopping

3 Answers

You can use screen to run an app in the background, see How to Install and Use Screen on an Ubuntu Cloud Server.

by Justin Ellingwood
In this article, we will discuss how to install and use "screen", a tool that allows you to manage multiple shell sessions inside a single terminal. The screen program is very useful for multi-tasking in an ssh environment, due to its ability to resume terminal sessions and perform multiple-concurrent tasks.

nohup <command and arguments> &

I have been using tmux for easy access to the individual command lines of multiple programs running 24/7 and am rather fond of it. I have no idea if this solution is anywhere optimal however.

Have another answer? Share your knowledge.