Screen

Screen can be used to launch multiple terminals so a session can run in the background and be detached to continue other work during an install, for example.

Install Screen if not already installed:

sudo apt-get install screen

Usage

screen

A new window will appear.

You can temporarily disconnect from the Screen window by:

Press and hold Control, press and hold A, then press D. (Ctrl + A + D)

Note: This will not end your session.

Reconnect by typing:

screen -r

To end the session:

exit

Using Screen with scripting

Create a new .sh script in your home directory:

cd ~ && vi sample.sh

Paste in the below contents:

#!/bin/sh
screen -t samplename sh target_script.sh

Run the above script using:

sudo bash sample.sh

A new Screen window will appear.