Re: Setting the shell prompt to display directory path information.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



* 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@xxxxxxxxxx
  http://www.ifi.uio.no/~jonhaug/, Phone: +47 22 85 24 92


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux