If you want to open a terminal in Ubuntu and work in a specific folder, you can use the cd command. For example, if you want to open the terminal in your home folder, you would type: cd ~ You can also use the cd command to change to a different directory on your computer. For example, if you want to change to the directory where your text editor is located, you would type: cd /usr/local/bin ..
There may be times when you’re working with files in Ubuntu’s File Browser, Nautilus, and you want to switch to working on the command line in Terminal. Instead of manually navigating to the same folder in Terminal, you can easily jump directly to that folder.
We’ll show you how to add an “Open in Terminal” option to the context, or right-click, menu in Nautilus that allows you to open a Terminal window directly to the folder selected in Nautilus.
NOTE: When we say to type something in this article and there are quotes around the text, DO NOT type the quotes, unless we specify otherwise.
To install the “Open in Terminal” option in the Nautilus context menu, press Ctrl + Alt + T to open Terminal. Type the following command at the prompt and press Enter.
Type your password when prompted and press Enter.
When the installation is finished, type “exit” at the prompt and press Enter.
Note: you will need to log out and back in for the changes to take effect.
To open Nautilus, click the Files icon on the Unity bar.
Navigate to the desired folder using the left pane in Nautilus. Right-click on the folder in the right pane and select Open in Terminal from the popup menu.
A Terminal window opens with the prompt indicating you are in the folder you selected in Nautilus.
This makes it easier if you need to jump to Terminal to perform operations on files that are more easily done on the command line.