Use screen Command To Create Multiple Terminal Sessions
The GNU/Linux screen program is quite unknown, except for geeks & *nix experts, it helps you create multiple terminal sessions from a single one and lets you detach from the screen, at the same time maintaining the sessions as if you had never left the session and you can attach/connect to the session anytime you want afterwards.
Another feature of the screen program is that it allows multiple people to use the same sessions, thereby providing a terminal session 'sharing' feature. In this article we'll be looking into using screen to create and manage multiple sessions.
First let's look at starting a screen session, it can be simply started with,
but, that will have a arbitrary screen session name chosen by the screen program. So, this would be more suited,
This will immediately start a new session and attach it, in case you want to start a screen in detached mode, useful for startup scripts, try this
To resume a detached screen,
To attach to an already attached running screen (say for sharing, multiple users can attach to the same session)
To create a new window inside a screen when attached to it, use Ctrl + A and then C.
To view the list of running windows in a screen and select one from the list, use Ctrl + A and then ".
To change a window's title, use Ctrl + A and then capital A.
To detach from a screen, use Ctrl + A and then D.
To list all the running screens,
You can use multiple windows inside a screen to work on different things, say one for editing code, another for executing the programs, and another one to view logs/debugging etc. It's very easy to share working while on a teleconferencing call and all users can see, execute & discussion commands and outputs.
|All times are GMT +5.5. The time now is 00:55.|