Readers like you help support MUO. When you make a purchase using links on our site, we may earn an affiliate commission. Read More.

You're in one room, sitting at a PC; the data you want is in another, on a computer running Ubuntu. If both computers are in the same house, no problem, but what if they're in different offices? It might be a bit of a walk!

The answer, therefore, is setting up a remote desktop connection. Learn how to set up a remote desktop from Windows to Ubuntu.

Why Remote Connect to Ubuntu From Windows?

There are several reasons why you might want to remote connect to your Ubuntu computer. Perhaps you're at work and need to log into your home computer. Alternatively, you might have an Ubuntu PC in one room and your Windows PC in another. Maybe you want to run updates on Ubuntu or access files.

Remote control Ubuntu using RDP

Alternatively, you might be running an Ubuntu server for data, a website, or even a game. Either way, a method of setting up a remote connection will save a lot of time and effort.

You have three key options for establishing a remote connection with an Ubuntu machine running the default desktop environment:

  1. Remote Desktop (RDP)
  2. Virtual Network Computing (VNC)
  3. Third-party remote desktop software

First, however, you need to make some preparations:

  1. Enable port forwarding on the remote device's router
  2. Find the IP address
  3. Install SSH

Let's look at these in turn.

Prepare Windows RDP to Ubuntu Connections

Remote access solutions are simple to set up and manage across the same network. However, if you're working from home, this instantly complicates things.

To use VNC and RDP with a PC on a different network, you'll need to enable access to the remote computer via its router. You can do so by using "port forwarding." However, you'll need the IP address before you set this up.

Find Your Ubuntu PC's IP Address

Before you can establish remote access to your Ubuntu device from Windows over RDP or VNC, you'll need the IP address.

The first way is the easiest. Physically go to the Ubuntu machine, press Ctrl + Alt + T to open the Terminal, and input the command:

ifconfig

Look for the "inet addr" against the connection you're currently using. For instance, if you're on Wi-Fi, look for wlan0. If the computer is connected to the network via Ethernet, look for eth0.

Another way to find the IP address is to find the network connection icon in the panel, right-click, and select Connection Information. You'll find the IP address listed here.

Is neither of these options open? You can also connect to your router directly via your computer's browser.

Once signed into the router's admin console, you'll be able to see which devices are connected. Just look for your Ubuntu device name, find the IP address, and make a note of it for later.

Enable Port Forwarding

To access a computer on another network (e.g., your work network), you need to enable port forwarding on the router where your Ubuntu PC is located.

Start by establishing the IP address of the router. You can use the ip r command for this, with grep to specify the default:

ip r | grep default

Make a note of the IP address, then open it in your browser to display the router's admin console. Enabling port forwarding is simple:

  • Look for the Port Forwarding settings
  • Create a New Rule labeled Remote Desktop
  • Set the Internal Port number to 3389
  • Set the External Port number to 3389
  • Input the IP address of the Ubuntu PC
  • Click Save

Note that these steps are generic and will differ depending on your router. For detailed steps, check your router documentation.

Once saved, you should be able to RDP into the Ubuntu PC remotely via your organization's static IP address. If your employer does not use a static IP (unlikely, but it happens), use a dynamic DNS provider instead.

Your organization's system admin can set up port forwarding if you're not using commercial remote desktop tools.

Set Up Access Using SSH

To save time, you might want to install PuTTY on your PC (or just try the built-in Windows SSH function). It enables you to set up an SSH connection, which gives remote access to the Ubuntu command line.

To be clear: this isn't a remote desktop option; there is no mouse control. But it is helpful to install the tools you'll be using remotely. SSH is often disabled by default, however, so if it is not installed, you'll need to fix it.

In short, it depends on which Ubuntu version you're using and whether you've used SSH previously.

Once installed via the terminal (sudo apt install openssh-server), you'll be able to make a remote connection to the Ubuntu desktop. Simply enter the IP address and the Ubuntu username and password. You can then use the terminal to install the tools you need for RDP and VNC.

1. Remote Access Using Remote Desktop Protocol

The easiest option is to use Remote Desktop Protocol or RDP. Built into Windows, this tool can establish a remote desktop connection across your home network. All you need is the IP address of the Ubuntu device to establish a remote desktop connection to Ubuntu from Windows.

While the necessary software is pre-installed on Windows, you'll need to install the xrdp tool on Ubuntu. To do this, open a terminal (Ctrl + Alt + T) and enter:

sudo apt install xrdp

Follow this with:

sudo systemctl enable xrdp

Wait for this to install, then run the Remote Desktop application in Windows using the Start Menu or Search. Type rdp, then click on Remote Desktop Connection. With the app open, input the IP address in the Computer field.

Remote connect to Linux with RDP

Next, click Show Options and add the Username for the Ubuntu PC. You can click Save to keep these settings for reuse on another occasion.

Click Connect to start the connection and input the Ubuntu account password when prompted. The connection will then be established, giving you full mouse and keyboard access to your remote Ubuntu computer. If you plan to use this connection often, you can create a configuration file to save time.

Troubleshooting RDP to Ubuntu

While RDP is an excellent option for remote connecting to your Ubuntu PC, it's unreliable on some Ubuntu versions, like 18.04 LTS. There appears to be an issue establishing a remote connection while already logged into the same account on Ubuntu.

As such, the simple way around this is to log out of the Ubuntu computer.

If this isn't possible, try switching the RDP connection from the Xorg server to X11rdp. Wait for that to fail, then try Xorg again.

You might also attempt a connection after restarting the Linux machine.

Ubuntu 22.04 LTS should include a fix to make RDP to Ubuntu smoother.