You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何在Ubuntu 24.04 LTS桌面创建群晖(Synology)NAS文件的快捷方式

如何在Ubuntu 24.04 LTS桌面创建群晖(Synology)NAS文件的快捷方式

Hey Dave, no worries—let's get that NAS shortcut set up on your Ubuntu 24.04 desktop. I've walked through this process countless times, so here are two reliable methods depending on your preference:

方法1:GNOME图形界面快速创建(临时/便捷型)

If you prefer clicking around over typing commands, this is the way to go:

  • Open the Files (Nautilus) app, then click + Other Locations in the left sidebar.
  • In the "Connect to Server" field, enter your Synology NAS's SMB address: smb://[你的NAS IP地址]/[共享文件夹名称] (e.g., smb://192.168.1.100/Backup).
  • Click "Connect", then input your NAS username and password. Check "Remember forever" so you don't have to re-enter credentials later, then hit "Connect" again.
  • Once the shared folder loads, you can either:
    • Drag the folder's icon directly from the left sidebar (under "Network") to your desktop—this creates an instant shortcut.
    • Or right-click the desktop → "Create Launcher", set the name to "Synology NAS", the command to nautilus smb://192.168.1.100/共享文件夹, and pick an icon like "network-server" from the list.

方法2:持久挂载+桌面快捷方式(重启后仍生效)

For a permanent setup that survives reboots, use this method:

Step 1: Create a local mount point

Open the terminal (press Ctrl+Alt+T), then run:

sudo mkdir /mnt/synology-nas

Enter your Ubuntu user password when prompted (it won't show on screen, that's normal).

Step 2: Set up auto-mount via fstab

Edit the fstab file to make the mount persistent:

sudo nano /etc/fstab

Add this line to the end of the file (replace placeholders with your NAS details):

//192.168.1.100/共享文件夹 /mnt/synology-nas cifs username=你的NAS用户名,password=你的NAS密码,iocharset=utf8,vers=3.0 0 0

Pro tip: To avoid storing your password in plaintext, create a credentials file instead:

  1. Run sudo nano /etc/samba/nas-credentials
  2. Add:
    username=你的NAS用户名
    password=你的NAS密码
    
  3. Save and close, then lock the file: sudo chmod 600 /etc/samba/nas-credentials
  4. Replace the fstab line with:
    //192.168.1.100/共享文件夹 /mnt/synology-nas cifs credentials=/etc/samba/nas-credentials,iocharset=utf8,vers=3.0 0 0
    

Step 3: Test the mount

Run this command to verify the mount works without rebooting:

sudo mount -a

If no errors pop up, your NAS is now mounted at /mnt/synology-nas.

Step 4: Create the desktop shortcut

  • Right-click your desktop → "New Document" → "Empty Document", name it Synology-NAS.desktop.
  • Open the file and paste this content:
    [Desktop Entry]
    Type=Link
    Name=Synology NAS
    Comment=Access my Synology shared folders
    URL=file:///mnt/synology-nas
    Icon=network-server
    
  • Save the file, then right-click it → "Properties" → "Permissions", check "Allow executing file as program".

Quick Notes

  • Make sure your NAS and Ubuntu are on the same local network, and double-check the NAS IP address (you can find it in your Synology DSM's control panel).
  • Ensure SMB is enabled on your Synology: Open DSM → "Control Panel" → "File Services" → "SMB/AFP/NFS", toggle on SMB and set the version to 3.0 for best compatibility.

备注:内容来源于stack exchange,提问作者davew

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.04.16 11:49:42