Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I am newbie to Ubuntu. Whenever I open a terminal it's path is set "/home/Varun" (as found by typing pwd). Is there anyway I can make the terminal's path to be set at "/home/Varun/Desktop/Java Files" when it opens?

share|improve this question
    
What terminal do you use? –  choroba Aug 13 '13 at 13:01

2 Answers 2

up vote 1 down vote accepted

Just run the following command in your terminal:

echo "cd ~/Desktop/Java\ Files" >> ~/.bashrc

The above command will add a new line in your ~/.bashrc file that contain cd ~/Desktop/Java\ Files and that will change your default working directory to /home/Varun/Desktop/Java Files when you will open the terminal.

Reopen the terminal and you will see the difference.

share|improve this answer
    
Radu thanks a lot !!!.Worked like a charm –  UnderDog Aug 13 '13 at 13:20

You can add the following line to the end of your ~/.bashrc

cd ~/Desktop/Java\ Files

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.