Monday, May 13, 2024
61
rated 0 times [  61] [ 0]  / answers: 1 / hits: 97660  / 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
eaderitable questions
Tue, May 24, 22, 07:37, 2 Years ago
Mon, Aug 23, 21, 02:31, 3 Years ago
Thu, Mar 2, 23, 23:23, 1 Year ago
Wed, Apr 6, 22, 13:20, 2 Years ago
Tue, Dec 14, 21, 16:57, 2 Years ago
;