There has been a similar discussion about this herehere.
I take a bit of a different approach. Instead of just accepting the PATH that is set from all the different initialization files that get installed, I prefer using getconf to identify the system path and place it first, then add my preferred path order, then use awk to remove any duplicates. This may or may not really speed up command execution (and in theory be more secure), but it gives me warm fuzzies.
# I am entering my preferred PATH order here because it gets set, # appended, reset, appended again and ends up in such a jumbled order. # The duplicates get removed, preserving my preferred order. # PATH=$(command -p getconf PATH):/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin:$PATH # Remove duplicates PATH="$(printf "%s" "${PATH}" | /usr/bin/awk -v RS=: -v ORS=: '!($0 in a) {a[$0]; print}')" export PATH [~]$ echo $PATH /bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/usr/lib64/ccache:/usr/games:/home/me/bin