Gnome Terminal: Show only current directory at prompt?
In gnome terminal how do I prevent a long list of directories being displayed at the prompt and have only the current directory showing?
i.e. user@hostname:/dir3$ instead of user@hostname:/dir1/dir2/dir3$ |
You need to set the PS1 environment variable to your liking. It's likely being set in .bashrc, maybe read /usr/doc/Linux-HOWTOs/Bash-Prompt-HOWTO (I think that's where it is in Fedora) for instructions.
|
A quick search turned up:
http://www.comptechdoc.org/os/linux/tips/tipsps1.html And from reading it looks like \W is what you need. Add (or edit) the PS1 entry in ~/.bashrc to be similar to: Code:
export PS1='\u@\h:\W$ ' |
Cheers. I did do a search on google and I found what I was after. Been experimenting with it.
|
Quote:
|
|
All times are GMT -5. The time now is 10:50 PM. |