How Do I Permanently Set a Ps1 Variable in Linux?
Contents

How do I permanently change command prompt in Linux?

After you have experimented with text customization and colorization of your prompt, and reached a final that you want to set permanently for all your bash sessions, you need to edit your bashrc file. Save the file by pressing Ctrl+X and then by pressing Y. The changes to your bash prompt will now be permanent.

Where is PS1 defined in Linux?

PS1 is a primary prompt variable which holds [email protected] W\$ special bash characters. This is the default structure of the bash prompt and is displayed every time a user logs in using a terminal. These default values are set in the /etc/bashrc file.

Alexander Ross

Alexander Ross

Gaming, Esports & Interactive Media Writer

Alexander Ross has covered the video game industry for a decade, writing deep dives on game design, esports tournaments, VR developments, and gaming culture.

Share this article
Twitter Facebook Pinterest