---
title: How to Remotely Access Windows Server (RDP) from Linux using Command Line/terminal
description: "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.](https://truehost.com/support/knowledge-base/how-to-remotely-access-windows-server-rdp-from-linux-using-remmina/)** Those of us who like sailing from the command line, you…"
url: "https://truehost.com/support/knowledge-base/how-to-remotely-access-windows-server-rdp-from-linux-using-command-line-terminal/"
updated: "2024-11-06"
category: Cloud servers in Kenya
---

# How to Remotely Access Windows Server (RDP) from Linux using Command Line/terminal

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.](https://truehost.com/support/knowledge-base/how-to-remotely-access-windows-server-rdp-from-linux-using-remmina/)**

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
```

![](https://truehost.com/support/wp-content/uploads/2024/11/image-71-1024x463.png)

##### **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

![](https://truehost.com/support/wp-content/uploads/2024/11/image-72-1024x477.png)

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

![](https://truehost.com/support/wp-content/uploads/2024/11/image-73-1024x701.png)

- 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](https://wa.me/19726743814)** for further help

There are **[other tools](http://www.rdesktop.org/)** 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](https://wa.me/19726743814)**
