| source命令(从 C Shell 而来)是bash shell的内置命令。点命令,就是个点符号,(从Bourne Shell而来)是source的另一名称。 source命令通常用于重新执行刚修改的初始化文件,使之立即生效,而不必注销并重新登录。  source返回文件最后一个命令的返回值,如果文件不能读取则会失败。 语法格式:source [文件] 参考实例 读取和执行/root/.bash_profile文件: [root@linuxcool ~]# source ~/.bash_profile 执行刚修改的初始化文件,使之立即生效: [root@linuxcool ~]# source /etc/bash_profile  在一些工具的执行过程中,会把环境变量设置以”export XXX=XXXXXX”或”declare XXX=XXXXXX”的形式导出到 一个文件中,然后用source加载该文件内容到执行环境中: [root@linuxcool ~]# vi /etc/profile 
[root@linuxcool ~]# source /etc/profile 如果把这些命令做成一个文件,让它自动顺序执行,对于需要多次反复编译系统核心的用户来说会很方便,而用source命令就可以做到这一点,它的作用就是把一个文件的内容当成shell来执行,先在linux的源代码目录下(如/usr/src/linux-2.4.20)建立一个文件,如 make_command,在其中输入一下内容:  make mrproper && make menuconfig && make dep && make clean && make bzImage && make modules && make modules_install && cp arch/i386/boot/bzImage /boot/vmlinuz_new && cp System.map /boot && vi /etc/lilo.conf && lilo -v 文件建立好之后,每次编译核心的时候,只需要在/usr/src/linux-2.4.20下输入: [root@linuxcool ~]# source make_command |