Skip to content

color bash prompt that changes colors with hostname and privileges

Notifications You must be signed in to change notification settings

brand0nv1nc3nt/dynamic-colorprompt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

Screenshot from 2022-05-18 15-08-53

dynamic-colorprompt

Color bash prompt that changes colors with hostname and privileges

While working in my lab, I've more than once switched to the wrong terminal and started working on the wrong server because all of my hosts have the same looking bash prompt. To combat this, i've created a dynamic color changing bash prompt that selects a color for the hostname based on the hostname itself. For the username, a blue username corresponds to a non-root user, and red corresponds to root user.

To use it, simply append the file to your .bashrc:
cat dynamic-colorprompt >> ~/.bashrc

About

color bash prompt that changes colors with hostname and privileges

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published