Command Line - PS1 Environment Variable

By Hemanta Sundaray on 2022-06-30

PS1 is an environment variable that defines the makeup and style of the command prompt.

What happens when this is stored in ~/.bash_profile?

export PS1=">> "
  • export PS1=">> " sets the command prompt variable and exports the variable. Here we change the default command prompt from $ to >>.
  • After using the source command, the command line displays the new command prompt.
Lear to edit your bash profile in my blog post here.

Join the Newsletter