--- title: "Remote Shell" slug: "remote-shell" updated: 2026-03-09T17:04:18Z published: 2026-03-09T17:04:18Z canonical: "support.anydesk.com/remote-shell" --- > ## Documentation Index > Fetch the complete documentation index at: https://support.anydesk.com/llms.txt > Use this file to discover all available pages before exploring further. # Remote Shell > [!NOTE] > **平台:**仅支持 Linux Remote Shell 允许您通过 AnyDesk 在远程 Linux 设备上打开一个终端。该会话的行为与本地终端类似,并支持标准 shell 命令、环境变量以及交互式提示,例如 `sudo`。 ## 要求 - 在两个设备上安装 AnyDesk 8.0.0 for Linux 或更高版本。 - 远程设备必须运行显示服务器。无头(headless)环境不受支持。 --- ## 权限 Remote Shell 默认处于禁用状态。您可以在连接请求期间或通过权限配置文件启用或禁用该功能。 - 当出现连接请求或在活动会话期间,可在 **Accept Window** 中启用或禁用 Remote Shell。 ![AnyDesk interface showing a connected session with highlighted option for Remote Shell.](https://cdn.document360.io/b94c9ac2-20ec-4c7e-b325-135b0ed113f9/Images/Documentation/1. accept window- remote shell.png) - 要更改特定连接类型的默认行为,请导航至 **设置 > 权限**。在此处,您可以为相关的 [权限配置文件](/v1/docs/setting-up-permission-profiles) 调整 **Remote Shell** 设置。 > [!CAUTION] > 🚨 **重要** > > 如果在 shell 已打开时撤销 Remote Shell 权限,shell 会立即终止,并显示错误消息。 --- ## 启动 Remote Shell 会话 您可以通过以下几种方式启动 Remote Shell 会话: 1. **通过连接输入框。** 输入远程 AnyDesk ID 或别名,然后选择 **Remote Shell** 图标。 ![AnyDesk interface showing remote access options and user address for connection.](https://cdn.document360.io/b94c9ac2-20ec-4c7e-b325-135b0ed113f9/Images/Documentation/2_enter id and select remote shell.png) 2. **通过设备卡片。** 在 **Recent Sessions**、**Favorites** 或其他设备列表中右键点击任意设备卡片,然后选择 **Remote Shell**。 3. **在活动会话中。** 在标准远程会话期间,找到 **Session Toolbar**,点击 **Actions** 图标,然后选择 **Remote Shell**。 ![AnyDesk interface showing remote access options and highlighted Remote Shell feature.](https://cdn.document360.io/b94c9ac2-20ec-4c7e-b325-135b0ed113f9/Images/Documentation/3. in session - actions - remote shell .png) --- ## Remote Shell 行为 - 会话默认在 Bash 中启动。您可以使用标准 shell 命令切换到其他已安装的 shell,例如 `zsh` 或 `fish`。 - 如果远程设备上已有用户登录,命令将在该用户的上下文中运行。 - 如果没有用户登录,命令将在登录管理器(例如 GDM 或 SDDM)下运行。 - **输入时取消滚动** – 默认启用。当启用时,开始输入时终端视图会自动返回到当前活动的命令提示符。右键点击终端即可切换此设置。 - 支持 `sudo` 的交互式密码提示。 - 您可以在一个连接中打开多个终端实例。 - 您可以锁定键盘输入,以防止误输入命令。 - 通过 Remote Shell 执行的命令可能会被操作系统记录。如果远程系统启用了 shell 历史记录,命令将被保存到历史文件中(例如 `.bash_history`)。 ### 快捷键与导航 | **操作** | **输入** | | --- | --- | | **滚动历史记录** | `SHIFT` + `Page Up` / `Page Down` | | **标准复制与粘贴** | 使用系统标准复制粘贴快捷键或右键菜单。 | | **快速复制与粘贴** | 选择文本,然后使用鼠标中键粘贴。 | | **替代粘贴** | `SHIFT` + `Insert` | --- ## 故障排除 Shell 会话意外关闭。 ![](https://cdn.document360.io/b94c9ac2-20ec-4c7e-b325-135b0ed113f9/Images/Documentation/5. error message.png) ### 原因 远程设备上的 **Remote Shell** 权限已被禁用。 ### 解决方案 请确认在 **Accept Window** 和权限配置文件中仍然启用了 Remote Shell。