How to Open Multiple Terminals in Ubuntu?
Here, we will see the most effective and modern methods through which we can open multiple terminals in Ubuntu. There are many types of methods, but in this article, we will see the most important and efficient methods. Below we have listed the methods that we will discuss in this article:
- Method 1: Opening Multiple Terminals Using Keyboard Shortcuts
- Method 2: Opening Multiple Terminals Using ‘gnome-terminal’ Command
- Method 3: Opening Multiple Terminals Using Multiplexers
- Method 4: Opening Multiple Terminals Using Shell Script
- Method 5: Opening Multiple Terminals Using Built-in Multi-tab functionality
We will see all the above methods in a proper step-by-step manner.
Method 1: Opening Multiple Terminals using Keyboard Shortcuts
Step 1: We can open the terminal on Ubuntu using Keyboard Shortcut. To open the single terminal we can use the shortcut:
Ctrl + Alt + T
Step 2: If we need to open multiple terminals, then we can repeatedly press the keyboard shortcut and open the multiple terminals as much as we want. Below we have added a screenshot in which when we are pressing the keyboard shortcut repeatedly multiple terminals in Ubuntu are opened.
Ctrl + Shift + N
Method 2: Opening Multiple Terminals Using ‘gnome-terminal’ Command
Step 1: For opening the multiple terminals, we can use the inbuilt command. So firstly, we will need to open the single terminal. We can use the shortcut from the above method and open the initial terminals.
Step 2: Now, in the terminal, we need to execute the below command to open the multiple terminals as much as we want. Below we have added the screenshot, describing the practical guide to open multiple terminals using the inbuilt command.
gnome-terminal
Method 3: Opening Multiple Terminals using Multiplexers
Multiplexers are the utilities that help us to split the main terminal vertically and horizontally. There are different types of multiplexers:
- tmux
- Konsole
- Screen
- Terminator
- Tilix
As all the Multiplexers working is similar, we can use any of the multiplexers to open multiple terminals in Ubuntu. For this article, we will use Tmux multiplexer.
Step 1: As the multiplexer is an external utility, we need to initially install it on our system, so to install it on our system we first need to update the repository.
sudo apt update
Step 2: After updating the repositories, we need to execute the below command in the terminal and install the Tmux multiplexer on our system.
sudo apt-get install tmux
Step 3: After installation is completed, we need to run the below command to start the tmux multiplexer instance. Execute the below command in the terminal.
tmux new -s dev
Step 4: For opening the terminal in Hormizaonatal we can use the below Keyboard Shortcut:
CTRL + B + %
Step 5: For opening the terminal in Vertical Layout we can use the below Keyboard Shortcut:
CTRL + B + "
Method 4: Opening Multiple Terminals Using Shell Script
If we want that, multiple terminals should be automatically opened without doing any manual work like using shortcuts every time or installing any external multiplexers. We can automate this by writing a script and running it once, so the multiple terminals will get opened automatically.
Step 1: Open any text editor in Ubuntu like Vim, Vi, Nano, etc., and write the below script in it.
#!/bin/bash
# Open multiple terminal windows
gnome-terminal --tab -- bash -c 'echo "Terminal 1"; exec bash'
gnome-terminal --tab -- bash -c 'echo "Terminal 2"; exec bash'
gnome-terminal --tab -- bash -c 'echo "Terminal 3"; exec bash'
Step 2: After writing the script, save the file with the “.sh” extension. Open the terminal using the keyboard shortcut and make the script executable by executing the below command:
chmod +x demo.sh
Step 3: Now, by using the below command run the script. After running the script, the terminals will be automatically opened. We have included a screenshot in which multiple terminals are opened by executing the script.
./demo.sh
Method 5: Opening Multiple Terminals Using Built-in Multi-Tab Functionality
Another way to use multiple terminals in Ubuntu is using its built-in Multi-Tab feature. Unlike previous shortcuts that open new windows or uses shell scripts to provide multi-tabbing, this feature allows us to use multiple terminal tabs within the same terminal window without any scripts.
Step 1: Open your terminal using the application menu or the shortcut.
Ctrl + Alt + T
Step 2: Press the key combination to open a new terminal tab within the same window, you can repeat this for as many tabs as you require.
Ctrl + Shift + T
Step 3: Use tabs as usual and use the following key combination to close any of the newly created tab, if needed.
Ctrl + Shift + W
How to Open Multiple Terminals in Ubuntu
As a programmer or developer, we may feel insufficient to use only one terminal or window. We need more than one terminal to easily navigate through code files or do another installation task. This problem is also faced by the system administrators as well as the DB administrators because we may need more than 2 terminals to handle the system efficiently. As in Ubuntu or Linux, the terminal doesn’t have any tabs like a web browser, so we may need to open multiple terminals in Ubuntu. In this article, we will see the methods to open multiple terminals in Ubuntu. We will discuss all the methods with detailed steps and output screenshots.
Contact Us