Question:
Examples of using linux screen with two sessions?
anonymous
2012-02-21 11:39:53 UTC
How do I use Linux Screen to create two work sessions that I can reconnect to? For example, I would like to have two Putty sessions using screen called ScreenA and ScreenB. When I reconnect to screen after being disconnected, I can only get to the last screen session. I'll fill in with more information if that doesn't make sense.
Four answers:
?
2012-02-21 11:46:09 UTC
Ctrl-A + n goes to the next window, while Ctrl-A + p goes to the previous window. Use Ctrl-A + c to create a new window within screen. See link for details.
BurrintheSaddle
2012-02-23 20:48:28 UTC
I use FSecure Secure Shell in multiple sessions on our Unix/Linux boxes..



Generally SSH is state specific, that is, if you have multiple TTY's running to the same box, your history will based on the pts/# or tty/# the system gives you for the specific login.



Personally you might consider writing your command history out to a file periodically in your home directory. When I am in the midst of scripting things I've found it useful to cut items out of history to place in my scripts.



Command history is a sketchy thing. Bash Shell you can "arrow up" to get preceding commands, ksh you have to make sure you set your visual editor on with a set -o vi, then you have to user the OLD Unix navigation keys of JK for new or old in history.
?
2012-02-21 19:46:31 UTC
You can type screen -ls to get a listing of all active screen sessions.



You can type screen -r to reattach to a screen session that is listed by screen -ls



Does that not work?
briandwales
2012-02-21 19:49:50 UTC
controll and A


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...