How to connect Windows to Linux via remote desktop

We can use different operating systems, so it is common for us to have information stored on several different computers, with various systems. Therefore, in this article we are going to explain how we can establish a remote connection between Windows and Ubuntu through remote desktop. In this way we will be able to control a computer without having to be physically there, as well as being able to exchange files of all kinds from one to another in a simple way.

How to connect Windows to Linux via remote desktop

Steps to access Ubuntu from Windows

Ubuntu is one of the most popular Linux distributions, which is why many of us use it on our computers. However, sharing between this OS and Windows is really common. Therefore we can use the remote desktop and access from another location. For this we will have to carry out some simple steps and configurations. You can do it even if you have the computer in the office and you are connected from home.

Know the IP of the computer with Ubuntu

First of all, to be able to remotely access the Ubuntu machine from another with Windows, we are going to have to know what the IP address is . This step is essential. Therefore, we need to go to the Ubuntu device and open the Terminal. We can do it simply with the key combination Ctrl+Alt+T.

Once you are in Terminal, you have to run the ipconfig command. In case you are using the wired connection, you should search for eth0 and if it is for Wi-Fi, wlan0. There you will see the corresponding IP address.

However, you can also get it in another way. You can go to the network icon in the panel, right click and click on Connection Information. There, within Configuration, you will be able to see the corresponding IP address that you will have to use to access Ubuntu remotely from Windows.

Conexión remota en Ubuntu

Enable port forwarding

Another fundamental step to be able to use this type of remote connections is to enable port forwarding . In this case you have to do it on the router where the Ubuntu computer you are going to use is connected. You will have to set the IP address of the router and for this you can use the following command:

  • ip r | grep default

When you know the IP address that corresponds to the router, you have to go to the browser and access the configuration. You have to put the address in the address bar. Later look for the corresponding options with port forwarding and create a new rule with the label Remote Desktop.

You have to set the port number, both internal and external, 3389. Later you have to put the IP address of the computer with Ubuntu that you previously obtained. You save the changes and you’re done.

Reenvío de puertos en el router

These steps that you have seen may change depending on the model of the router . However, they are similar and you simply have to find this corresponding option in the device menu and fill in the data that we have seen. From that moment you will be able to remotely access the Ubuntu computer through the static IP address.

Use remote desktop

The easiest option to access is via Remote Desktop Protocol or RDP . You have to keep in mind that in the case of Windows, this protocol is already installed by default, so there are no problems in that regard. Instead, you will have to install it on Ubuntu.

You have to go to the Ubuntu terminal again, which you can access simply with the key combination Ctrl+Alt+T and execute the following command:

  • sudo apt install xrdp

From that moment you will have it installed in Ubuntu and you can start using it. It is a quick and simple process, where you will only have to verify the installation through the administrator user.

The next step is to start the RDP protocol in Windows. To do this, simply go to the Start menu and search for RDP or Remote Desktop Connection. A new window will open automatically and, in the Computer field, you have to put the IP address that corresponds to the computer with Ubuntu, which you are going to try to access through the remote desktop.

Conexión de escritorio remoto en Windows

You can add a name corresponding to the computer with Ubuntu and click Save. This way you can use it in the future. However, just click Connect to start the process and be able to access Ubuntu from Windows via remote desktop. You will have to put the Ubuntu password to be able to enter.

Use VNC

We have explained how to connect from Windows to Ubuntu via RDP. However you can also use VNC . It is a different process, although also simple to carry out. Of course, you will have to install a client in both Ubuntu and Windows, since this is how you will be able to use it.

We are going to show how TightVNC works, which you can install for free and easily on both systems. In the case of Ubuntu you have to install it through the following command, with administrator permissions:

  • sudo apt install tightvncserver

Once you have it installed, you have to open it. It will automatically ask you for a password to use it. A number will appear to identify the equipment. It can be 1, 2 or any other. That you have to memorize or write it down to be able to use it in the future.

When you have TightVNC configured and installed on Ubuntu, the next thing to do is to install it on Windows . For this you have to go to their website . There you will see that there is a 32 and 64 bit version. Download the one that corresponds and install it. You will see a first screen like the one you can see in the image below. You will have to put a password and you will be able to execute it.

TightVNC en Windows

To access you will have to put the corresponding IP address and click on Connect . From that moment you will have everything configured to be able to access Ubuntu from Windows through VNC. The process, although different, is also simple and you will only have to follow a series of steps that we have seen.

Acceder a TightVNC

Conclusions

Therefore, as you have seen, it is possible to remotely access Ubuntu from Windows through the RDP protocol and also through VNC. In both cases you have to have a series of data available, such as the IP address that corresponds to the computer with Ubuntu, as well as port forwarding on the router.

But beyond these two options, you can also use other commercial programs that are available. For example TeamViewer, which is very popular, as well as Chrome‘s own remote desktop tool. The latter is a very interesting solution to access another computer and this also includes when we use different operating systems.

We have focused on Ubuntu as it is one of the most important distributions of Linux and it is where we have carried out the tests. However, you could do the same thing in other distributions compatible with what we have seen. The procedure would be similar and you could also access remotely from Windows.