命令行界面
While most tasks in Unraid can be performed through the WebGUI, certain operations - especially those related to diagnostics, drive management, or scripting - require using the system console or SSH terminal. This page offers Unraid-specific command-line tools and examples that can be used without needing extensive Linux knowledge.
Many disk-level Unraid operations depend on Linux device names, like /dev/sdX
. You can find the device identifier for any drive in the Main tab of the WebGUI. Look for the three-letter label sdX
or nvmeX
next to each disk. Use the appropriate identifier in all commands, replacing sdX
with your specific disk.
访问终端
Unraid includes a built-in web terminal that you can access directly from the WebGUI. Simply use the top-right dropdown menu and select ">_". This opens a command-line session as the root user, giving you full administrative access to your system.
您也可以使用 %SSH|ssh%(安全壳)与 PuTTY 等客户端外部连接到 Unraid 服务器。
终端访问对于以下情况很有用:
- 运行例如
smartctl
、xfs_repair
、tail
或top
等诊断和命令行工具 - 执行不需要用户界面的插件脚本或工具
- Troubleshooting issues related to connectivity, system services, or user shares
使用 PuTTY(仅限 Windows)
如果您使用的是Windows,可能更喜欢使用PuTTY进行SSH访问,而不是内置终端。这个软件轻量级、免费,并允许您保存会话以便日后轻松访问。
如何安装和使用PuTTY - 点击展开/折叠
Unraid automatically configures the SSH server on the first boot. Ensure your networking is working properly and that your root password is set before attempting a remote connection.
驱动器测试和监控
These tools assist with evaluating performance, checking drive health, and troubleshooting array slowness. All commands should be executed from the terminal or via SSH.
hdparm
使用此命令测试读取速度并显示驱动器特性。
查看hdparm选项 - 点击展开/折叠
测试驱动器读取速度:
hdparm -tT /dev/sdX
-t
标记测试缓冲磁盘读取,而-T