Centos7
Character Interface Operation Basics
1. How to use the character interface
2. Local Login and Remote login
3. Learn to use putty
4. Understanding the operating level of the system and its switching methods
5. Master common system shutdown and restart commands
Why do I use character working?
1. You can perform all tasks efficiently, especially system management tasks, in the form of character manipulation.
2. System management tasks are usually done remotely, and entering the character mode after remote login can improve operational efficiency and occupy very small bandwidth.
3. Because the use of the character interface does not start the graphical working environment, this can greatly reduce system resource overhead
Ways to enter the way characters work
1. Open the terminal window directly in the graphical environment. Graphics switch to character interface shortcut key CTRL+ALT+F2, character switch to graphical interface ctrl+alt+f1
2. Enter the character interface directly after system boot
3. Using remote login to ssh into the character working environment
local logon and logoff
Login: Enter the username (for example: root) and password (PWD) on the login terminal. Log off: User can enter the logout command on the current login terminal
Telnet with putty
Enter Ifconfig to view the IP address (remember to turn on the wired switch in the graphical interface)
Enter the IP address, then open, and then enter the username password to log in.
We can save the current session configuration
We save a session to name it CentOS and bind it to the specified IP address. The next time you click CentOS, you can create a link.
System Run Level
Linux CentOS Restart Command:
- 1, reboot
- 2. shutdown-r now reboot (root user)
- 3, Shutdown-r 10 over 10 minutes automatic restart (root user use)
- 4, Shutdown-r 20:35 restart at 20:35 time (root user use)
If you set the restart through the shutdown command, you can cancel the restart with the Shutdown-c command.
Linux CentOS shutdown Command:
- 1, halt immediately shut down the machine
- 2, Poweroff immediately shut down the machine
- 3, Shutdown-h now immediately shut down (root user use)
- 4, shutdown-h 10 10 minutes after the automatic shutdown
If you set the shutdown through the shutdown command, you can cancel the restart with the Shutdown-c command.
Basic command operation:
Ctrl+l Clear Screen
#cd: Return to the parent directory CD. /.. /upper Level Two directory
#cd Absolute Path
#cd/Return root directory
#cd file into a document
#ls view the files in the directory (available *?). [ABC] wildcard to make a match)
# ls-a Show hidden files
# ls-l Show more information
Command combination ls-al parameter combination
#pwd display the current directory name
# mkdir Dir1 create ' dir1 ' directory
# mkdir Dir1 Dir2 Simultaneous creation of two directories
# mkdir-p/tmp/dir1/dir2 Create a directory tree
#rmdir dir to delete the specified directory
File command:
#file Displays the type of the specified file
Creating Files #touch File
#cp filename copyname Copying files
Cp-r dirName copyname Copy Folder
#rm filename to delete a file
Rm-r dir Delete directory with hints
RM-RF dir Delete directory without prompting
#rmdir dir can only delete empty directories
#mv Filename/home moving files (folders)
Get command Help: Command--help or man command or IFO command
Completion of the command (prompt match command)
For example, MK Presses TAB tab to find all matches, then enters a unique match, and then presses tab to complete.
Historical commands:
!! That is, executing the last command,!touh will find the last touch command executed, priority execution is near. 50 Enter the command history line number directly to execute the command.
Standard input and output:
System redirection:
Redirection is the non-use of the system's standard input and output ports, and the wrong output port, and re-specified, so the redirection is divided into input and output and error redirection,
typically redirects to a file .
Input redirection: Cat <test1>test2 outputs the contents of the Test1 file to the Test2 file.
> Output file will overwrite,>> will not overwrite, append
Pipeline:
is actually a combination of commands.
Linux (ii) __ BASIC operations