I'm using Ubuntu 16.04 and I want to open the terminal in a current folder with short cut (not by right clicking and open terminal here). For example, by hitting f4 or something different key and it will open terminal at where I am.(maybe at /home/user/someDirectory).I researched a lot and couldn't find it, is there any sample scripts or options to do that ?
Thank you.
Method 1: Launch Ubuntu terminal using keyboard shortcut To open a terminal, you can press Ctrl, Alt and T keys together.
So, we can add a cd command to change to a specific directory as soon as the Terminal window opens. To do this, press Ctrl+Alt+T to open a Terminal window. As we mentioned, you are in your Home directory by default, which is where you want to be right now.
Perhaps the easiest way to open terminal window on Ubuntu 22.04 desktop is to use the keyboard shortcut CTRL + ALT + T . Entering this shortcut will instantly open the terminal window, and you can use it no matter where you are on the desktop.
Switch to a TerminalAt the login screen, press Ctrl + Alt + F5 to switch to a TTY. You'll be prompted to enter a login. At the login prompt, enter your username and press Enter .
RIGHT-CLICK ON MOUSE/MOUSEPAD + E
For almost all keyboards there is a right-click key, simultaneously clicking right-click + e, works but the real flow is "right-click" then "e".
Ensure that in the folder in which you intend to use terminal, no file is highlighted. Otherwise, right-clicking will pull up the options to modify the selected file
This seems to be the most effective solution without having to modify any environment variables on your computer.
Since version 3.15.4 Nautilus doesn't load the accel file anymore (Source).
Fortunatelly there's a better aproach in order to get what you want. Long explanation/useful resources can be found here and also here. In short:
Create a script called Terminal
(yes, without a extension) inside the folder ~/.local/share/nautilus/scripts
with the following content:
# !/bin/sh
gnome-terminal
Make it executable, then close any Nautilus instance:
chmod +x Terminal
nautilus -q
Create (or edit) the ~/.config/nautilus/scripts-accels
file adding these lines:
F4 Terminal
; Commented lines must have a space after the semicolon
; Examples of other key combinations:
; <Control>F12 Terminal
; <Alt>F12 Terminal
; <Shift>F12 Terminal
Test it! Open Nautilus, right click, and choose Scripts > Terminal. Or, use the keyboard shortcut that you've just configured :)
Edit: Misunderstood the question. To do what you need, please follow this link:
https://askubuntu.com/questions/68078/keyboard-shortcut-for-open-a-terminal-here
You'll need to do some steps of the procedure listed below though.
For ubuntu 16.04, you can run the following commands:
sudo add-apt-repository universe
sudo apt-get update
sudo apt-get install nautilus-open-terminal
sudo apt-get install nautilus-actions
After this, run
nautilus -q
to quit nautilus.
You should now have the right-click open terminal here option.
Original Answer has been taken from:
https://askubuntu.com/questions/207442/how-to-add-open-terminal-here-to-nautilus-context-menu
Please refer this for more details.
P.S.: Nautilus is the default file manager for GNOME DE.
If you're not using that, please refer this:
https://askubuntu.com/questions/602234/is-it-possible-to-open-a-terminal-in-the-current-directory/608619
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With