[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Setting Prompt



> 
>     OK, I did a search in Debian user's and came up with the the
> following to change my prompt:
> 
> In   /etc/profile  I added the line,
> export PS1='\h:\w\$ '
> 
> This is the readout I got,
> crossyourfingers:~$
> 
> This wasn't what I wanted I only want the current working directory to
> show.  I took a look at the man page for  bash.  It said that "\w" would
> list my working directory.  So I tried the following:
> 
> If I use,
> export PS1='\w:\\$ '
> 
> I get,
> ~:$
> 
> I tried several other combinations, a few I tried,
> \w\
> \w:\w\
> 
> None of these worked.
> 
> Here is what my  /etc/profile  looks like:
> 
> ~:$ cat /etc/profile
> # /etc/profile: system-wide .profile file for bash(1).
> 
> PATH="/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games:/usr/local/netscape:/usr/X11R6/bin:/home/kent"
> 
> 
> 
> export PATH PS1
> export PS1='\w:\\$ '
> setleds -D +num$
> 
> umask 002
> /usr/bin/check-sendfile
> 
> 
> What am I doing wrong here?  I just want my prompt, as a regular user,
> to look something like this:
> /home/kent $
> As root my prompt has the working directory listed.  Where is the file
> for the root prompt?  Maybe I could just look there and figure out how
> to set my regular user prompt?
> Thanks,

Look if there is an environment variable PROMPT_COMMAND. If it is set, it 
blocks the use of PS1. Modify PROMPT_COMMAND or delete it. Take a look at
the manual page of bash, first.


Reply to: