Remote operation practice of Linux (ubantu) system

1. Set the network connection of the virtual machine Ubuntu system to "bridge mode", and configure the IP and gateway parameters of Ubuntu

Open the virtual machine, right-click ubantu, click Settings,
Insert picture description here
click the network adapter, select the bridge mode and then confirm.
Insert picture description here
Click the down symbol in the upper right corner of the ubantu screen, click the settings symbol to enter the settings,
Insert picture description here
click network, select the plus sign, and add a new network connection
Insert picture description here

On the first page of identity, click the down symbol to select the default one.
Insert picture description here
Then select the ipv4 page to set ip, subnet mask, gateway and other information
(note: to set these information, you need to refer to the relevant information of your host, you can ipconfig your The host view the information, and then set the ip here to the similar ip)
Insert picture description here

The rest of the pages do not need to be set up, and then click Apply
to test the connectivity now. Use the ping command to access the gateway and the external network one by one.
You can clearly see that the access here is successful, indicating that there is no problem with the network information settings
Insert picture description here
. For other hosts under the network, such as ping an ip address, you must enable ssh. For related operations, please refer to:
How to enable SSH service on Ubuntu

Second, use putty to remotely log in to the ubantu account under win10

1. Create a new user under ubantu
Command:

sudo adduser username

After the command is entered and press Enter, follow the prompts and enter the relevant information. The account information below can be empty, go to the next step, and finally y agree. At this point, a new user classmate1 is created successfully
Insert picture description here
. 2. Try to connect
to another computer remotely. , Open putty (download address: http://www.putty.be/latest.html, you can choose the appropriate version to download)
(Note: the ssh service is already turned on by default)
Generally, there is no active setting of the port number used by ssh. The default is port 22.
Insert picture description here
After clicking open, the following page appears, directly enter the user name, press Enter, and then enter the password to enter the ubantu system that needs to be connected. The
Insert picture description here
connection is successful
Insert picture description here
3. Use ftp to upload and download files
①Open ftp under ubantu, refer to: Ubuntu configuration ftp
Open the windows command line window and enter:

ftp

Enter and then enter ( open followed by the ip of the ubantu system you opened ):

open 192.168.43.253

As shown in the figure after success:
Insert picture description here

②Upload and download files
Upload file format:

put file 

file is the file name (note: the default upload file directory here is the directory when you enter ftp, for example, here is C:\Users\ygq)
upload 11.c
Insert picture description here
download file format:

get file

Here is the page to download the 22.c file (note: the default is to download the file pwd under the current folder of the ubantu system to view the current directory of the ubantu host)
Insert picture description here
4. Run putty under windows to open the graphical interface software
① Install Xming under windows: official website Download link: https://sourceforge.net/projects/xming/files/latest/download
Although the installation interface is all in English, the basic options remain the same. The next step is until the installation is complete.
Xming will run in the background after it is running. small
Next, open the putty, the configuration options connection -> SSH -> Auth - > X11 forwarding at the Enable X11 forwarding tick; then session-> host name of the server to fill in IP address, and then click open connection to a remote server.

The same operation as the above ftp connection to ubantu account to remotely connect to ubantu,
enter the command after the account name classmate1 (note: the ip here is the ip under windows):

 set DISPLAY=192.168.43.254:0

Insert picture description here

Now you can run graphical interface software in this command line window.
For example, I run Firefox browser here (the default ubantu system has Firefox browser)

Insert picture description here
After a while (loading), the Firefox browser page will appear (but the icon below shows the Xming icon, indicating that it is running based on Xming)
Insert picture description here

Three, use VNC viewer to visit ubantu

1. Install VNC server under ubantu
https://jingyan.baidu.com/article/cbcede077f59bf02f40b4ddb.html
2. Install VNC viewer
official website address under windows : https://www.realvnc.com/en/connect/download/viewer/
Insert picture description here
Run vncserver under ubantu

vncserver

Insert picture description here
3. Connect
Open the vnc viewer
Insert picture description here
input on windows

192.168.43.253:1

Press Enter, click continue to Insert picture description here
enter the set vncserver password.
Insert picture description here
The following page appears.
Insert picture description here
Graphical interface setting reference:
https://www.it610.com/article/1290442461600096256.htm

4. vnc and remote desktop (from: the difference between VNC and remote desktop )
VNC
VNC uses the RFB protocol to do screen sharing and remote operation software, developed by the famous AT&T European research laboratory. The client software and server software are required to be used together.

Remote Desktop The
remote desktop uses the RDP (Remote Desktop Protocol) remote desktop protocol. Most Windows support this protocol by default, allowing remote access to the operating desktop.
The difference between RFB and RDP
RFB is to transfer the image to the client after the window is drawn in the video memory on the server side. The client only acts as an image decoding and display role; RDP delegates the work of drawing to the client, and the server needs to understand The client displays the specific conditions of the capabilities in order to make corresponding adjustments.
RFB mainly transmits images, and RDP mainly transmits commands. For general applications, RFB data volume is too large, and RDP has higher requirements on the client. Therefore, RFB is suitable for thin clients and RDP is suitable for low-speed networks.
5. Create a new ubantu account and grant sudo permissions to
https://www.cnblogs.com/oldfish/p/5040885.html

Guess you like

Origin blog.csdn.net/xianyudewo/article/details/109525145