[1] Ubuntu - opens port 22
|
ifconfig |
After the command is executed, the service function of the item may not be installed, and the service function may not be installed, and the service function may be executed according to the prompts
|
sudo apt install net-tools |
In this case, check the Ubuntu port 22 and run the following command:
|
netstat-ntlp|Grep 22 |
|
Parameter explanation: |
|
-n is not displayed as the service name of the process, but as the port number |
|
-t lists the information about TCP network packets |
|
-l Lists the listeningservices that are currently on the network |
|
-p lists the processes for the network service |
If no process content about port 22 is found, run the following command:
|
sudo apt-get install openssh-server |
|
sudo apt-get install ufw |
|
sudo ufw enable |
|
sudo ufw allow 22
|
[2]
Install-
DotNet
(wine/mono....Implement
cross-platform porting of .
NET1, and add Microsoft
package installation sources
wget https://packages.microsoft.com/config/ubuntu/22.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
sudo dpkg -i packages-microsoft-prod.deb
rm packages-microsoft-prod.deb
2. Install the SDK
sudo apt-get update && \
sudo apt-get install -y dotnet-sdk-8.0
3. Install the runtime
sudo apt-get update && \ sudo apt-get install -y aspnetcore-runtime-8.0
[3] Install G++
sudo apt update
sudo apt install build-essential
gcc --version
g++ --ve rsion
[4] Install Cmake
[5] Native VS-Linux-so port development
[6] .NET cross-platform porting (p/invoke)
Note. NetFrameWork to .net/core. In addition, for the problem that
(using the Kerner32.dll LoadLibrary() to call the exception in linux, and the report cannot find kerner32, because it belongs to the dll library of win. Therefore, it is necessary to recompile the source code of the dll under win into the shared library of Linux-like .so, and at the same time use dlopen in .net to achieve the same effect as LoadLibrary() under win, to achieve the purpose of cross-platform.