Knowledge Points:
1. Virtual Console :
After the system starts directly into the character working mode, the system provides multiple (default 6) virtual consoles. Each virtual Console can be used independently of one another.
You can use ALT+F1~ALT+F6 to switch between multiple virtual consoles.
2.operating level of Linux system
0-System shutdown Status
1-Single user working status for maintenance
2-Multi-user mode (NFS not started)
3-Multi-user mode, character interface
The system is unused and is left to the user's own definition
5-Multi-user mode, and run x Windows after system startup, give a graphical login window
6-All processes are terminated, restarted
View the current operating level of the system
#runlevel
Switching the Run level
#init [0123456]
Directory Structure of 3.Linux
| / |
The gateway to the Linux file system and the highest level directory |
| /bin |
The commands required by the base system. Functions and/usr/bin are similar, the files in this directory are executable, the common user can use the command |
| /boot |
Kernel and the files required to load the kernel. In general, the GRUB system Boot Manager is also located in this directory |
| /dev |
Device file storage directory, such as terminal, disk, etc. |
| /etc |
All system configuration Files |
| /home |
Default storage directory for normal user home directory |
| /lib |
directory where library files and kernel modules are stored |
| /media |
The mount point of the plug-and-play storage device is created in this directory automatically, such as USB flash drive, Cdrom/dvd automatically mount, also will create a directory in this directory |
| /mnt |
mount point directory for temporary file system |
| /opt |
Storage directory for third-party software |
| /root |
Home directory for Linux super User root |
| /sbin |
Basic system maintenance commands that can only be used by super users |
| /srv |
This directory holds data that needs to be extracted after some services are started |
| /tmp |
Temp file directory |
| /usr |
Store user information such as commands, help files, etc., using system commands and applications |
| /var |
Store frequently changing data, such as logs, mails, etc. |
A few special file systems
| File system |
Mount point |
Description |
| Root |
/ |
Linux system running base point, root file system cannot be uninstalled |
| Proc |
/proc |
provides interfaces for accessing system kernel data in a file system, for 2.4 and 2.6 cores |
| Sysfs |
/sys |
Provides an interface for accessing system kernel data in a file system, using the 2.6 kernel |
| Tmpfs |
/dev /var/run /var/lock |
The file system that the program uses when accessing shared memory resources |
| Usbfs |
/proc/bus/usb |
File system to use when accessing USB devices |
| Devpts |
/dev/pts |
The file system that the kernel uses to interact with pseudo terminals (remotely logged in) |
| Swap |
Special file system used by the kernel, no mount point |
Used to create virtual memory |
4.Linux command
-Commands and parameters are case-sensitive
-The program can execute regardless of the extension
-You can use the TAB key to complete commands or paths
-When the instruction is too long, you can use the \ symbol to jump off, making the instruction continuous to the next line.
5. Common Command Introduction
PWD View current working directory
CD Replacement Directory
Usage CD [catalogue]
| Symbol |
Significance |
| . |
Current working directory |
| .. |
Parent Directory |
| ~ |
User home Directory |
| - |
Last working directory |
LS Display directory
Usage: ls [parameter] [directory name]
LS parameter:
-A: Displays all files, including hidden files (files starting with.)
-L: Display in long format
-T: Display by modified time
-R: Display directory and subordinate subdirectory structure (recursive)
-M: Output the file name horizontally, and make a separator with ",".
-S: Sort by file size
Blue: Directory
Green: Executable file
Red: Compress files
Light blue: Link file
Grey: Other Files
mkdir Creating a Directory
Usage: mkdir [parameter] {directory name}
RmDir Deleting a directory
Usage: rmdir [parameter]{directory name}
If the directory is empty, it is deleted directly, and if there is content in the directory, an error message will be generated and the directory cannot be deleted, but the remaining empty directories will continue to be deleted. Note that directories that include only one subdirectory are not empty.
RM Delete files and folders
Usage: RM [parameter]{file}
Parameters:
-R Delete Entire directory tree (recursive delete)
-F Delete without prompting, delete directly
Tree displays files and directory trees
Usage: Tree [parameter] {file}
Parameter:-A does not hide any entries that begin with the. Character
-D displays only directories that do not display files
-F Each file displays the path
-T sort by last modified time
-l n displays only n-level directories (n is numeric)
# # #我自己使用的CentOS 6.5 version, the system does not have the tree installed by default
# # #如果是提示没有找到命令的可以试试我用的命令
# # # Yum-y Install tree (in the case of a net) I test success
Touch creates an empty file and changes the timestamp
Usage: Touch [parameters] {file}
Parameter:-D change timestamp to defined value (after date, format: 20151027)
CP Copy Directory
Usage: CP [parameter] {source file ...} {Destination file}
Parameter:-R recursive Execution (can replicate directory tree)
MV Move or rename files
Usage: MV [parameter] {original file} {destination file} Move one or more files to the target file at the same time
6. Acura Command Man Help documentation
Path:/usr/share/man
Usage: man [parameter] [query name]
------------------------------
/Find
Q exit
--help Help
-H Help
Info command
Help command
Readme
7. Turn off the machine
Sync writes data to disk synchronously
shutdown [parameter] time [warning message]
-T sec: how many seconds to delay between sending out warning messages and deleting messages
-K: not a real shutdown but just a warning message to all users
-R: Restart immediately after shutdown
-H: Stop system after shutdown
Init 0
Restart: Reboot or INIT6
Pure Hand Knock Summary, may be able to use it later
Linux Command Preliminary understanding