This tip is a shell setup technique that I have stolen from Mandrake Linux. It is only good for people that have heavilly customized their /etc/profile file, so the instructions assume a good deal of terminal knowledge. Instead of having one, monolithic profile file that is littered with different commands and environment settings, you can modularize it into a bunch of tidy, discrete items. You can do this as follows:
- su to root and cd to the /etc directory.
- Create a directory in /etc called profile.d.
- Use your favorite console text editor to add the following lines to the beginning of your profile file:
for PROFILE_SCRIPT in $( ls /etc/profile.d/*.sh ); do
. $PROFILE_SCRIPT
done - Convert all of the commands in your profile file to individual shell scripts, and save them in /etc/profile.d (make sure they end in .sh), and delete them from /etc/profile.
•
[8,313 views]

