pavement

PATH

From FreeBSDwiki
(Difference between revisions)
Jump to: navigation, search
Line 1: Line 1:
PATH in unix is the same as in DOS; the directories that your shell/command line interface checks for commands in. This can be set to a default in your [[skeleton_file]] or it can be set in your [[shell]] [[.profile]] or you can set it from the command line itself. You'll need to run the command ''set PATH'' and export the PATH; doing it this way means that you will not save your new path -- it'll be lost once you log out or reboot the machine.
+
PATH in unix is the same as in DOS; the directories that your shell/command line interface checks for commands in. This can be set to a default in your [[skeleton_file]] or it can be set in your [[shell]] [[.profile]] or you can set it from the command line itself. You'll need to run the command ''set PATH'' and export the PATH; doing it this way means that you will not save your new path -- it'll be lost once you log out or reboot the machine. You can see your current PATH by asking the shell to [[echo]] it:
 +
 
 +
'''samizdata#''' echo $PATH
 +
/sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr/local/bin:/usr/X11R6/bin:/root/bin
 +
'''samizdata#''' logout
 +
'''dave@samizdata:~%''' echo $PATH
 +
/sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr/local/bin:/usr/X11R6/bin:/home/dave/bin
 +
'''dave@samizdata:~%'''

Revision as of 15:43, 7 October 2004

PATH in unix is the same as in DOS; the directories that your shell/command line interface checks for commands in. This can be set to a default in your skeleton_file or it can be set in your shell .profile or you can set it from the command line itself. You'll need to run the command set PATH and export the PATH; doing it this way means that you will not save your new path -- it'll be lost once you log out or reboot the machine. You can see your current PATH by asking the shell to echo it:

samizdata# echo $PATH
/sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr/local/bin:/usr/X11R6/bin:/root/bin
samizdata# logout
dave@samizdata:~% echo $PATH
/sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr/local/bin:/usr/X11R6/bin:/home/dave/bin
dave@samizdata:~%
Personal tools