Jay Hart escreveu: > I use bash as my shell. > > I'm trying to set the bash prompt to display: > > ttyC1 [EMAIL PROTECTED] > > I've created a .bashrc in the users home directory (in this case root), and > used the following line: > > PS1="\l [EMAIL PROTECTED] #" > > When I login as root, or any other user for that matter, the default prompt is: > > -bash-3.2# > > the only way so far that I found to change the prompt is to type 'bash' at the > prompt after login. This is ok, but I know that this should work the first > time I login, without having to issue a standalone command. > > I've come to the conclusion that I need to modify another file within the /etc > directory, but what? > > TIA, > > Jay > > I use the following /etc/profile that will provide a prompt for various shell's. Also set some nice variables:
export MANPAGER="/usr/bin/less" export SVN_EDITOR="/usr/local/bin/emacs" export PKG_PATH="ftp://ftp.openbsd.org/pub/OpenBSD/4.2/packages/i386/" if [ "$SHELL" = "/bin/pdksh" ]; then PS1='! $ ' elif [ "$SHELL" = "/bin/ksh" ]; then PS1='[EMAIL PROTECTED]:\w\$ ' elif [ "$SHELL" = "/bin/zsh" ]; then PS1='[EMAIL PROTECTED]:%~%# ' elif [ "$SHELL" = "/bin/ash" ]; then PS1='$ ' else PS1='[EMAIL PROTECTED]:\w\$ ' fi I've used to change the root shell to bash in the past. This isn't as good as it sounds. I run into problems when upgrading. I prefer create a normal user with sudo privileges and this user having bash as shell. This is much better. My regards, -- Giancarlo Razzolini Linux User 172199 Red Hat Certified Engineer no:804006389722501 Moleque Sem Conteudo Numero #002 Slackware Current OpenBSD Stable Ubuntu 7.04 Feisty Fawn Snike Tecnologia em Informatica 4386 2A6F FFD4 4D5F 5842 6EA0 7ABE BBAB 9C0E 6B85 [demime 1.01d removed an attachment of type application/pgp-signature which had a name of signature.asc]