Other Help Topics :: adding to the PATH



Hello y'all,

this is part of my ~/.bashrc:

export PATH=/home/dsl/dist/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/usr/local/sbin:/usr/local/bin:/usr/games:.:.
export LD_LIBRARY_PATH=/home/dsl/dist/lib

(Funny thing is: there is no /home/dsl/dist/bin but that's not my question)

My question: i want to add to the path (i keep my scripts at: /cdrom/keep/scriptjes which i want to 'find' more easily. Right now i have to type in the whole patch in a term).


How? Where in the line? (back/front)

Tried it, worked...
Good. :D

Each path is separated by a colon, and they are searched in the order they are listed in the PATH variable, so if you have a 'ls' command in /cdrom/keep/scriptjes that you want to use as default, then /cdrom/keep/scriptjes should be first in the list so your personal version is found first.

Also, setting PATH in your personal bash configuration doesn't usually require such a long string.  Most of those paths are already set in /etc/profile, so they can be replaced with "$PATH":
export PATH="/cdrom/keep/scriptjes:$PATH"


original here.