The first day of linux study, commonly used commands 1, commonly used linux commands
Basic Principles of linux:
1. composed of a single free applet, the applet is combined to complete the tasks in charge.
2. Everything is a file,
3. Try to avoid capturing user interfaces. That is to say, the user can directly return the results after entering the command.
4. The configuration file is saved in plain text format.
GUI interface: graphical interface
CLI interface: command interface. You must enter the command.
Command prompt: prompt
Root administrator #
Common users $
Commands related to user operations (including adding, modifying, and deleting USER commands)
Command for creating or deleting a user:
Useradd Username
Run the system administrator command to create a new user.
Option:
-D: Create a new user and use the default root directory as the root directory of the new user,
-M: If the directory does not exist, use-m to create a new directory as the root directory of the new user.
-S: Specifies the shell for user logon.
-B: if the default path-d HOME_DIR is not used, the default base directory is used. BASE_DIR and the account name are the main directory. If the-m option is not used, BASE_DIR must already exist.
-C logon description.
-E: the date that the user will be disabled, in the format of yyyy-mm-dd
Userdel [Option] user name delete system user name
Option:
-R: delete all directories of a user.
-F force delete a user. If the user is logged on, the user will not be disconnected from shh after deletion. The user cannot log on again after exiting.
Modify user name:
Usermod [Option]
How to switch users:
Su: switch user
Su [-l] User Name
Su User Name
Change User Password:
Passwd: Password (the password must comply with complex rules)
Common commands:
Ls: list all objects in the specified directory
Option:-l (long). The file details are displayed.
Pwd: displays the current path. /Indicates identifying the root directory of the system