This is a guide on how to RDP from Linux to Windows command line.
For those who want to use an RDP client like Remmina, please check this guide.
Those of us who like sailing from the command line, you can access your windows server from your terminal using these steps. You will need to install a tool that enables your connection
Prerequisites #
- Xfreerdp Installed on Your Linux System – If it’s not installed, you can easily add it via the package manager for your Linux distribution as shown below.
- Remote Desktop Enabled on Windows: Ensure Remote Desktop is enabled on the Windows machine you wish to connect to. Truehost Windows Servers will have this enabled already.
- Windows server IP Address/Hostname and Credentials: Have the IP address of the Windows machine and your login credentials ready.
Step 1: Install “xfreerdp” #
- You can install xfreerdp using your systems package manager
For Ubuntu
sudo apt-install xfreerdp
For Almalinux/Centos/RHE Based systems
sudo yum install xfreerdp

Step 2: Run the Command #
- Open your terminal and use the following command to establish the RDP connection.
- Replace
<username>
,<password>
, and<IP_address_or_hostname>
with your Windows account details and the target machine’s IP Address.
xfreerdp /u:<username> /p:<password> /v:<IP_address_or_hostname>
- You will be asked if you trust the server certificate : Do you trust the above certificate? (Y/T/N)
- Respond with a Y, followed by Enter to proceed

- A connection will be established and the RDP window will open, giving you access to the server.

- Note that the RDP windows is bound to the terminal session where you ran the command. If you close that terminal session, the RDP windows closes along.
Author’s Final Word #
I really hope that you have managed to access your Windows server with the above steps. If you still haven’t, please check with our support team for further help
There are other tools that can serve the same purpose as xfreerdp. You are thus not limited to xfreerdp but you are encouraged to explore more.
If you have more questions, please reach out to Truehost support team