Re: A very simple question
I'll take a crack at this one since I've asked and received an answer to
the very same question.
I use a two-line prompt that tells me who I'm logged on as and at what
machine on the first line and what is the full path to the current directory.
Put this in your ~/.bash_profile or in /etc/profile (for system-wide
default): PS1='<\u@\h>\n<`pwd`>\$ '
Notes: I prefer to use <...> to delineate prompt characters from the
rest of the line, use what you like. The \n is a new line. Some prefer to
use the \w method of getting their current directory. I don't like it
for the simple fact that it truncates your home directory to ~. I like
to see "</home/myuserid>$ " vice "<~/myuserid>$ " on the second line of my
prompt. I also think I've experienced other trouble with \w but I forget
what it was. You can try it instead of `pwd` above and see which you
like best. (Pay attention to the direction of the single quotes!)
On Sun, 17 Aug 1997, George Bonser wrote:
>
> I hate to say this but man bash and read the section about prompts. It
> goes in your ~/.bash_profile
>
>
>
> On Mon, 18 Aug 1997 Zim9781@aol.com wrote:
>
> > Could someone tell me how to setup my linux prompt to display what directory
> > I am in?
> >
> >
> > --
> > TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
> > debian-user-request@lists.debian.org .
> > Trouble? e-mail to templin@bucknell.edu .
> >
> >
>
> George Bonser
>
> Tommy Lasorda for baseball commissioner!
>
>
> --
> TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
> debian-user-request@lists.debian.org .
> Trouble? e-mail to templin@bucknell.edu .
>
>
--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-user-request@lists.debian.org .
Trouble? e-mail to templin@bucknell.edu .
Reply to: