1. Edit the/etc/profile file to add the following content:
For I in/etc/profile.d/*.sh; Do if [-R ' $i]; then if ["${-#*i}"! = "$-"]; then . "$i" else . "$i" >/dev/null 2>&1 fi fi done
2. Placing related scripts in/ETC/PROFILE.D
[[email protected] ice_test_m profile.d]# ll total 140-rwxr-xr-x 1 root root 764 2009-09-04 colorls.csh-rwxr-xr-x 1 root Root 725 2009-09-04 colorls.sh-rwxr-xr-x 1 root root 2009-09-04 cvs.sh-rwxr-xr-x 1 root root 192 2009-03-25 glib2. Csh-rwxr-xr-x 1 root root 192 2009-03-25 glib2.sh-rw-r--r--1 root root 2012-03-01 java.sh-rw-r--r--1 root root 21 8 2004-09-09 krb5-devel.csh-rw-r--r--1 root root 229 2006-01-20 krb5-devel.sh-rw-r--r--1 root root 218 2004-09-09 krb5 -workstation.csh-rw-r--r--1 root root 229 2006-01-20 krb5-workstation.sh-rwxr-xr-x 1 root root 2959 2009-09-29 lang.csh- Rwxr-xr-x 1 root root 3234 2009-09-29 lang.sh-rwxr-xr-x 1 root root 122 2009-09-27 less.csh-rwxr-xr-x 1 root root 108 20 09-09-27 less.sh-rwxr-xr-x 1 root root 12-23 12:52 motd.sh-rwxr-xr-x 1 root root + 2009-09-20 Vim.csh-rwxr-xr-x 1 Root root 293 2009-09-20 vim.sh-rwxr-xr-x 1 root root 2007-01-07 which-2.sh-rwxr-xr-x 1 root root 12-24 14:20 y um_var.sh
3, simple text information settings
Http://www.blogjava.net/baizhihui19870626/articles/372694.html
The Bash Shell Startup Files
Http://www.linuxfromscratch.org/blfs/view/svn/postlfs/profile.html
Introduction of bird's private cuisine
Http://linux.vbird.org/linux_basic/0320bash.php#settings_issue
Set welcome login information for Linux environment