0

How do I set my default PS1 to ~/Desktop?

I have tried changing it in my ~/.bashrc but to no avail.

Can someone give out a detailed solution to be able to make changes to PS1 to the directory we would like to have upon starting the terminal?

1

The PS1 variable isn't what you want to change - it only affects what prompt is displayed, not what directory you're in. Adding

cd ~/Desktop

to the end of your .bashrc should do what you want.

Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

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