Modify the default boot entry after installing the Linux system

Source: Internet
Author: User

After installing the Linux system, the default startup item becomes Linux when booting, which makes many students who often use Windows system feel crazy: Press the power button, open the phone, brush micro bo, look at the circle of friends, and then look up, face the input password interface, had to choose to restart again.

So how do I change the default boot entry? What we need to do is to modify grub this stuff.

Steps (take Ubuntu system as an example):

1. Enter the system, pay attention to watch your Windows system when the boot entry is the number of items, when the system opens the terminal. (Method self-Baidu)

2. Enter "sudo gedit/etc/default/grub" in the terminal to open the grub file.

3. The "grub_default=0" line is found in the document (it may not be 0), if the Windows system is the nth item when booting, change this 0 to n-1 (because the sequence number is 0). Then save the exit.

What the? Can't save it? Look at step 2 when it is not the input sudo.

4. Continue typing "sudo update-grub" in the terminal, enter, wait several seconds.

5. Reboot to see if it's OK.

Comments:

I. Start-up process (from Brother Bird)

1. Load the hardware information of the BIOS and conduct self-test, and obtain the first bootable device according to the setting;
2. Read and execute the boot Loader (i.e. grub, spfdisk, etc.) of the MBR in the first boot-up device; (where we want to change)
3. Load Kernel According to boot loader settings, Kernel will start to detect hardware and load drivers;
4. After the hardware driver is successful, Kernel will actively call the INIT program, and INIT will get run-level information;
5. Init executes the/etc/rc.d/rc.sysinit file to prepare the operating environment for the software execution (e.g. network, time zone, etc.);
6. Init executes the start of each service of Run-level (script mode);
7. Init executes the/etc/rc.d/rc.local file;
8. Init execution terminal emulator Mingetty to start the login program, and finally wait for the user to log in;

Two. Usage of sudo

The process of sudo executing a command is that the current user switches to root (or the other user specified to switch to), executes the command as root (or another specified switch to the user), and then returns directly to the current user after execution is completed, which is premised on the configuration file of sudo/etc/ Sudoers to authorize;

When we do not have permission to do some action, you can try the sudo command.

Modify the default boot entry after installing the Linux system

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.