What does 'export PS1=">> "' do?


#1

https://www.codecademy.com/en/courses/learn-the-command-line/lessons/environment/exercises/ps1?action=resume

I'm having a hard time understand what exactly adding 'export PS1=">> "' actually does. The description in the exercise flies right over my head. I have entered the commands correctly, and everything appears to be working, I just don't understand why it's working.

Thank you


#2

bash will print the content of that variable each time it's asking for input from the user.
Setting that variable will therefore set the prompt.


#3

This looks like it talks about everything I'd ever want to know about bash prompt variables:

https://linuxconfig.org/bash-prompt-basics


#4

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.