Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ubuntu open terminal in current folder with shortcut [closed]

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.

like image 516
erdemgunenc Avatar asked Feb 17 '18 09:02

erdemgunenc


People also ask

What is the shortcut to open terminal in current directory Ubuntu?

Method 1: Launch Ubuntu terminal using keyboard shortcut To open a terminal, you can press Ctrl, Alt and T keys together.

How do I open a terminal in a specific directory in Linux?

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.

How do I bring up terminal in Ubuntu?

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.

How do I open terminal in Ubuntu before login?

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 .


3 Answers

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.

like image 173
ARAVIND SWAMI Avatar answered Nov 13 '22 10:11

ARAVIND SWAMI


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:

  1. Create a script called Terminal (yes, without a extension) inside the folder ~/.local/share/nautilus/scripts with the following content:

    # !/bin/sh
    gnome-terminal
    
  2. Make it executable, then close any Nautilus instance:

    chmod +x Terminal
    nautilus -q
    
  3. 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
    
  4. Test it! Open Nautilus, right click, and choose Scripts > Terminal. Or, use the keyboard shortcut that you've just configured :)

like image 26
amartin1911 Avatar answered Nov 13 '22 11:11

amartin1911


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

like image 23
Yuvraj Jaiswal Avatar answered Nov 13 '22 11:11

Yuvraj Jaiswal