Remote Desktop Protocol (RDP) is a widely used protocol for accessing Windows-based systems remotely. If you need to connect to a Windows Virtual Machine (VM) from a Linux or Windows environment, RDP provides a seamless and efficient solution. This article details the step-by-step process for enabling RDP on a Windows VM and connecting to it from both Linux and Windows operating systems. Linux.
Prerequisites:
- A Windows VM with RDP enabled.
- IP address or hostname of the Windows VM.
- A user account with RDP access permissions on the Windows VM.
Enabling RDP on the Windows VM
Before accessing the VM remotely, RDP must be enabled:
- Log in to your Windows VM.
- Navigate to Settings > System > Remote Desktop.
- Toggle the switch to Enable Remote Desktop.
- Click on Select Users and ensure that your user account is listed.
- Apply changes and close the settings window.

Accessing Windows VM from a Linux System
Linux users can utilize xFreeRDP, a lightweight and efficient open-source RDP client, to access Windows VMs.
1. Install xFreeRDP on Linux
xFreeRDP is available in most Linux distributions’ repositories. Install it using the package manager of your Linux distribution:
For Debian/Ubuntu:
Install FreeRDP:
sudo apt update
sudo apt install freerdp2-x11
For RHEL/CentOS/Fedora:
sudo yum update
sudo yum install freerdp -y
Verify the installation by running:
xfreerdp --version
2. Connect to the Windows VM using command line
Use the following command to connect to your Windows VM:
xfreerdp -u <username> <ip_or_hostname>
Replace:
<username>: Your Windows VM username.
<ip_or_hostname>: The IP address or hostname of the Windows VM.
Example:
xfreerdp -u Administrator 157.119.xx.xxx
Then it will ask you to enter the password.
By following the steps above, you can quickly set up and customize your RDP connection to suit your needs.
Accessing Windows VM from a Windows System
To Connect to the Windows VM from Your Windows Desktop
Windows users can connect to a Windows VM using the built-in Remote Desktop Connection (RDC) tool.
1. Open Remote Desktop Connection
- Press
Win + R
, typemstsc
, and pressEnter
. - In the Remote Desktop Connection window, enter the IP address or hostname of the Windows VM.
- Click Connect.
2. Authenticate
- Enter your Windows username and password when prompted.
- If a security warning appears, click Yes to proceed.

3. Access the Windows VM
Upon successful authentication, the Remote Desktop session will open, providing full access to the Windows VM.
