Change bash prompt for user only
On my lfs system I have a prompt root [ ~ ] in red. The user has a prompt of -bash-4.1$. Is it possible to change the user prompt only to something else I,E hostname $. I know that this can be done temporary by
Code:
PS1="\h $" I have googled but cant find exact answer i,m looking for. I would just like to say that this project has opened my eyes. Druuna I take my hat of to you for the amount of effort & time you put in to helping ppl i Thank you |
Edit the user's .bashrc (in the user's home directory). root will not be effected.
|
Assume root, and then:
Code:
echo "export PS1='\h:\w$ '" >> /home/USERNAME/.profile Note that ~/.profile is only read by Bash if ~/.bash_profile and ~/.bash_login do not exist, and only one of the three is automatically executed during Bash startup. The order of precedence is as follows.
Bash Reference Manual, 6.2 Bash Startup Files Edit: This may only take effect at the user's next login. |
Hi,
@spiky0011: You "only" installed LFS, the goodies (including LFS configuration) are done in BLFS. Have a look: BLFS, especially this chapter: 3 - After LFS Configuration Issues. Hope this helps. |
Yes I have started on blfs thks druuna Dose that mean I cant ask qestions in this forum, if not then i,m sorry for posting here.
|
Hi,
Quote:
Quote:
|
All times are GMT -5. The time now is 11:30 PM. |