On Feb 23, 2008, at 6:29 PM, Jay Hart wrote:

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] #"

So, what happens when you can't log in to the system, delete the bash package or lose your /usr/local/ filesystem? I'd suggest not using that as your root login shell.

When I login as root, or any other user for that matter, the default prompt is:

-bash-3.2#

Try the system bashrc, or fire use .bash_profile.

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.

From the bash(1) 3.2 man page:

       When  bash is invoked as an interactive login shell, or as
       a non-interactive shell with the --login option, it  first
       reads and executes commands from the file /etc/profile, if
       that file exists.  After reading that file, it  looks  for
       ~/.bash_profile,  ~/.bash_login,  and  ~/.profile, in that
       order, and reads and executes commands from the first  one
       that  exists  and is readable.  The --noprofile option may
       be used when the shell is started to inhibit  this  behav-
       ior.


I've come to the conclusion that I need to modify another file within the /etc
directory, but what?

So, what lead to that conclusion? Probably not the man page.

Reply via email to