Reference for some commands used while using linux screen
- Ckeck the path you open it in (e.g. users/documents) as you'll reopen the screen from it
- write in terminal (on this path)
screen -S "replace this line with any name you want for the screen"
- Inside the screen:
ctrl + A + D
- Inside the terminal:
screen -ls
- Note that: from this step you can get the names of the screen to re-attach to them if you forget their names.
- cd to the path of the screen you want to re-connect to
- write in terminal:
screen -r *replace_this_with_name_of_screen*
- cd to the path of the screen you want to re-connect to
- write in terminal:
screen -rd
- Inside the screen:
ctrl + A
thenk
theny
GENERAL NOTE You cannot open a screen from 2 devices
- Quoted from (this answer)[https://stackoverflow.com/questions/45835971/persistent-use-of-jupyter-notebook-from-remote-server]
- On your computer (SSH terminal; e.g. gitBash):
ssh -L xxxx:localhost:yyyy server
. - screen.
jupyter notebook --no-browser --port=yyyy
. [on remote server]- In your browser: localhost:xxxx.
- To disconnect manually and reconnect: Exit the screen window:
control + a
and thend
. - Disconnect from the server:
control + d
And reconnectssh -L xxxx:localhost:yyyy
.
- Optionally, you can reopen the screen window using
screen -r
. Go back to your notebook or reopen localhost:xxxx