PDA

View Full Version : [SOLVED] stop displaying the current working directory?



bronquel
October 12th, 2010, 03:35 AM
I'm working in a directory that has a number of parent directories, and this is cluttering up my command line.
here is an example:
bronquel@bronquel-laptop:~/Dropbox/alg exp2/Exploration 2 Algorithm Efficiency/perl sorts$

how can i stop displaying the current working directory?

something like this is what i want:
bronquel$
or
bronquel-laptop$

I've tried googling this, but my google-foo is failing me today (i keeping getting information about 'pwd')

thanks!

bronquel
October 12th, 2010, 03:58 AM
http://www.computing.net/answers/unix/how-to-set-my-prompt-to-display-current-directory/1106.html was the answer.

to set only the computer name to be displayed:
PS1="`uname -n`\$ "
to set only your user name to be displayed:
PS1="$LOGNAME\$ "

CharlesA
October 12th, 2010, 03:59 AM
You have to change the PS1 prompt in .bash-rc.

Check here (http://ubuntuforums.org/showthread.php?t=614743).

bronquel
October 12th, 2010, 03:59 AM
how do i mark that this is solved?

CharlesA
October 12th, 2010, 04:00 AM
It's under thread tools. :)

bronquel
October 12th, 2010, 04:03 AM
Thanks mate!