Hi,
Whenever I start my console gnome-terminal
in Ubuntu, it starts in the home directory. How can I make it start in a different directory say ~/myfolder
?
I tried to write cd ~/myfolder
in ~/.profile
but nothing happens.
views:
1219answers:
6From GNOME Terminal - Getting Started:
You can also specify a command that runs automatically when you start GNOME Terminal in the profile.
if you start gnome-terminal like "gnome-terminal --working-directory=myfolder" it will start with the working directory at ~/myfolder. so you could add a new entry to your menu to use that command instead of the other one.
You could use the nautilus-open-terminal extension. This allows you to right-click on a folder in nautilus and open a terminal window with that directory as its working directory.
You can also run a terminal in the normal way, type "cd ", and drag a folder icon from nautilus to the window. This will paste the path of the folder into the command line and you then type return to change to that directory. You can do the same thing with regular files to paste their path and run commands on them.
If the folder has a complicated path, ie not just ~/myfolder
, you could create a symlink to it in your home directory so you can get to it quickly. You can also set the CDPATH
environment variable to tell bash to search a list of directories when you type cd myfolder
.