Linux contains commands executed by the administrator root and commands managed by common users:
Put the commands run by Root in/sbing and/usr/sbin.
All users execute commands in/bin and/usr/bin
By default, there is a built-in user nobody in Linux.
Add User: useradd
Set Password: passwd
Usage: useradd wds
Passwd wds
File View file Type
Command:
Ifconfig to view ip information;
Su-user name and password switch user;
Command name: ls
Command: list
Command path strength:/bin/ls
Execution permission: All Users
Function Description: displays directory files.
Syntax: ls option [-ald] [file or directory]
-A: displays all files, including hidden files.
-L detailed information display
-D. view directory properties.
The information of the file queried by ls-l:
Drwxr-xr-x 2 root 4096 sep 4 13:07 bin
D: indicates the file type. in linux, there are three file types: d file,-executable file, and x soft connection.
R (read) indicates readable, w (write) can be written, and x (execute) can be executed;
U (user) Owner g (group) Owner group o (other) other
Rwx indicates that the owner has these three permissions.
R-x indicates that the Group has two permissions.
R-x indicates the permissions of other users.
2 indicates the number of hardware connections
Root owner
Root group
4096 (inaccurate)
Sep 4 creation or last modification time
Bin file name
Command name: cd
Command: change directory
Command path strength: shell built-in commands
Execution permission: All Users
Function Description: Switch directories.
Syntax: ls [directory name]
You can use the following commands
Command name: pwd
Print working directory
Command path strength:/bin/pwd
Execution permission: All Users
Function Description: displays the current working directory.
Syntax: pwd
Example: $ pwd
/Etc/rc5.d
Command name: touch
Command path strength:/bin/touch
Execution permission: All Users
Function Description: creates an empty file.
Syntax: touch [file name]
Example: $ touch newfile
Command name: mkdir
Make directories
Command path strength:/bin/mkdir
Execution permission: All Users
Function Description: Creates a directory.
Syntax: mkdir [directory name]
Example: $ mkdir newdiw
Command name: cp
Command syntax: copy
Command path strength:/bin/cp
Execution permission: All Users
Function Description: copy a file or directory.
Syntax: cp-R [source file or directory] [destination Directory]
-R directory
When copying a directory, you must add-R
Command name: mv
Command: move
Command path strength:/bin/mv
Execution permission: All Users
Function Description: Move and rename a file
Syntax: mv [source file or directory] [destination Directory]
Example: $ mv file1 file2 (renamed)
$ Mv file1 dir2 (mobile)
Command name: rm
Command: remove
Command path strength:/bin/rm
Execution permission: All Users
Function Description: delete an object.
Syntax: rm-r [file or directory]
-R: delete a directory.
-F: Force Delete. Do not ask if you want to delete
Rmdir: delete an empty directory (not applicable. You cannot delete any files in it)
Author: "Too o too many others"