Setting the shell prompt to display directory path information.
Jon Haugsand
jonhaug at ifi.uio.no
Wed Nov 24 14:21:34 UTC 2004
* David Hodge
> I want to be able to display the full path to where I currently am in
> the file system on the shell prompt like:
>
> [userid/directory/subdirectory/subdirectory] I think that the
> following will do the job:
>
> PS1="[\u\w]"
>
> Now where do I place this setting so that it executes when I or any
> other users logs in to an FC2 server console.
I would think the best place is a possible new file called:
/etc/profile.d/local.sh
/etc/profile.d/local.csh
Both files, the first in bourn shell syntax and the second in C shell
syntax. At least any bourne shell (like bash) will run the
/etc/profile and therein is a loop that reads all files in profile.d
that matches *.sh. Remember to set read access to the files.
--
Jon Haugsand
Dept. of Informatics, Univ. of Oslo, Norway, mailto:jonhaug at ifi.uio.no
http://www.ifi.uio.no/~jonhaug/, Phone: +47 22 85 24 92
More information about the fedora-list
mailing list