- # Shutdown-r now
- # Init 6
Based on the preceding commands, you can use shell commands to perform normal shutdown and restart system operations.
After learning how to switch the host, I learned about the folders in the root directory of the system. Their responsibilities are as follows:
/Bin stores common user commands
/Boot storage core, module image, and other files required for startup
/Dev stores Device Files
/Etc storage service configuration directory and file
/Home stores the home Directory
/Lib stores library files, such as core modules and drivers
/Lost + found stores orphan files for fsck
/Common mount points used by the mnt system to load the File System
/Opt third-party tool installation directory
/Proc Virtual File System, including system information and other materials
/Root user's home directory
/Sbin command for Storage System Management
/Tmp temporary file storage point
/Usr stores files and directories directly related to users.
/Var data that may be changed during system operation
The specific functions of these folders are roughly understood. In this way, we can conveniently manage files and system management and maintenance in the future.
After learning about the general functions of folders in this directory, you can learn about user permissions.
User Permissions generally involve permission types and user groups;
Permission types include r (read permission), w (write permission), x (Execution permission), and two adventure bits (s, t) these two are not very important at the beginning. I will not introduce them in detail. They involve three concepts: setu id, set gid, and sticky.
The numbers are: R-4; W-2; X-1; setuid-4000; set gid-2000; sticky-1000
Then, we will understand the concepts of file owners, user groups, and other users. These three concepts are three important concepts that we need to understand when processing the permissions of folders or files.
U-file owner: We will assume that the owner of the file I created is me. We can say that this statement is half the same. This statement is designed to be the root user's right to change the file owner. The command is chown.
G-file group. Of course, this can also be changed by the root user. The command is chgrp.
O-other users. This is the user who is neither the file owner nor the file owner group.
A-a collection of file owners, file groups, and other users!
Through the above information, we can understand the permissions of the file. Next we will introduce the object type identification;
File type identifier:
-General Files
D directory file
Block B Device Files
C character Device File
L link file
P manual Pipeline
Here is an example for your understanding:
If we have a file named "install. log", you can enter # ls-l install. log in the shell to view some related information about it. As shown in:
The displayed-rw-r -- root indicates that the file is a common file, the file owner is root, and the file owner group is root, the file owner has read and write permissions, but has no execution permission. The members of the file group and other users have only the read permission on the file.
If we want to change the permission of the group to which the file belongs to read/write, we can execute the following command:
The execution result is as follows:
< p>
2.
< p>
3.
Common File Operation Commands include cp, rm, mv, ln, find, and touch.
Directory operation commands: ls, pwd, cd, mrdir, rmdir
Some Usage and Parameter Details of these commands. There are corresponding help documents in linux, which can be called using the following method:
Command -- help
Man command
The help information obtained by man is more detailed than that obtained by help. Therefore, we recommend the man command.
There are also some commands such as whereis, which, and who.
Linux has a variety of operations and is interesting. This article only records my first week of linux system access. Sorry for the poor writing!