3 ms·
To prevent this I change the PS1 in the bash config. For servers I use a different prompt format. For my local computer: hollander@mypc 19:30:45 ~ > For serv
by hollander 11y ago
To prevent this I change the PS1 in the bash config. For servers I use a different prompt format.
For my local computer:
hollander@mypc 19:30:45 ~ >
For servers:
[hollander@server01 19:30:45 ~]
This all with coloring for name, servername, time and filepath, different for local computer and server. Root and username have different colors as well.
- noir_lord 11y agoLocal's are green, staging is orange, production is bright red. Saved me a whole bunch of times when tired.
- chris_wot 11y agoCan you paste in the shell codes you use?
- noir_lord 11y agoRed export PS1="\[\e[31m\]\u\[\e[m\]\[\e[31m\]@\[\e[m\]\[\e[31m\]\h\[\e[m\]\[\e[31m\]:\[\e[m\]\[\e[31m\]\W\[\e[m\] " Orange export PS1="\[\e[33m\]\u\[\e[m\]\[\e[33m\]@\[\e[m\]\[\e[33m\]\h\[\e[m\]\[\e[33m\]:\[\e[m\]\[\e[33m\]\W\[\e[m\] " Green export PS1="\[\e[32m\]\u\[\e[m\]\[\e[32m\]@\[\e[m\]\[\e[32m\]\h\[\e[m\]\[\e[32m\]:\[\e[m\]\[\e[32m\]\W\[\e[m\] " As always you can tailor them if you prefer different things to be different colors, I'm often lazy and don't change local machines to green but always change staging to orange and production to red.