Experiment content: File operation and user operation experiment
Lab equipment (Environment): PC, Vmware WorkStation
Experimental steps:
First, create a new user Bob
Purpose: Practice Useradd commands
Second, set the password for new user Bob
Purpose: Practice passwd commands
Third, go to the/home directory to see if there is a Bob user's main directory
Purpose: Practice CD command with the LS command
Iv. Log off the current root user and log in with the Bob user name
Purpose: To check if the Bob user successfully created
V. Become a superuser with Bob's identity
Purpose: To practice the SU command
all the experiments in the back Bob Log on as a superuser, but you need to turn it into a super user.
Six, 1. Create subdirectories named Work-1, Work-2, and work-3 under the root directory (/)
2. Create the exam subdirectory under the Work-1 directory
Purpose: Practice mkdir commands
Create Exam-1.txt and Exam-2.txt files under the Work-1 directory.
Purpose: Practice Touch commands
Viii. Copying files
Purpose: Practice CP command
1. Copy the file Exam-1.txt under the Work-1 directory to the/work-1/exam directory.
2. Copy all files and subdirectories under the Work-1 directory to the/work-2 directory.
Ix. Moving files
Purpose: Practice MV command
1. Move the file exam-2.txt under the Work-1 directory to the/work-3 directory.
If you want to copy all of the sub-files and their subdirectories in a directory, to add the-r option, and all the "*" to replace, NOTE: * and * * is not the same, * represents all, including subdirectories and sub-files, but * * can only replace all sub-files.
X. Deletion of files
Purpose: Practice RM command
1. Delete the file exam-1.txt under the/work-1/exam directory.
2. Delete all files in the/work-1 directory.
Xi. Deleting a table of contents
Purpose: Practice RMDIR commands
1. Delete the/work-1 directory.
2. Delete/workd-3 Directory
12. Display the current directory
Purpose: Exercise the PWD command to view the full path of the current working directory starting at the root directory.
13. See which users are currently on the system
Purpose: Practice the cat command to view the contents of the/etc/passwd file
14. See which user groups are present on the system
Purpose: Practice the cat command to view the contents of the/etc/group file
XV, create a user group named Rose
Purpose: Practice Groupadd commands
16, the creation of two users, named Alice and Ivy, respectively, the alias is "Alice.lee" and "Ivy.tang", the login shell is/bin/bash, where Alice Log in to the home directory for/home/alice,ivy login is/ Home/ivy, specifies that the user groups to which the two users join are Rose
Purpose: Practice Useradd commands and related parameters
17, then create a user, named Baby, the alias is "Baby.chen", the login shell is/bin/bash, log in the home directory is/home/baby, joined to the user group Peter.
18. Delete User ivy and its user login home directory.
Purpose: Practice Userdel commands
19, modify user baby belongs to the user group rose
Purpose: Practice USERMOD commands
20, modify the user baby's password
Purpose: Practice passwd User Name command
Linux Operation Command Experiment