- [Instructor] Hello again and welcome to the last video
of the last section, managing multiple terminals from one.
In the previous video we learned how to take
screen shots from the terminal.
In this video we'll see how to manage
multiple terminals from one.
If you have been using the shell extensively
you would have noticed that at times
you'll need to have access to more than one
terminal at once.
If you are using a graphical terminal emulator like Konsole
you might use multiple tabs to achieve this.
However, what to do when you want a solution
without using a graphical terminal emulator
or you are logged into a remote machine
and want multiple shells?
In the latter case, opening multiple SSH connections
will basically waste network bandwidth
and even slow down things.
We will see how to achieve multiple shells
while avoiding these problems.
To achieve this we'll be using a utility called GNU Screen.
If the screen is not installed
in your distribution by default
install it using the package manager.
Creating screen windows.
To create a new screen run the command screen
from your shell.
You'll see a welcome message
with some information about the screen.
Press SPACE or RETURN to begin.
You'll be given a new shell to enter commands.
To create a new window, which basically means a new shell,
press CTRL and A and then C.
These are case sensitive.
Viewing a list of open windows.
While running the screen
if you want to see a list of all open windows
use the keystrokes CTRL + A and quote.
Switching between windows.
A usual requirement while using screen
is to cycle through the open windows
in a next/previous fashion.
For this use the keystrokes CTRL + A and CTRL + N
for the next window and CTRL + A and CTRL + P
for the previous window.
Attacking to and detaching screens.
A useful feature of the screen
is that you can save and load screen sessions
called detaching and attaching in screen terminology.
To detach from the current screen session
press CTRL + A and CTRL + D.
When starting the screen to attach to an existing screen use
which tells the screen to attach the last screen session.
If you have more than one detached session
the screen will output a list of them
and then you can use.
Web PID is the pit of the screen session
you want to attach to.
Awesome, in this video we've seen how to manage
multiple terms from one.
This video concludes the last section of this course.
We first learned about gathering information
about processes and then we moved on to
killing processes and send or respond to signals.
After that we have seen about sending messages
to user terminals.
Then we moved on to gathering system information.
Also we have seen how to use /proc
for gathering information.
Then we have learned about scheduling with Cron.
We then learned how to write and read
the MySQL database from Bash.
Also we have learned how to use user administration scripts.
Then we have seen about bulk image resizing
and format conversion.
We then moved on to how to take
screen shots from the terminal.
Finally we have seen how to manage
multiple terminals from one.