Linux Lite Forums

Development => Scripting and Bash => Topic started by: dave61430 on July 05, 2018, 10:37:28 AM

Title: Bash Prompt
Post by: dave61430 on July 05, 2018, 10:37:28 AM
Running a trial of LL on both a virtual machine and live boot, I cannot change the prompt. PS1="\$ " works on any other distribution I've used but not on LL. No error message, just no change. Even put it in .bashrc. I've checked shell and it is bash. Any ideas or is this a bug.
Currently using Mint 18.3, but seriously considering LL.
Title: Re: Bash Prompt
Post by: bitsnpcs on July 05, 2018, 03:10:10 PM
Hello dave61430,

it can be changed on desktop installed LL 3.2 , LL 4 series uses different terminal, maybe a member using 4 series can try also ?


^Here I backup default prompt, echo backup to check it is correct, change prompt to PS1="\$ ", run cal to show new prompt holds after additional command, then restore to the backup of default prompt.
Title: Re: Bash Prompt
Post by: thomasd on June 26, 2019, 08:02:24 PM
I have the same problem, running LL 4.4, I cannot change the bash prompt in any terminal.  I've tracked it through all the normal config files and changed everything I thought might have an effect, to no avail.

One suspicious thing, the definition for PS1 when you echo it is fully expanded:
Code: [Select]
 thomasd  ~  echo $PS1
\[\] thomasd \[\] \[\]~ \[\] \[\]
 thomasd  ~  

so it looks like some service somewhere is setting PS1 in the background.

Title: Re: Bash Prompt
Post by: trinidad on June 29, 2019, 04:58:35 PM
Not quite sure of your question here. Are you saying you are running the "live" ISO or an installed system? You can certainly customize the prompt on any Linux/Unix system ... except for many "live" ISOs and "safe" mode mods.

Title: Re: Bash Prompt
Post by: Jerry on June 30, 2019, 12:59:21 PM
Thread hijacks don't require a response other than from a Mod to delete said post. Thanks TC.

Sent from my Phone using Tapatalk

Title: Re: Bash Prompt
Post by: zeozod on April 24, 2020, 09:19:10 PM
There is a shell variable PROMPT_COMMAND that is interfering with all of the normal means of setting the bash shell prompt. The following in your .bashrc should fix it.