pavement

Path

From FreeBSDwiki
(Difference between revisions)
Jump to: navigation, search
Line 5: Line 5:
  
 
'''NOTE'''
 
'''NOTE'''
Unlike in MS-DOS or Windows, the contents of your path are read once when you open your shell, not dynamically read every time you try to run a program without specifying the full path to it.  So if you add a new program to one of the directories in your path, you'll have to reinitialize your shell before you can run it without having to type its full path in.
+
Unlike in MS-DOS or Windows, the contents of your path are read once when you open your shell, not dynamically read every time you try to run a program without specifying the full path to it.  So if you add a new program to one of the directories in your path, you'll have to reinitialize your shell before you can run it without having to type its full path in. This is done by a) the proper way -- logging out and back in OR b) the lazy way -- [[su]]'ing to your own account.

Revision as of 05:26, 11 September 2004

Just as in MS-DOS, your path will be the directories that the OS will search for commands. Commonly, your path will include: /sbin /bin /usr/sbin /usr/bin /usr/games /usr/local/sbin /usr/local/bin /usr/X11R6/bin /home/[your username here]/bin

WARNING Don't ever, ever, ever, for any reason, put . in your path. Placing whatever your current directory is in your path may be convenient, but it's a delightfully easy way to run the wrong file -- many unix exploits rely on getting a user (or root) to run a trojaned file with the same name as a commonly run file.

NOTE Unlike in MS-DOS or Windows, the contents of your path are read once when you open your shell, not dynamically read every time you try to run a program without specifying the full path to it. So if you add a new program to one of the directories in your path, you'll have to reinitialize your shell before you can run it without having to type its full path in. This is done by a) the proper way -- logging out and back in OR b) the lazy way -- su'ing to your own account.

Personal tools