User Tools

Site Tools


screen

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

screen [2015/01/07 08:36] (current)
mihael created
Line 1: Line 1:
 +====== screen ======
 +<​blockquote>​GNU Screen is a software application that can be used to multiplex several virtual consoles, allowing a user to access multiple separate terminal sessions inside a single terminal window or remote terminal session.</​blockquote>​
  
 +===== Start screen =====
 +
 +  screen
 +  ​
 +===== Detach from Session =====
 +
 +  CTRL+a , d
 +  ​
 +===== Attach to Session =====
 +
 +  screen -r -S <​name>​
 +
 +like
 +
 +  screen -r -S postalcodes
 +
 +
 +===== Start Application in screen Session =====
 +
 +  screen -dmS postalcodes bash -c "cd /​opt/​postalcodes && exec java -jar postalcode.jar server config.yml"​
 +
 +This starts a screen session with the name ''​postalcodes'',​ changes the current directory to ''/​opt/​postalcodes''​ and starts the [[dropwizard|Dropwizard]] server application //​postalcodes//​ with the parameters //server// and //​config.yml//​.
 +
 +This is useful for applications which tend to output things on ''​stdout''​ or ''​stderr''​ because the terminal session is not ended by leaving because you can detach from and attach to the session.
 +
 +
 +
 +{{tag>​linux}}
screen.txt ยท Last modified: 2015/01/07 08:36 by mihael