Userx Xbw <use...@gmail.com> writes:
> I get the # when ever I log into terminal as su
> how do I change it to show [root@domanName]currentDir# ?
> I've added a /etc/bashrc and this inside of it.
>
> #if [[ $EUID == 0 ]] ; then
>
> if [[ id == 0 ]] ; then
>
> export PS1="\[\e[41m\]\u\[\e[m\]@\[\e[41m\]\h\[\e[m\]\w# "
>
> else
> export PS1="\u@\h\w $"
> fi
>
> this only shows
> [\u@\h:\w] $
>
> and changes the shell to sh no longer giving me history using the arrows on
> the keyboard.
>
> what file and where did you (void creators) hide it so I can modify it to
> get it to show a prompt I like more better then just #
>
> and why it is such a hard subject to find an answer to on the internet?
Set your root shell to bash, not sh.
And the test should be [[ $EUID == 0 ]].
Or use '\$' in PS1 to get # or $ depending on uid.
--
Christian Neukirchen <chneuk...@gmail.com> http://chneukirchen.org