腾讯云TDP-为ubuntu 21.04 server 配置允许从windows rdp登录

为ubuntu 21.04 server配置允许从windows进行远程桌面登录的步骤如下:

  1. 编辑 /etc/apt/sources.list 文件以更换源

    打开并编辑

    /etc/apt/sources.list
    文件,替换其中的内容为以下代码:

    deb http://mirrors.tencentyun.com/ubuntu/ jammy main multiverse restricted universe
    deb http://mirrors.tencentyun.com/ubuntu/ jammy-backports main multiverse restricted universe
    deb http://mirrors.tencentyun.com/ubuntu/ jammy-proposed main multiverse restricted universe
    deb http://mirrors.tencentyun.com/ubuntu/ jammy-security main multiverse restricted universe
    deb http://mirrors.tencentyun.com/ubuntu/ jammy-updates main multiverse restricted universe
    deb-src http://mirrors.tencentyun.com/ubuntu/ jammy main multiverse restricted universe
    deb-src http://mirrors.tencentyun.com/ubuntu/ jammy-backports main multiverse restricted universe
    deb-src http://mirrors.tencentyun.com/ubuntu/ jammy-proposed main multiverse restricted universe
    deb-src http://mirrors.tencentyun.com/ubuntu/ jammy-security main multiverse restricted universe
    deb-src http://mirrors.tencentyun.com/ubuntu/ jammy-updates main multiverse restricted universe
  2. 安装桌面环境

    执行以下命令以更新软件包列表并安装Ubuntu桌面环境:

    apt update
    apt install ubuntu-desktop
  3. 重启系统

    安装完成后,重启系统以使更改生效:

    reboot
  4. 安装和配置xrdp

    重新登录后,执行以下命令以安装并启用xrdp服务:

    apt update
    apt install xrdp
    systemctl enable --now xrdp
  5. 查看效果

    完成以上步骤后,您应该能够从Windows系统通过远程桌面协议(RDP)连接到Ubuntu Server。