Matthew Rosewarne on 24 Jun 2007 06:53:35 -0000 |
On Sunday 24 June 2007, Doug Crompton wrote: > I should know this but at the moment it slips me... how do I allow access > to binary files, scripts, etc. in the user directory without having to > specify ./xxxxx ??? A shell variable named PATH contains a list of directories. Any file that is executable under the directories listed PATH can be used without the need to explicitly specify its location. Generally, the most common place for a user to keep their own executables is in a folder called /home/<username>/bin. To add this directory to your PATH, and a line like this: export PATH=$PATH:$HOME/bin to /home/<username>/.profile or /home/<username>/.bashrc (or the file for whatever shell you use). Make sure you keep $PATH _before_ any other paths, so it will get precedence. This will make sure that some malicious user cannot override the locations of any executables already on your system. If you need to temporarily add some folder to your path, enter a line like this into your shell: export PATH=$PATH:/some/place %!PS: The syntax may vary, depending on what shell you use. The examples here are for bash. Attachment:
signature.asc ___________________________________________________________________________ Philadelphia Linux Users Group -- http://www.phillylinux.org Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce General Discussion -- http://lists.phillylinux.org/mailman/listinfo/plug
|
|