Good Linux question — answering as the UphillTech team:
Start screen in detached mode, and make it run your command inside it: screen -d -m -S bukkit bash -c 'cd $HOME/server && java -jar bukkit.jar' You might want to create a dedicated script bukkit.sh : #!/bin/bash -e cd ~/server java -jar bukkit.jar So that if the script becomes more complex you don't have to write a long line for screen , and so the screen command can stay the same, simply: screen -d -m -S bukkit path/to/bukkit.sh
Full answer by janos: https://askubuntu.com/a/428719 (CC BY-SA 4.0).
Need Linux help for your business? UphillTech.