最常见的两种方式:

1. 使用 Samba 共享 (SMB/CIFS)

在 Ubuntu 上:

sudo apt update
sudo apt install samba
sudo nano /etc/samba/smb.conf

添加共享目录配置,例如:

[shared]
   path = /home/yourname/shared
   browseable = yes
   read only = no
   guest ok = yes

重启 Samba:

sudo systemctl restart smbd

然后在 Win11 资源管理器里输入:

\\<Ubuntu_IP>\shared

即可访问。


2. 使用 SSHFS(更安全)

Win11 上安装 WinFsp + SSHFS-Win

安装好后,在 Win11 里执行:

net use Z: \\sshfs\username@Ubuntu_IP\

这样就能把远程 Ubuntu 的目录挂载到 Z: 盘。