[Linux] Introduction to XShell and Xftp

content

Linux directory structure

specific directory structure

Remote login to Linux

why remote login to linux

Network topology diagram

Introduction to Xshell6

Check ip and ping on linux

 Remote file upload and download - Xftp7

Xftp7 installation and new session

Basic introduction to Vi and Vim

Three modes commonly used by vi and vim

Demonstration example

Switch between various modes

Switching diagram of each mode of vim and vi

 Common shortcut keys

vi and vim shortcut key map


Linux directory structure

basic introduction

1. The Linux file system adopts a layered tree directory structure. The top layer in this structure is the root directory "/", and then other directories are created in the subdirectory.

2. It is very important to have a deep understanding of the linux tree file directory. In linux, everything is a file

specific directory structure

/bin [commonly used] (/usr/bin, /usr/local/bin) is the abbreviation of Binary, this directory stores frequently used commands

/sbin (/usr/sbin, /usr/local/sbin) s means Super User, which stores the system management program used by system management

/home [commonly used]  stores the home directory of ordinary users. In Linux, each user has its own directory. Generally, the directory name is named after the user's account.

/root [commonly used]  This directory is the user home directory of the system administrator, also known as the super authority

/lib [commonly used]  The most basic dynamic link shared library required for system boot, its function is similar to the DLL file in Windows, almost all applications need to use these shared libraries

The directory /lost+found is generally empty. When the system is shut down illegally, some files are stored here.

/etc [commonly used]  All configuration files and subdirectories required for system management, such as installing mysql database myconf

/usr [commonly used]  This is a very important directory. Many applications and files of the user are placed in this directory, similar to the program files directory under Windows.

/boot [commonly used]  stores some core files used when starting Linux, including some connection files and image files

/proc [cannot move] This directory is a virtual directory, it is a mapping of system memory, access this directory to obtain system information

/srv[cannot move] service abbreviation, this directory stores some data that needs to be extracted after the service is started

/sys[cannot move] This is a big change in the linux26 kernel. A new file system in the 26 kernel is installed in this directory

The /tmp directory is used to store some temporary files

/dev is similar to the Windows Device Manager, which stores all hardware in the form of files

/media[commonly used]  The linux system will automatically identify some devices, such as U disk, CD-ROM, etc. After identification, linux will mount the identified devices to this directory

/mnt [Commonly used]  This directory is provided by the system to allow users to temporarily mount other file systems. We can mount external storage on /mnt/ and enter this directory to view the contents. d:/myshare

/opt This is the directory where additional software is installed on the host. Such as the installation of ORACLE database can be placed in this directory. Default is empty

/usr/local [common]  This is another directory where additional software is installed for the host. Generally, programs are installed by compiling source code.

/var [commonly used]  This directory stores things that are constantly expanding, and it is customary to place frequently modified directories in this directory. Includes various log files

/selinux [security-enhanced linux]SELinux is a security subsystem that can control programs to only access specific files. There are three working modes, which can be set by yourself.

Remote login to Linux

why remote login to linux

General project development

1. Sharing in the development team when the linux server is used

2. The officially launched project is running on the public network (that is, anyone can access the public network)

3. Therefore, programmers need to log in to Linux remotely for project management or development

Network topology diagram

Remote login clients include Xshell6, Xftp6, etc., which are used to upload and download files.

Introduction to Xshell6

illustrate:

①Xshell is currently the best software for remote login to Linux operation. It has a smooth speed and perfectly solves the problem of Chinese garbled characters. It is the preferred software for programmers at present.

②Xshell is a powerful security terminal simulation software, it supports SSH1SSH2, and TELNET protocol of Microsoft Windows platform.

③Xshell can be used to access servers under different remote systems under the Windows interface, so as to better achieve the purpose of remote control of the terminal

Download address: Free for Home/School - NetSarang Website (xshell.com) https://www.xshell.com/en/free-for-home-school/

Fill in the mailbox number to send it to the mailbox (you can also visit if you can't access it: http://www.xshell.com )

Check ip and ping on linux

Remote management needs to know the ip on linux, how to view ip on linux

Open a terminal and type ifconfig

If you can't find it, you can check whether the network is connected, do not choose bridge, choose NAT

Go to the windows command to ping this ip address

 Create a new one in xshell

In this way, you can remotely operate linux through xshell

 Remote file upload and download - Xftp7

Xftp7 is a powerful SFTP and FTP file transfer software based on Windows platform. After using Xftp, Windows users can safely transfer files between UNIX/Linux and Windows PC

Xftp7 installation and new session

 If it shows garbled characters, click the globe symbol and set it to utf-8.

After you are done

 Both sides can transfer files to each other, you can drag to transfer or right-click to select transfer

Linux reboot command reboot

Basic introduction to Vi and Vim

Linux system will have built-in vi text editor

Vim has the ability of program editing, which can be regarded as an enhanced version of Vi. It can actively identify the correctness of syntax by font color, which is convenient for program design, and has rich programming functions such as code completion, compilation and error jumping.

Three modes commonly used by vi and vim

①Normal mode

Opening a file with vim goes straight to normal mode (this is the default mode). In this mode, you can use the "up, down, left and right" keys to move the cursor, you can use "delete character" or "delete entire line" to process the file content, and you can use "copy and paste" to process your file data.

②Insert mode

Press any letter such as ioOaArR to enter the editing mode, generally speaking, you can press i

③ Command line mode

znxiesc is typing:, in this mode, it can provide you with relevant instructions, and the actions of reading, saving, replacing, leaving vim, displaying line numbers, etc. are achieved in this mode!

Demonstration example

On xshell or linux virtual machine

vim hello.java

Switch between various modes

Switching diagram of each mode of vim and vi

 Common shortcut keys

1. Copy the current line yy, copy the 5 lines 5yy down from the current line, and paste (input p). (in normal mode)

2. Delete the current line dd, delete the current line down 5 lines 5dd (in normal mode) 

3. Find a word in the file [ command line /keyword, press Enter to find, enter n to find the next]

4. Set the line number of the file to cancel the line number of the file [under the command line: set nu and: set nonu]

5 Edit the /etc/profile file and use the shortcut keys to go to the last line [G] and the first line [ggl] of the document in normal mode.

6. Type "hello" in a file, in normal mode , and then undo the action u

7. Edit the /etc/profile file, in normal mode , move the cursor to, enter 20 and then enter shift+g

vi and vim shortcut key map

Guess you like

Origin blog.csdn.net/weixin_60719453/article/details/123290834
Recommended