The source command is also called & ldquo; the dot command & rdquo;, that is, a dot symbol (.). The source command is usually used to re-execute the modified initialization file to make it take effect immediately without logging out and logging on again. Usage: The sourcefilename or. filenamesource command has another usage besides the preceding usage. When compiling the system core, you often need to enter a long string of commands, such as makemrpropermakemenucon.
The source command is also called the "dot command", that is, a dot symbol (.). The source command is usually used to re-execute the modified initialization file to make it take effect immediately without logging out and logging on again.
Usage:
Source filename or. filename
In addition to the preceding usage, the source command has another usage. When compiling the system core, you often need to enter a long string of commands, such:
Make mrproper
Make menuconfig
Make dep
Make clean
Make bzImage
............
If you make these commands into a file and execute them in sequence automatically, it is very convenient for users who need to recompile the core of the system multiple times. You can use the source command to achieve this, its role is to take the content of a file as shell to execute, first in the linux source code directory (such as/usr/src/linux-2.4.20) to create a file, such as make_command, enter the following content:
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
After the file is created, each time you compile the core, you only need to input the following in the/usr/src/linux-2.4.20:
Source make_command
If you are not using lilo to boot the system, you can remove the last two lines and configure your own boot program to boot the kernel.
By the way, the & command indicates that the commands connected by it are executed sequentially, but the commands following it can be executed only after the previous commands are successfully executed.
In addition, if the command not found prompt is displayed when the source command is executed, the environment variable is not configured. You can fix the problem by running the following command on the terminal:
Export PATH =/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin
For more information about Ubuntu, see Ubuntu special page http://www.linuxidc.com/topicnews.aspx? Tid = 2
This article permanently updates the link address: Http://www.linuxidc.com/Linux/2015-07/119829.htm