After linux is installed, modify the default boot item
After the linux system is installed, the default boot item is changed to linux when the system is started, which makes many people who often use the windows system crazy: press the power key, open the phone, brush Weibo, and look at the circle of friends, when I looked up again, I had to choose to restart again in the face of the password input interface. So how do I modify the default boot item? What we need to do is modify the GRUB stuff. STEP (take Ubuntu as an example): 1. Enter the system and observe the items in the startup items of your windows system during startup. When the system is enabled, open the terminal. (Method: Baidu) 2. Enter "sudo gedit/etc/default/grub" in the terminal to open the grub file. 3. find the line "GRUB_DEFAULT = 0" in the document (or it may not be 0). If the windows system is the nth item at startup, change the value of 0 to n-1 (because the sequence number starts from 0 ). Save and exit. What? Unable to save? Check whether sudo is not input in step 2. 4. Enter "sudo update-grub" in the terminal, press enter, and wait for several seconds. 5. Restart to see if it works. Note: 1. boot Process (from laruence) 1. load BIOS hardware information and perform self-testing, and obtain the first device that can be started based on the settings; 2. read and execute the boot Loader (grub, spfdisk, and other programs) of MBR in the first boot device. 3. based on the boot loader settings, the Kernel starts to detect the hardware and load the driver. 4. after the hardware driver is successful, the Kernel will call the init program, and the init will obtain the run-level information; 5. init execution/etc/rc. d/rc. sysinit file to prepare the job environment for software execution (such as network and time zone); 6. init executes the run-level startup of each Service (script Mode); 7. init execution/etc/rc. d/rc. local file; 8. init executes the terminal simulation program minget Ty to start the login program, and finally wait for the user to log on. sudo usage The sudo command execution process is that the current user switches to the root (or another user specified to switch to), and then runs the command as root (or another user specified to switch, after the execution is complete, it is directly returned to the current user. The premise is that the sudo configuration file/etc/sudoers must be used for authorization. When we do not have the permission to perform some actions, you can try to use the sudo command.