Usage of the source command in Linux

Source: Internet
Author: User

SOURCE command:

The source command, also known as a Point command, is a dot symbol (.). The source command is typically used to re-execute the initialization file you just modified to take effect immediately without having to log off and log back on. Because all of the Linux operations will become the file format exists.

Usage:

SOURCE filename or. FileName

The source command has a different purpose than the one used above. It is often necessary to enter a long list of commands to compile the system core, such as:

Make Mrproper

Make Menuconfig

Make DEP

Make clean

Make Bzimage

............

If you put these commands into a file, let it automatically sequential execution, for the need to repeatedly compile the system core users will be very convenient, and with the source command can do this, it is the role of a file as a shell to execute, first in the Linux source code directory (such as/ usr/src/linux-2.4.20) Create a file, such as Make_command, in which to enter 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.map/boot &&

Vi/etc/lilo.conf &&

Lilo-v

Once the file is set up, each time you compile the core, you only need to enter it under/usr/src/linux-2.4.20:

SOURCE Make_command

Then, if you are not using LILO to boot the system, you can remove the last two lines and configure your own bootloader to boot the kernel.

By the way, the,&& command indicates that the command to which it is connected is executed sequentially, but only after its previous command has completed successfully does it continue to execute the commands that follow it.

Usage of the source command in Linux

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.