screen -S „sessionname“
screen -d -S "sessionname" -m "command"
Example:
start nodemon in a seperate screen in the background inside path /var/www/cv.hg-system.com/node/ and execute server.js
screen -d -S nodemon -m cd /var/www/cv.hg-system.com/node/ && nodemon server.js
Start a named Session
# within a running screen: Press CTRL+A, ":sessionname "
screen -S "sessionname"
# view running screen's: screen -ls
# connect: screen -xS "sessionname"
Rename a Session
´Press Ctrl+A.
:sessionname "new sessionname"
´Press Enter
Deatatch
STRG + A and then STRG + D