Using screen command, we can create a session and run multiple windows in it.
First we create a screen session and there we create & run multiple windows.
1) Create a screen session
screen
screen <command> E.g. screen top
2) Naming a screen session while starting a new session
screen -S <sessionname>
3) Renaming the current screen session
a) Ctrl + a
b) Then type
:<current_sessionname> <new_SessionName>
4) Renaming without attaching the screen session
screen -X <old_sessionname> <new_sessionname>
5) Detaching from a current screen session
Ctrl+a d
6) Detaching from a screen session using screen command
screen -d <sessionname>
7) Reattaching a screen session
screen -r <sessionname>
1) Create a new window
Ctrl+a c
2) To navigate between windows in a screen session
Ctrl+a p or Ctrl+a n
3) To list all the windows in a screen session
Ctrl+a "
4) To name current window in a screen session
Ctrl+a A
5) To kill a window
Ctrl+a k
A [y/n] option will be prompted. Typing y will kill the window.
Else, typing exit from the windows shell shall kill the window.
First we create a screen session and there we create & run multiple windows.
Commands related to session
1) Create a screen session
screen
screen <command> E.g. screen top
2) Naming a screen session while starting a new session
screen -S <sessionname>
3) Renaming the current screen session
a) Ctrl + a
b) Then type
:<current_sessionname> <new_SessionName>
4) Renaming without attaching the screen session
screen -X <old_sessionname> <new_sessionname>
5) Detaching from a current screen session
Ctrl+a d
6) Detaching from a screen session using screen command
screen -d <sessionname>
7) Reattaching a screen session
screen -r <sessionname>
Commands related to windows in screen session
1) Create a new window
Ctrl+a c
2) To navigate between windows in a screen session
Ctrl+a p or Ctrl+a n
3) To list all the windows in a screen session
Ctrl+a "
4) To name current window in a screen session
Ctrl+a A
5) To kill a window
Ctrl+a k
A [y/n] option will be prompted. Typing y will kill the window.
Else, typing exit from the windows shell shall kill the window.
No comments:
Post a Comment