When you need to connect to Linux with Xshell:
First in Terminal input command: Service sshd start (SSH service enabled)
1, NETSTAT-TNL: View the port Status of the command (such as View 22 port)
2. Service sshd stop: close SSH service
Service sshd Restart: Restart SSH service
Service sshd Status: After service is turned on, check the status of services
3. Yum Install Openssh-server: Installing SSH
4. SS-LNT: Check Port Status Command
5, Chkconfig sshd on:ssh service boot automatically start
6, Chkconfig sshd off: Cancel boot from boot
7. Firewall:
View Firewall: Service iptables status
Shut down firewall:/etc/init.d/iptsbles stop
Open firewall: Service iptables start
8. Ps-e|grep SSH: Check if the Ssh-server server is installed
9, Ifconfig-a: Get the IP address of the Linux system
10. PWD: View current directory;/Representative root directory
Parameters:
-P: Display the correct full path
11. CD: Switch directory (change directory)
Parameters:
CD ~ or CD: means back to your home folder
CD ~vbird: Means go to vbird this user's home folder
CD-: Indicates back to that directory just now
Cd.. /: Return to previous level directory
Cd/var/spool/mail: The absolute path, directly specify the full path name to go to
Cd.. /mqueue: Relative path notation, we are from/var/spool/mail to/var/spool/mqueue.
11. LS: View files and directories
Parameters:
-L: Lists current directory information, long data, including file attributes and permissions
-A: Show all files together with hidden files (.)
-D: Lists only the directory itself, not the data in the directory
-R: Together with subdirectories, all files in that directory will be displayed (./: indicated in the current directory)
Ls-al--full-time--~: Full Render File modification time
LS-LH: User-friendly display file size
12. Vim. Test: Create a hidden file
To edit a file:
Vim file name
Press I to insert mode, after writing the file, press ESC, then press SHIFT +: Key, then enter Wq, then hit enter, the file is saved.
13. cat file Name: View file contents (Show all contents)
Parameters:
-B: Lists line numbers, but blank lines do not mark travel numbers.
-N: Print travel number, blank line also has
14, more file name: (one page, one page) slowly view the content
SPACEBAR: Represents PAGE Down
Enter: represents scrolling down one line
/string: Represents the keyword in this reality that queries down "string"
Q: The delegate immediately leaves more and no longer displays the contents of the file
B: The representative page back
15. mkdir Directory Name: Create a new directory
Parameters:
-P Cn/jilin/changchun/yushu/baoshou: Creating a directory recursively
-M 711 test2: New directory with permissions of Rwx--x--x
16, RmDir: Delete "Empty" directory
Parameters:
-P: Along with the previous layer "empty" directory also deleted
-R: Delete everything under the directory
17. MV: Move files and directories, or rename
Mvdir filename Directory Name: Move the file into the directory
18, Tree cn: Display the CN directory of the Trees structure
Linux commands (i)