0
  1. I would like to have a system-wide custom prompt
  2. Added . /path/to/prompt.sh to my /etc/bash.bashrc but prompt remains unchanged
  3. I have some scripts in /etc/profile.d that tried to . /path/to/prompt.sh but also prompt remains unchanged
  4. Placing . /path/to/prompt.sh in ~/.bashrc was the only one that worked, but I would have to specify it for every single user

I recall reading somewhere Ubuntu restores to the default prompt, is this true? Any way to overcome this?

I have had this problem for a long time, thought I wanted to settle it for good.

Thank you.

bilogic
  • 233
  • 1
  • 3
  • 9
  • If you check the .bashrc file, you'll see it sets the prompt. Since it is the last file read by bash in the initialisation sequence (unless the .bashrc file itself sources some other file), the settings in it will usually win out over something in /etc/bash.bashrc or /etc/profile. – muru May 04 '23 at 02:00
  • thanks for the explanation – bilogic May 04 '23 at 08:07

1 Answers1

0

I eventually found a workable way this time How do I restore .bashrc to its default?

Modify /etc/skel/.bashrc, which will be used by all newly created users.

bilogic
  • 233
  • 1
  • 3
  • 9