How to Add Tabs to Ubuntu’s Terminal

00_lead_image_tabs_on_terminal_window

If you work a lot in the command line, you probably keep more than one Terminal window open at once. However, instead of having separate windows, you can condense all your Terminal sessions onto one window using tabs.

RELATED: How to Enable Local Menus in Ubuntu

We’ll show you how to open multiple Terminal sessions as tabs in Ubuntu.

To begin, open a Terminal window and select “Preferences” from the “Terminal” menu. The menu bar may either be on the title bar of the Terminal window or on the top panel on the desktop, depending on whether global menus are enabled in Ubuntu.

01_selecting_preferences

On the Preferences dialog box, make sure the General tab is active. Then, select “Tab” from the “Open new terminals in” drop-down list.

02_selecting_tab

Click “Close” to accept the change and close the Preferences dialog box.

03_clicking_close

To open a new Terminal session on a new tab, select “New Terminal” from the “Terminal” menu.

04_selecting_new_terminal

A second Terminal session is opened on a new tab and the original session is also available on a tab. The name on the tab includes the current directory you’re in on that tab.

NOTE: Even when the Open new terminals in option is set to Tab, pressing Ctrl+Alt+T opens a new Terminal session in a new window, not a new tab.

05_two_tabs_open_in_terminal

Once you have two sessions open, you can open additional sessions using plus button to the right of the tabs.

06_adding_a_new_tab

When you add a new tab, whether it be through the Terminal menu or using the plus button, the new session is open to the same directory you were in on the tab that was currently active at that time.

There are several ways to switch among tabs. You can click on a tab to activate it, of course. You can also use the down arrow button on the far right to select the session you want or press Alt+1, Alt+2, etc. on your keyboard to jump to a specific tab. The tabs are numbered from the left, starting at 1.

07_switching_tabs

If you want change the order of the tabs, you can click on a tab and drag it to another location on the tab bar. When you move tabs, they’re renumbered, so using the Alt+1, Alt+2 keyboard shortcuts to switch among the tabs will account for the new tab order. For example, if you move the third tab to the second position, Alt+2 would then activate what used to be the third tab.

08_moving_a_tab

To close a tab, click the “X” button on the right side of the tab.

09_closing_a_tab

You can also move and close tabs by right-clicking on a tab and selecting an option from the popup menu.

10_tab_right_click_menu

To close the Terminal window, and all the tabs, click the “X” button in the upper-left corner of the window.

11_closing_the_terminal_window

The tabs are not saved when you close the Terminal window. However, the Open new terminals in setting is preserved and you can open multiple sessions on tabs the next time you open a Terminal window.

Lori Kaufman is a writer who likes to write geeky how-to articles to help make people's lives easier through the use of technology. She loves watching and reading mysteries and is an avid Doctor Who fan.