Most effective way to change Linux command prompt for all users?

Posted by incredimike on Server Fault See other posts from Server Fault or by incredimike
Published on 2011-01-04T17:29:36Z Indexed on 2011/01/04 17:55 UTC
Read the original article Hit count: 171

Filed under:
|
|
|
|

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?

© Server Fault or respective owner

Related posts about linux

Related posts about unix