Remote Desktop Protocol (RDP) is a popular method to access Windows systems remotely. If you have a Windows Virtual Machine (VM) and want to access it from a Linux system, you can use xFreeRDP, a lightweight and efficient RDP client for 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.
1. Enable RDP on the Windows VM
Before accessing the Windows VM, ensure RDP is enabled:
- Log in to your Windows VM.
- Open Settings > System > Remote Desktop.
- Toggle the switch to enable Remote Desktop.
- Add your user account to the list of users allowed to access via RDP.
2. 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:
sudo apt update
sudo apt install freerdp2-x11
Verify the installation by running:
xfreerdp --version
3. Connect to the Windows VM
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
And 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.
To Connect to the Windows VM from Your Windows Desktop
Open Remote Desktop Connection:
Press Win + R, type mstsc, and hit Enter.
Enter the IP Address or Hostname:
In the Remote Desktop Connection window, enter the public IP address or hostname of the VM.
Click Connect.
Authenticate:
When prompted, enter the username and password for the VM.
If a security warning appears, click Yes to proceed.
Access the VM:
You should now see the desktop of your Windows VM.