In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/03 Report--
Overview of Linux
Linux, whose full name is GNU/Linux, is a set of Unix-like operating system that is free to use and spread freely. It is a multi-user, multi-task, multi-thread and multi-CPU operating system based on POSIX and Unix. With the development of the Internet, Linux has received support from software enthusiasts, organizations and companies all over the world. In addition to maintaining a strong momentum of development in servers, it has made great progress in personal computers and embedded systems. Users can not only intuitively obtain the implementation mechanism of the operating system, but also modify and improve Linux according to their own needs to maximize meet the needs of users.
Shell is the user interface of the system, which provides an interface for users to interact with the kernel. It receives the command entered by the user and sends it to the kernel for execution.
System running level 1. Linux system startup process
To get into single-user mode, we first need to understand the startup process of the system and confirm which step we are taking. Only by understanding can you really master it, and say goodbye to rote memorization.
Power on: for virtual machines, click the run button. BIOS self-test: this step is mainly to perform various scans, confirm the boot mode and boot, such as hard disk, CD-ROM, network, etc. Grub boot menu: if you already have a working operating system on your hard drive, you will enter the boot menu. This step is critical for us, because the next step is to load the kernel to start the init process, and then run the system according to the specified run level. If we want to temporarily change the boot level of the system and enter single-user mode, we have to do it in the boot menu. Load kernel: the system reads the relevant files under the / boot directory, loads the system core content init process: initialization process, which is used to initialize the system environment to determine the running level: make the system run user login at a specified level according to the configuration: enter the user name and password to log in and execute the login script: execute the script after user login according to the user's configuration information (which will be further introduced in the user management article) 2. Related profile / boot/grub/grub.conf:grub Boot menu configuration File
You can modify the countdown read seconds of the boot menu in this configuration file, corresponding to the configuration item: timeout.
You can also configure startup menu encryption in this file, corresponding to the configuration item: password. (will be introduced in the single-user encryption article)
/ etc/inittab: configure behaviors and commands under each run level, and can also be used to modify the default run level of the system
The content format of the configuration file is as follows:
Id:runlevels:action:process
Id is a custom name that is required to be unique within the file and is no more than four characters long.
The scope of runlevels is consistent with the running level of the system, and multiple can be specified at the same time.
Action represents the behavior to be performed at the specified level, which is a fixed value. Specifies that the configuration of the default run level after system startup is: initdefault.
The process section is used to specify the specific command to be executed, which can be omitted when action is specified as initdefault.
3. Run level list
Use the content in / etc/inittab directly for comparison.
0: shutdown 1: single user 2: multi-user (no NFS) 3: complete multi-user mode 4: not in use 5: graphical interface 6: restart 4. Default run level
If you need to change the default run level, just change the original line in the configuration file to the number corresponding to the target level. For example, if you change the default run level from graphical interface to full multi-user mode, change 5 to 3.
# original content id:5:initdefault:id:3:initdefault: 2. Reset password in single-user mode. Press any key to enter the grub menu when you start up and read seconds.
Press e to enter the editing interface when prompted
Select the second item: kernel, continue to press e to edit
At the end, enter: [space] 1 [enter]
Go back to the menu interface and press b to start
After startup, you will enter single-user mode, and you can use the passwd command to reset the root user password directly.
In the password input state, the cursor will not produce any change, which is a normal phenomenon. Enter after the input is completed.
After the password modification is completed, restart with the reboot command, and the system will re-enter the default run level.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.