# No pathname on command line

1. Jul 27, 2007

### J77

How do I set my system so that the entire pathname doesn't appear on the command line -- just the directory I'm in?

eg. at the moment:

me@me:/~$dir1/dir2/dir3 What I want is: :dir3/ (I know I'm me ) 2. Jul 27, 2007 ### CompuChip On what system? In Ubuntu I know you would edit the$1 variable in the bash config file (~/bashrc or ~/.bashrc or something like that). It determines what shows up on the command line. I'm on a Windows system now thought, so I can't test it.

3. Jul 27, 2007

### J77

Sorry -- yes, ubuntu

.bashrc worked, thanks :)

Last edited: Jul 27, 2007
4. Jul 27, 2007

### caslav.ilic

The prompt appearance is set by PS1 environment variable. You can play with it in the current terminal window to get it to behave as you would like, and then write it for good into ~/.bashrc. The explanation of all elements and a few examples are given at http://tldp.org/HOWTO/Bash-Prompt-HOWTO/bash-prompt-escape-sequences.html

However...

...this is a bold claim :)

Experience in Unix shell usage is decades long, and the default settings reflect that. They are best left untouched unless one really knows what he is doing. Several years ago, I had the exact same "hey, it's too long" urge to change the shell prompt, and guess what, these days I am using the default prompt (note that in the final example on the link above, the user set yet even longer prompt).

--
Chusslove Illich (Часлав Илић)

5. Jul 27, 2007

### J77

Thanks Chusslove.

Indeed, I played with the PS1 = ... and got it as I wanted: just a \$ on the command line with the full path in the xterm title

6. Jul 27, 2007

### CompuChip

Err, that's what I meant