Adding a Directory to the Path

PATH=$PATH:path1:path2....
export $PATH

Adding to a Single User's Path

following two lines to the end of the .bash_profile file:
PATH=$PATH:/data/myscripts
export PATH

Adding to All Users' Paths (except root)


following 2 lines of code at the bottom of /etc/profile:

PATH=$PATH:/data/myscripts
export PATH


Adding to the Path of User root

root is not affected by the path settings in /etc/profile.  It should be /root/.bash_profile


Comments

Popular posts from this blog

周末发现的两样东西,和心理有关的。

QStringList related performance