Score:0

System wide custom bash prompt

bj flag
  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.

muru avatar
us flag
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`.
bilogic avatar
bj flag
thanks for the explanation
Score:0
bj flag

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.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.