The Computer Oracle

How to open new tab in existing terminal session and using keyboard shortcut / modifying global settings

--------------------------------------------------
Rise to the top 3% as a developer or hire one of them at Toptal: https://topt.al/25cXVn
--------------------------------------------------

Music by Eric Matyas
https://www.soundimage.org
Track title: Puzzle Game 2 Looping

--

Chapters
00:00 How To Open New Tab In Existing Terminal Session And Using Keyboard Shortcut / Modifying Global Sett
00:40 Answer 1 Score 19
01:05 Accepted Answer Score 12
01:38 Answer 3 Score 8
02:11 Answer 4 Score 1
02:32 Thank you

--

Full question
https://superuser.com/questions/657867/h...

--

Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...

--

Tags
#ubuntu #terminal #keyboardshortcuts

#avk47



ANSWER 1

Score 19


Run gnome-terminal command and add as many --tab options as you need. For instance, gnome-terminal --tab --tab --tab will get you a new window with three tabs. Assign the command to a keyboard shortcut to achieve what your goal.

To open a new tab interactively use Ctrl+Shift+T.




ACCEPTED ANSWER

Score 12


gnome-terminal is the default terminal application on Ubuntu. It does have a command line option that should help:

--tab    Open a new tab in the last-opened window with the default profile

so you could create a custom keyboard shortcut with the command

gnome-terminal --tab

If you wanted to open two tabs you could create a script file like:

#!/bin/sh
gnome-terminal --tab
gnome-terminal --tab

Then call that script file from your keyboard shortcut.




ANSWER 3

Score 8


CTRL + ALT + T (Open New Terminal) CTRL + SHIFT + T (Open New Tab in the terminal(Note you should not present on browser while executing this shortcut otherwise last closed browser tab will be opened)

gnome-terminal (open New Terminal) gnome-terminal --tab (open New tab in the terminal)

ALT + (tab number) ex: ALT + 1 (change to First Terminal tab) Alt + 2 (change to second Terminal Tab)




ANSWER 4

Score 1


From the existing gnome terminal, right click and select Preferences, you will see the keyboard shortcuts settings on Global -> Shortcuts.

The screenshot