categories
Updated on Published on in

rdesktop Linux Commands: How to Use RDP on Linux with Syntax and Examples

Author: Robert Agar
Robert Agar Article author

rdesktop is an open-source Linux RDP client that allows you to connect with Windows systems from the command line. It is quite popular for quick connections, legacy systems, and scripting. However, newer tools like xfreerdp are now commonly used in modern Windows server environments. 

In this guide, we will cover every detail, including the full rdesktop syntax, real-time examples for common use cases, how to fix common issues, and a comparison of rdesktop with modern alternatives. 

⚠️ rdesktop is no longer supported and is looking for a new maintainer. For modern systems (Windows 10/11, Server 2016+), you can use HelpWire .

What is rdesktop in Linux?

rdesktop is a Linux RDP client command-line designed for older RDP 4/5 protocols. It is compatible with legacy Windows environments, such as XP, Server 2003, and Server 2008. Also, it runs exclusively from the command line, without using a Graphical User Interface (GUI). 

Features of rdesktop

  • • Supports local disk, printer, and sound devices redirection
  • • Supplies credentials in scripts for automation
  • • Option to adjust display resolution, color depth, and keyboard layout settings
  • • Connects to the console session using 0 mode
  • • Allows switching between full-screen and windowed mode

rdesktop and NLA

rdesktop does not support Network Level Authentication (NLA), which is by default required on modern Windows versions, such as Windows 10/11 and Server 2012+. 

To overcome this, you need to follow one of these options:

• Disable NLA in settings: For this, go to Settings, followed by Remote Desktop, then go to Advanced settings to disable NLA. This step is not recommended for production.

• Launch using the -E flag for partial fix.

• Replace NLA with xfreerdp using xfreerdp /v:IP /u:user /p:pass /cert:ignore.

Note:  Turning off NLA lowers security. It should only be done on trusted networks or when connected through a VPN.

Installing rdesktop on Linux: Step-by-Step Guide

Ubuntu / Debian

To install rdesktop Linux distribution, such as Ubuntu or Debian, first update your package list and then install the package using the following commands:

sudo apt update
sudo apt install rdesktop

Fedora, RHEL, or CentOS

To install rdesktop on Fedora, RHEL, or CentOS, use the dnf package manager to install it with the following command:

sudo dnf install rdesktop

Kali Linux

To install rdesktop on Kali Linux, update your package list and install the tool using a single command:

sudo apt update && sudo apt install rdesktop

Arch Linux

To install rdesktop on Arch Linux, use the pacman package manager with the following command: 

sudo pacman -S rdesktop

Verify installation

After installing Linux rdesktop, confirm that it is installed correctly by checking the version via the command:

rdesktop --version

Complete rdesktop Command Syntax Reference

The basic rdesktop command in Linux is:

rdesktop [options] <server[:port]>

By default, rdesktop connects over port 3389 (the standard RDP port). Below is a complete reference of available options and flags. 

 

FlagDescriptionExample
-u <username>To define a username during authentication-u administrator
-p <password>To define a password for login (use quotes for special characters)-p ‘MyP@ss!’
-d <domain>To define the domain name for Windows during login-d CORP
-g <geometry>To define window size, either W x H or a percentage-g 1920×1080 or -g 85%
-fTo display in full-screen mode-f
-FTo display in full-screen mode without a title bar-F
-a <depth>To specify the color depth: 8, 15, 16, 24, or 32 bit-a 16
-r disk:name=/pathTo redirect a local folder as a network drive-r disk:share=/home/user/files
-r sound:localTo redirect an audio file to a local computer -r sound:local
-r clipboard:PRIMARYCLIPBOARDTo allow copy-paste (clipboard sharing) between a local and a remote system-r clipboard:PRIMARYCLIPBOARD
-r printer:nameTo redirect a local printer-r printer:myprinter
-T <title>To set a custom window title-T ‘Work Server’
-NTo turn off numlock sync-N
-mTo disable motion events to reduce bandwidth usage-m
-bTo trigger bitmap updates, which is useful for slow connections-b
-eTo turn off encryption (use on private or trusted networks only)-e
-ETo enable SSL encryption in a remote session-E
-x <experience>To specify connection speed preset from options like m, b, l, w, or s-x l (LAN)
-zTo turn on RDP compression-z
-PTo activate persistent bitmap caching-P
-0To connect directly to the console session-0
-5To connect using RDP v5 (default is v4)-5
-4To set the RDP version to 4 (v4)-4
-k <layout>To define keyboard layout (e.g., en-US, de)-k en-us
-n <hostname>To override the local hostname sent to the server for the connection-n mylinux
-l <level>To specify license level (default: user)-l user
-t <port>To set up a connection using an alternative RDP port-t 3390
-o <file>To log an output to a file-o /tmp/rdp.log
-c <directory>To define a working directory for a remote session-c C:\Users
-s <shell>To use a different shell for the remote session-s cmd.exe

Real World rdesktop Examples with Commands

  • • Basic RDP connection: Make a simple RDP connection to a Windows machine using only the IP address and username.
rdesktop 192.168.1.100 -u administrator
  • • Non-interactive connection using a password: This is commonly used in scripts. For security, don’t store passwords in shell history. Instead, use environments wherever possible. 
rdesktop 192.168.1.100 -u administrator -p 'P@ssword123'
  • • Authenticate with a Windows domain account: This allows centralized login and access control across networked systems. 
rdesktop 192.168.1.100 -u john.doe -p 'Secret' -d CORP
  • • Run in full-screen at a defined resolution: Run the remote session in full-screen mode while setting a specific display resolution. 
rdesktop -f -g 1920x1080 192.168.1.100 -u administrator
  • • Open in a window mode using 85% of the screen: Run the remote session in a window that occupies 85% of your screen area. 
rdesktop -g 85% 192.168.1.100 -u administrator
  • • Specify a non-standard port when connecting: Connect to a remote system using a port other than the RDP port.
rdesktop 192.168.1.100:3390 -u administrator
  • • Activate clipboard sharing: Allow copy-and-paste between your local machine and the remote session. 
rdesktop -r clipboard:PRIMARYCLIPBOARD 192.168.1.100 -u administrator
  • • Map a local directory as a network drive:  This allows your Linux folder to show up as a drive on the Windows desktop.
rdesktop -r disk:linuxfiles=/home/user/Documents 192.168.1.100 -u administrator
  • • Forward remote audio to the local device: Redirect audio from the remote session so it plays through your local speakers. 
rdesktop -r sound:local 192.168.1.100 -u administrator
  • • High-quality connection optimized for LAN use: It uses settings optimized for local area networks to deliver the best possible performance and display quality. 
rdesktop -x l -a 24 -P -z 192.168.1.100 -u administrator
  • • Optimized for use over slow or WAN connections: Uses reduced quality settings optimized for slow or wide-area network (WAN) connections.
rdesktop -x m -a 8 -b -m -z 192.168.1.100 -u administrator
  • • Connect directly to the console session: Allows access to the server’s physical console session (session 0), typically for admin tasks.
rdesktop -0 192.168.1.100 -u administrator
  • • Use a custom keyboard mapping: Allows you to define a specific keyboard layout for the remote session.
rdesktop -k de 192.168.1.100 -u administrator
  • • Start a single application instead of the full desktop session: Starts a specific application directly on the remote system instead of loading the full desktop environment.
rdesktop -s 'notepad.exe' 192.168.1.100 -u administrator
  • • Production-ready command with all standard options: Shows a complete rdesktop command line using commonly used options for real-world scenarios.
rdesktop -u administrator -p 'P@ssword' -d CORP -g 1920x1080 -a 24 -r clipboard:PRIMARYCLIPBOARD -r sound:local -r disk:share=/home/user/shared -P -z -T 'Production Server' 192.168.1.50

How to Start an rdesktop Session with Windows 11

  1. On Windows, go to Settings > System > Remote Desktop. Here, you can enable RDP. NLA needs to be disabled for rdesktop. You can also see your RDP port here.

    Remote Desktop settings on Windows 11, expanded to show the NLA toggle
  2. Run ipconfig in CMD or PowerShell (can be opened from the Win+X menu) to see your PC’s IP on the local network.

    The results of ipconfig include your local IP address
  3. On linux, install rdesktop. In this example, we’re using the apt package manager.

    Installing rdesktop from the command line
  4. Since rdesktop has a console-based interface, you may find the “man rdesktop” command useful.

    The man command displays a manual page for rdesktop
  5. When connecting, you need to confirm that you trust the session host.

    rdesktop asking if you trust the host OS's security certificate
  6. You can now log in.

    Windows 11 log-in screen

HelpWire as a Modern Replacement for rdesktop

rdesktop doesn’t support NLA, which means it won’t connect to Windows 10/11 or Server 2012+ out of the box. Workarounds exist — disabling NLA or switching to xfreerdp — but both add friction. HelpWire connects to any modern Windows system from Linux without any of that. 

HelpWire is a remote support tool with direct, NAT-friendly connections — no server to configure, no VPN, no open ports. The operator signs up with an email; the client just opens a shareable link to connect — no account needed. Free for personal and commercial use, no credit card required.

Why Teams Replace rdesktop with HelpWire:

  • Works with modern Windows

    no NLA issues, no compatibility workarounds needed for Windows 10/11 or Server 2016+.

  • Graphical interface

    see the remote desktop visually, control it with mouse and keyboard. No flags or syntax to remember.

  • Native Linux support

    the operator app runs natively on Linux. No third-party compatibility layers needed. 

  • Actively maintained

    unlike rdesktop, HelpWire receives regular updates with full vendor support. 

How to Set Up HelpWire on Linux

  1. Download and install it on your Windows and Linux systems.

  2. Modify the user and access permission settings.

  3. Start a connection to the Windows machine through the Linux client.

Read and view the detailed guide on how to start a HelpWire Quick Session on a Linux connection step-by-step.

Frequently Asked Questions

You can use Ctrl + Alt + Enter to alternate between full-screen and windowed mode. If the session becomes unresponsive, go to your terminal and press Ctrl + C to stop the process.

RDP uses the default port 3389. If you want to connect to a specific port, include the custom port number in the IP address using a colon. For eg, rdesktop 192.168.1.100:3390. Also, you can use the -t flag to do the same.

The error “CredSSP required by server” occurred because rdesktop does not support NLA, but Windows 11 requires it for security reasons. To resolve the issue, you need to either disable NLA on your Windows machine or use an alternative tool, xfreerdp, with the /cert:ignore flag.