How do you use the "screen" command effectively?
Is it:
Type "screen"
Type in command
Lose connection
Check back on lost session
How do I carry out step 4?
|
How do you use the "screen" command effectively?
How do I carry out step 4? | ||||
|
feedback
|
This question came from our site for professional and enthusiast programmers.
|
With screen:
A simpler method that is useful for commands that leave logfiles or just throw some relevant output and do not need interactivity is nohup:
| |||
|
feedback
|
|
Screen is really powerful, and allows you to do exactly what you asked. To see all your sessions, type
Once you've identified a screen session to reconnect too, try
which will nicely detach and re-attach your session. You can also do a less nice,
which will detach and logout remotely, if nesscessary, then reattach, or if that session doesn't exist, it will create it and notify the user. You can add a "-t NAME" to give shells or programs a title. Within screen, use
to create a new window (So you don't need 4000000 screen sessions to disconnect and reconnect from), and change between them with
Indexing from 0, of course:P Since you seem a bit unfamiliar with screen, I'm going to assume you could use some other info. I like the following commands, like:
Which causes x to be the command character and y to be the character to generate a literal command character. The defaults are Ctrl-a and `a. There's some more for you here: Screen! It's what's for programmers | |||
|
feedback
|
|
A quick Google search found this screen guide http://www.rackaid.com/resources/linux-tutorials/general-tutorials/using-screen/ So from step b) you can detach the screen using : "Ctrl - A" "d" and then later after the connection has been lost and your connected once again find the screen using :
and then reattach using :
| |||
|
feedback
|
|
Here's what I have picked up about using screen (which I, too, have just started doing):
Also, when you start using screen, whenever you plan to leave, press In addition, I can recommend taking a look at The most important of these (to me) are:
| |||
|
feedback
|
|
you can also set up your environment to log you in and start screen right off the bat. There are many ways to do it. I chose to add this to my .bashrc file.
| |||
|
feedback
|