Most effective way to change Linux command prompt for all users?
- by incredimike
I have several machines and the hostnames are really long.. i.e. companyname-ux-staging-web1.companyname.com. So my prompt looks something like
[root@mycompany-ux-staging-web1 ~]#
I'd like to shorten that up for all users on all machines with the least amount of work. From what I read I have a couple options, but they all have their drawbacks.
I could change the hostname, but that would likely affect applications. Not a great choice.
I could alter also $PS1 at login for all users by editing all .bashrc for existing users, and edit /etc/skel/.bashrc for potential new users. That's a lot of work across 10 machines.
What's my best option or what have I overlooked?