pavement

Path

From FreeBSDwiki
(Difference between revisions)
Jump to: navigation, search
 
Line 2: Line 2:
  
 
'''WARNING'''
 
'''WARNING'''
Don't ever, ever, ever, for any reason, put '''.''' in your path. Placing whatever your current directory is in your path may be convinient, 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.
+
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.

Revision as of 01:21, 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.

Personal tools