The Ubuntu source command is used to make the configuration information set in the file take effect immediately without restarting. This article will give you a tutorial on Ubuntu using the source command to execute files.
source command usage:
source filename or. Filename
The source command has another use in addition to the above. It is often necessary to enter a long list of commands when compiling the system kernel, such as:
make mrproper
make menuconfig
make dep
make clean< Br>
make bzImage
…………
If you make these commands into a file and let it execute sequentially, it is necessary to repeatedly compile the system core multiple times. Users will be very convenient, and you can do this with the source command. Its role is to execute the contents of a file as a shell, first in the Linux source code directory (such as /usr/src/linux- 2.4.20) Create a file, such as make_command, and type in the 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.m Ap /boot &&
vi /etc/lilo.conf &&
lilo -v
After the file is created, each time the kernel is compiled Just type in /usr/src/linux-2.4.20:
source make_command
Just fine, if you are not using lilo to boot the system, you can remove the last two lines. , configure your own bootloader to boot the kernel.
By the way, the && command indicates that the command connected by it is executed sequentially, but the command following it can be executed only after the successful execution of the previous command.
In addition, if the command command is not executed when the source command is executed, it is because the environment variable is not configured. You can fix it by running the following command in the terminal:
export PATH=/usr/local/Sbin: /usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin
The above is the tutorial for Ubuntu to use the source command to execute the file. I have listed an example, I hope that users can actually experience it.
Many people do not understand the swap swap partition of Linux, do not know what is
For a file system mounted on a Linux system, it is usually impossible to uninstall.
vim is a text editor, can be used in Linux systems, for the use of Linux commands can refer to the s
For beginners, Linux system commands are the main learning content. In many Linux c
Linux Tips for Installing Perl Modules in CPAN
Linux system how to configure rdate time server
How Linux changes the MAC address in the virtual machine
Tips for setting up IPv4 in Ubuntu system
Linux software lacks dynamic link library. So what to do?
Linux file default permissions and hidden permissions resolution
Ubuntu system configuration Ruby On Rails development environment method
The difference between Apache and Tomcat in Linux system is
How does Ubuntu recover the GNOME Panel that was accidentally deleted?
How Linux uses the kill command to force a process to terminate
5 ways to quickly improve the memory usage efficiency in Windows
Windows 8 will be released in 2012? Have a play
How to handle Win7 desktop icon display slowly?
Precautions for installing WIN7 system (1)
Solving Vista Cannot Display Hidden Folders Issue
XP System Disc Action: Thoroughly remove junk files
How to solve XP/Win7 files can not access the sharing problem
Windows XP shutdown failure full contact
Windows 7 startup animation will not support customization
Computer master teaches you how to maintain the Win7 system yourself