Linux System Management
Does the terminal font become larger?? CTRL + SHIFT +? Change the size of CTRL +-become smaller
LS shows what file the current path has
PWD Displays the current path
/: root directory, only directory under the general root directory, under Linux there is only one root directory. Everything starts here. When you enter "/home" in the terminal, you are actually telling the computer to start with the/(root directory) and then go to the House directory.
/bin,/usr/bin: directories that perform binary files, such as common commands ls, tar, MV, Cat, and so on.
/boot: Place some files used by Linux system startup, such as kernel files of Linux:/boot/vmlinuz, System Boot Manager:/boot/grub.
/dev: Store the device files under the Linux system and access a file in that directory, equivalent to accessing a device, which is commonly used to mount the optical drive mount/dev/cdrom/mnt.
/etc: the directory where the system configuration file is stored, the executable file is not recommended in this directory, the important configuration files are/etc/inittab,/etc/fstab,/ETC/INIT.D,/etc/x11,/etc/sysconfig,/etc/ Xinetd.d.
/home: The Default User house directory, add user account, the user's home directory is stored in this directory, ~ represents the current user's home directory, ~edu represents the user Edu home directory.
/lib,/usr/lib,/usr/local/lib: The directory of the library used by the system, the program needs the help of the function library when it needs to invoke some additional parameters during execution.
/lost+fount: When an error occurs with the system exception, some missing fragments are placed in this directory.
/MNT:/media: CD-ROM default mount point, usually the disc is mounted under/mnt/cdrom, or not necessarily, you can choose any location to mount.
/OPT: A directory for the host to install additional software.
/proc: This directory data are in memory, such as system core, external device, network status, because the data are stored in memory, so do not occupy disk space, the more important directory has/proc/cpuinfo,/proc/interrupts,/PROC/DMA,/proc /ioports,/proc/net/* and so on.
/root: Home directory for system administrator root.
/sbin,/usr/sbin,/usr/local/sbin: Place executable commands that the system administrator uses, such as Fdisk, Shutdown, Mount, and so on. Unlike/bin, these directories are commands for the root of the system administrator, and the average user can only "view" and not be set up and used.
/tmp: The directory where files are temporarily stored by the general user or the program being executed, accessible to anyone, and important data cannot be placed in this directory.
/SRV: The data directory that needs to be accessed after the service starts, such as the Web page data that the WWW service needs to store within/SRV/WWW.
/usr: The application holds the directory,/usr/bin stores the application,/usr/share stores the shared data,/usr/lib storage cannot run directly, but is necessary for many programs to run some library files. /usr/local: Store the software upgrade package. /usr/share/doc: System description file storage directory. /usr/share/man: Program description file storage directory.
/var: Place files that change frequently during the execution of the system, such as log files that change at any time/var/log,/var/log/message: All login Files directory,/var/spool/mail: Mail storage directory,/var/run: After the program or service starts, its PID is stored in the directory.??????
?
Linux commands overview
Command + options + parameters
/root directory
ls./? Under current directory
LS/
Ls-l Display-specific display size
Ls-h is also shown in the specific
Ls-a Show all files showing hidden files
The 1th letter represents the type of the file: "D" for the folder, "-" on behalf of the normal file, "C" for the hardware character device, "B" for the hardware block device, "s" for the pipe file, "L" for the soft link file. The latter 9 letters represent three groups of permissions: The file owner, the user, and other users.
Each user has its own read, write, and execute permissions.
The first set of permissions Controls access to their own file permissions, that is, owner permissions.
The second set of permissions controls the permissions of the user group to access the files of one of the users.
The third set of permissions controls the permissions of all other users to access a user's files.
These three sets of permissions give the user the ability to read, write, and execute different types of users (that is, owners, user groups, and other users) to form a 9-type permission group.
Command?--Help
View how to use
Man command
View how to use
Space bar?? Display the next screen of the man page
Enter key? One row of the scroll manual page
B Roll back one screen
F Roll forward one screen
Q Exit Man command
H List all function keys
/word Search Word characters
Touch Create File
tab? Padded
Gedit file name? Write
Cat View
Wildcard characters
Meaning
File represents all characters in the file name
LS te
Find files that start with Te
LS html
Finding files that end in HTML
?
Represents any character in a file name
Ls?. C
Find only the first character, any file with a. c suffix
LS A.?
Only 3 characters are found, the first 2 characters are a., the last character arbitrary file
[]
[and] Enclose character groups to indicate that any of the character groups can be matched. "-" is used to represent the range of characters.
[ABC]
Match any of A, B, c
[A-f]
Match any one of the characters from a to F range
LS [a-f]
Find files that begin with any one of the characters from a to F range
LS a-f
Find files with file name a-f when "-" loses wildcard characters outside square brackets
\
If you want to use wildcards as normal characters, you can precede them with escape characters. “?” and "" in square brackets without the use of escape characters to lose the role of a wildcard character.
LS *a
Find files with file name a
Note:?> output redirection overwrites the original content,>> output redirection is appended to the end of the file.
?
?
?
More split screen
Pipe: The output of one command can be piped as input to another command.
Pipeline we can understand the real life of the pipe, the pipe of a plug into the other side, take out, here "| "The left and right are divided into two ends, and at the end of the thing (write), and take something (read).
EG:LS-LH | More
?
?
mkdir/////?-P Create a recursive directory
?
CD ~ Home Directory
?
Rm-rf?? Force Delete
?
RmDir??? Delete a Directory
?
Mv? Modify file name
?
Ln-s? Soft connection
?
ln? Hard Links
?
Find + paths + options to locate files
Command
Meaning
Find./-name test.sh
Find all files named test.sh in the current directory
Find./-name '. Sh '
Find all files with the suffix. Sh in the current directory
Find./-name "[A-z]"
Find all files in the current directory that begin with uppercase letters
Find/tmp-size 2M
Find files that are equal to 2M in the/tmp directory
Find/tmp-size +2m
Find files larger than 2M in the/tmp directory
Find/tmp-size-2m
Find files less than 2M in the/tmp directory
Find./-size +4k-size-5m
Find files larger than 4k and less than 5M in the current directory
Find./-perm 0777
Find a file or directory with permission 777 under the current directory
grep Text Search
grep-Option ("content") file name
Options
Meaning
-V
Display all lines that do not contain matching text (equivalent negation)
-N
Display matching lines and line numbers
-I.
Ignore case
grep Common Regular Expressions:
Parameters
Meaning
^a
Beginning of line, searching for lines beginning with M; Grep-n ' ^a ' 1.txt
ke$
At the end of the line, search for the line ending with ke; grep-n ' ke$ ' 1.txt
[Ss]igna[ll]
Match one of a series of characters in []; Search for lines matching words SignaL, SignaL, SignaL, SignaL; Grep-n ' [Ss]igna[ll] ' 1.txt
.
Matches a non-newline character; matches between E and E have any one character, can match eee,eae,eve, but does not match ee,eaae;grep-n ' E.E ' 1.txt
Cp? Copy files
Common Options Description:
Options
Meaning
-A
This option is typically used when copying a directory, preserving links, file attributes, and recursively copying the directory, simply keeping the file's original properties.
-F
A target file that already exists without prompting
-I.
Interactive replication, which prompts the user to confirm before overwriting the target file
-R
If the given source file is a directory file, the CP will recursively replicate all subdirectories and files in that directory, and the destination file must be a directory name.
-V
Show copy Progress
MV Move
Common Options Description:
Options
Meaning
-F
Disable interactive operation and do not prompt if overwrite is available
-I.
Confirm the interactive operation, if the MV operation will result in overwrite of the existing target file, the system will ask whether to rewrite and ask the user to answer to avoid overwriting the file by mistake.
-V
Show Move Progress
?
Compression and decompression
1.TAR-CVF Name File Packaging
? Tar-xvf? Unpacking?? Size does not change
2.TAR-ZCVF. gz name File compression 1%
? TAR-ZXVF Decompression
3.TAR-JCVF? bz2.
? Tar-jxvf? bz2.
?
Cal See date
Cal-y year
?
?
Date? Look at the time
Date "+%y===%m===%d" format
Date "+%y===%m===%d" format
which to see where the command is located
Ps-aux Task Manager
Top
Htop
To view the current operating conditions
Kill-9 Plus process number close run Program
Quickly switch to desktop Windows + D
Restart reboot
Shutdown Shutdown-h Now
Init 0 shutdown
Init 6 Restart
DF View Disk Usage
Df-h in detail
Du viewing the size of a folder
Du-h
Ifconfig
Ping Test Communication
Ls/home See which users
WhoAmI? View Current User
Su + user name? Switch to User
Exit Launch Current User
The WHO command is used to view user information for all currently logged-on systems.
Common options:
Options
Meaning
-M or AM I
Displays only the user name, logon terminal, and logon hours that run the WHO command
-Q or--count
Only shows the user's login account and the number of logged-in users
-U or--heading
Show Column headings
Useradd-g
Useradd-m own default directory
Home directory created by useradd-d
Useradd-g dalizi-d/home/dalizi-a Dalizi
Userdel Delete a user? Directories are not deleted
Userdel-r Deleting a directory
Switch User su
Su
Switch to root user
Su Root
Switch to root user
Su-
Switch to the root user while switching directories to/root
Su-root
Switch to the root user while switching directories to/root
Su Ordinary user
Switch to normal user
Su-Ordinary users
Switch to normal user while switching to the directory where the normal user is located
Cat/etc/group? See which groups
Groupadd which groups are added
Greoupdel Deleting a group
Groups + user name to see which groups the user is in
USERMOD-G User Group user name
Add sudo permissions to the normal user you create
sudo usermod-a-G user Name
The difference between usermod-g and-G
-G for Default group
-G general use with-A to complete the addition of other groups
chmod? Permissions Management for files
Chown Modifying file Owners
Chgrp Modifying a group to which a file belongs
51cto Address http://blog.51cto.com/n1lixing
New Ket Cinema http://www.ldxzs.top/shipin/shipin/
Site Address: Http://www.ldxzs.top
Linux System Management Summary (user, permissions, files ....) A complete summary)