1. User Management
add
useradd Username : By default, a user to create a directory in your home directory
passwd username : Enter password
useradd username -d / home / directory : Create a user and then specify the user's home directory
delete
userdel username : just delete the user but does not delete the home directory
userdel -r username : delete to delete the user's home directory associated with
switching users:
SSH host the -l username -p 22
For example: ssh -l tom -p 22 192.168.17.131
su - username
2. group management
add
groupadd group name
useradd username -g group name
deleted
groupdel Group Name
Note: If there are users in the group, not deleted
3. permissions files:
regular files: including text files, data files, executable binary files.
Directory file: Linux system as the directory is a special file, using the tree structure which constitutes file system.
Device file: Linux system to each device as a file
list by ll show
to start is d directory file
start with - an ordinary document
file permissions nine three groups of three letters
first group represents is the current user's permissions
second group represents the rights group's
third group represents the rights of other users
r: read 4
w: write 2
the X-: 1 implementation of
the change file or directory permissions chmod.
755 a.txt the chmod
the chmod = rwx U, G = RX, RX = O a.txt
the chmod 000 a.txt /
★ the chmod 777 a.txt
understanding: chown change file or directory of documents relevant to the user and group
chown u1: public a .txt : change the current directory or file belongs to the user and group
chown -R U1: public dir : their user and group all of the files and subdirectories in the directory to change
the format:
chown user: group file