Most of those using linux use the command line mode, which is also more convenient for remote maintenance, because the command mode transmission takes up very little resources. X windows (graphical user interface) exists as a plug-in of linux graphical interface, which is not necessary. If you are playing with graphics, the graphical interface of unbuntu linux is gorgeous, which is biased towards individual users.
How to connect linux remotely
First, we need to get the IP address of linux.
Here, after logging into centOS (explained on the basis of the previous article "linux Installation and hard disk partition"), right-click the desktop "open terminal port" ------ type in: ifconfig command to view the local IP
What I marked with a red line is the ip address of the linux system.
Let's choose the remote login tool.
There are many remote login tools. You can use any remote login tool you like. The author recommends two for novices:
PuTTY: free, very small (only a few hundred KB), easy to operate, supports ssh1 and SSH2 (Protocol), and basically meets the requirements.
SecureCRT: charging. Compared with PuTTY, the volume is larger, more than ten MB. The large volume brings powerful functions and less ugly interface. It supports SSH (ssh1 and ssh2) telnet and rlogin protocols. It is used for connection and operation, including Windows,UNIX And VMS are ideal tools for remote systems.
The author uses the first paragraph to introduce tools in the same way.
Tips:
SSH protocol is similar to ftp and telnet protocols, but ftp and telenet are plaintext transmission. The database is encrypted during SSH transmission, so it is more secure. Another feature is that the transmitted data is packaged to make the data transmitted on the network in a smaller volume.
Click the Open button to log in. Enter the user name (root) and enter the password (the * sign is not displayed in the input process). If the user name and password are correct, the login is successful.
Solution to the garbled code problem of PuTTY terminal:
http://jingyan.baidu.com/article/3aed632e5f00ae701080913a.html
=====================================Gorgeous split line=======================================================
linux common commands
On the study of linux commands, I believe no one will come up with a complete list of linux commands! So many orders are killing you. And bad memory, easy to forget. My method is to remember what I use. It won't be used much. Naturally, it will be recorded.
Tip: I don't know how many people have used gadgets like Youdao notes. You can save some commonly used commands in your notes with instructions, and check which one you use during operation. Don't try to remember.
Here are the commands that novices must know:
Switch between folders
ls Displays all files and folders in the current directory cd /user open user folder If you do not know the full name of the folder you want to open or the name is too long, you can press tab The keyboard is automatically supplemented, such as: cd /u + table Key, the system will help us fill it up automatically /user cd .. ((followed by a space plus two points) return to the previous level directory
It's super simple. It's no problem to remember the above several and jump around between folders.
File operation
establish
mkdir test create folder touch test.txt create a file
edit
vi test.txt open test.txt file c Press on the keyboard C Key to switch from read-only to edit Esc Switch from edit state to read-only state : q Yes exit (when the file has not changed) : q! Exit without saving (when the file changes) : wq Save and exit copy cp test.txt test2.txt hold test.txt Files copied from the current folder test2.txt cp test.txt /hzh/test take test.txt Copy to/hzh/test Under the directory delete rm aa.txt delete aa.txt file rm -r bb delete bb Directory (including all files in the directory) move mv dd.txt .. take dd.txt Move files to the upper directory (note the two points at the end) mv bb.txt /hzh/test/ take bb.txt Move files to hzh/test/Under the directory Rename mv dd.txt dd2.txt take dd.txt Renamed dd2.txt lookup locate aa.txt Check the information in the whole system aa.txt Documents, locate\slocate The command is followed by a file or folder. However, you need to update the database before executing this command, so choose execute updatedb Command.
how?! Just remember the above commands. Congratulations! You can add, delete, modify, check and move files and folders.
View system information command
df -lh View disk information
lsb_release -a View all version information of the system
free View memory information
total used free shared buffers cached Mem: 1034536 294568 739968 0 15636 174944 -/+ buffers/cache: 103988 930548 Swap: 1052248 0 1052248
The following is an explanation of these values: total:Total physical memory size. used:How large has been used. free:How many are available. Shared:The total amount of memory shared by multiple processes. Buffers/cached:The size of the disk cache. Third line(-/+ buffers/cached): used:How large has been used. free:How many are available. The fourth line doesn't explain much. ps View currently running processes kill -9 QQ.exe Terminate the process,-9 Indicates that the process is forced to stop immediately
Shutdown command
shutdown now Turn it off immediately shutdown +5 5 Shutdown in minutes shutdown 23:10 Set the system to shut down at 23:10 shutdown -r now Shut down and restart the system immediately
Concept of pipeline: connect the front output with the rear input
For example, I have to take off my clothes before I go to bed. I can execute two commands, 1. Take off your clothes 2. sleep But through the pipe, I can write two steps together: undressing and sleeping. Of course, I can also write three or four steps (commands) together, but the former command must be a prerequisite for the latter command. Like the example I gave, I can't go to bed before I take off my clothes.
For example: # ls -l | more -l displays all the results, "|" is connected, and more is displayed in separate screens
There are so many linux commands that you can't finish learning. If you want to understand the usage of a command, you can follow a command with -- help to view the parameters. My view is to use which Google and which, and then record it in the notebook for future reference.
The above is Liangxu tutorial network Share Linux related knowledge for all friends.