Monday, May 6, 2024
61
rated 0 times [  61] [ 0]  / answers: 1 / hits: 97659  / 2 Years ago, sat, march 5, 2022, 5:53:51

I am new to Ubuntu.



Whenever I open a terminal my current working directory /home/Varun (as found by typing pwd).



Is there any way I can make the terminal's path to be set as /home/Varun/Desktop/Java Files when it opens?


More From » command-line

 Answers
3

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.


[#29963] Monday, March 7, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
eaderitable

Total Points: 368
Total Questions: 117
Total Answers: 111

Location: Tuvalu
Member since Sat, Feb 11, 2023
1 Year ago
;