How To Use Screen To Start Ghost
Starting a Screen Session
Screen provides a very simple way to quickly get Ghost running in the background. With Ghost stopped
cd to the Ghost directory and run
screen npm start. The
npm start command will be started in a new screen session. Once you see the message that Ghost has started use the keyboard shortcut
control-d and then
a to exit the
screen session. At this point you are back to your non-screen command prompt and you can confirm Ghost is running by navigating to it in your browser.
Viewing list of Screen sessions
Once you have Ghost running in a screen session you will need to be able to retrieve that session. To view active sessions run
screen -ls. This will output something similar to:
There is a screen on:
1 Socket in /var/run/screen/S-root.
22870.pts-0.server is your screen session id. To retrieve that session run
screen -r 22870.pts-0.server.
Once back in your Ghost session, if you press
control-c to close the
node processes it will automatically switch make to your normal non-screen command prompt.