如果您有网络驱动器或网络附加存储 (NAS) 设备(Network Attached Storage (NAS) device),则可以从Mac访问它。
在 macOS 中映射网络驱动器可让您快速轻松地创建网络上任何共享文件夹和文件的快捷方式。这样,您在访问它们时就不必输入网络地址。
如果您想了解如何在 macOS 中映射网络驱动器,请按照以下步骤操作。

如何使用 Finder(Using Finder)在 macOS 中映射网络驱动器(Network Drive)
您可以使用SMB(SMB)网络协议使用内置Finder应用程序在 macOS 中映射网络驱动器。
macOS、大多数Linux(Linux)设备和Windows PC(Windows PCs)支持此通用协议。映射驱动器将允许您访问它,就像它直接连接到您的Mac一样。
- 要在 macOS 中映射网络驱动器,请首先通过Dock图标或从Launchpad打开(Launchpad)Finder。
- 在Finder中,选择菜单栏上的“前往”,然后选择“连接(Connect)到服务器”(Server)。

- (Enter)在服务器地址字段中(Server Address)输入驱动器的网络地址。它应以 smb:// 开头,后跟驱动器的 IP 地址或主机名以及文件夹名称(例如 smb://192.168.0.2/files 或 smb://nas-drive.local/files)。
- 单击“连接”(Click Connect)。如果系统提示您输入用户名和密码,请输入它们并再次单击“连接”(Connect)。如果需要,您可能还需要输入驱动器的网络区域或工作组。

连接后,您将在桌面上以及Finder侧边栏的“位置”(Locations)部分中看到一个新图标。这就是您的映射网络驱动器 - 双击该图标以打开并使用该驱动器。
该驱动器将保持连接状态,直到你的电脑重新启动,但之后你需要重复这些步骤才能再次连接到它。或者,按照以下步骤在每次重新启动后自动映射您的驱动器。
如何使用 Finder(Using Finder)在 macOS 中断开与映射网络驱动器的连接(Mapped Network Drive)
如果您不再需要访问映射的网络驱动器,您可以使用Finder应用程序快速断开连接。请确保在继续之前关闭并保存驱动器中所有打开的文件,否则可能会面临数据丢失的风险。
要与 macOS 中的映射网络驱动器断开连接,请在侧边栏的“位置”(Locations)部分中找到该驱动器,然后按“弹出”(Eject)图标。或者,右键单击桌面上或Finder(Finder)侧栏中的映射网络驱动器图标,然后选择“弹出”(Eject)。

如何在 macOS 中
自动映射(Automatically Map)网络驱动(Network Drive)器
如果您希望在重新启动Mac(Mac)后保留映射的网络驱动器,则需要启用自动挂载。然后,当您登录时,
您的Mac将自动连接到该驱动器。(Mac)
按照以下步骤在 macOS Ventura(Ventura)及更高版本中映射网络驱动器。
- 按(Press)Apple菜单图标并选择系统设置(System Settings)。

- 在“设置”(Settings)中,按General > Login Items。

- 单击(Click)底部的加号 (+) 按钮并导航到映射的网络驱动器。

- 选择驱动器并单击“添加”(Add)或“打开”(Open)。

现在,您每次登录 Mac 时,映射的网络驱动器都将保持可用并保持连接(Mac)。
如何通过终端(Terminal)在 macOS 中映射网络驱动器(Network Drive)
您还可以使用终端(Terminal)应用程序在 macOS 中映射网络驱动器。此方法允许您使用命令快速连接和断开网络驱动器。
- 从启动板(Launchpad)的实用程序文件夹中打开终端(Terminal)。
- (Type)在终端窗口中(Terminal)输入sudo mount_smbfs //username:password@networkaddress/foldername /Volumes/foldername并按Enter。将用户名、密码、网络地址和文件夹名称替换为您自己的值。(Replace)例如,mount_smbfs //用户:密码@192.168.0.10/nas /Volumes/nas。此命令将在 /Volumes 下创建一个与您的网络驱动器同名的 nas 文件夹并将其挂载到此处。
- 要断开与网络驱动器的连接,请在终端中输入 umount /Volumes/foldername 并按Enter。将(Replace)文件夹名称替换为您的网络驱动器的名称。
如何通过终端断开与(Terminal)映射网络驱动器的连接(Mapped Network Drive)
要使用终端断开与映射驱动器的连接,可以使用 umount 命令。此命令将从 /Volumes 目录中卸载与网络驱动器对应的文件夹。
要使用 umount 断开与映射驱动器的连接,请按照以下步骤操作。
- 通过Launchpad(Launchpad)中的实用程序文件夹打开终端(Terminal)应用程序。
- 在终端(Terminal)窗口中,输入 ls /Volumes 并按Enter键列出Mac上所有已安装的驱动器。
- 在列表中找到您的网络驱动器的名称。它应该与网络地址的最后部分相同(例如 nas)。
- 键入(Type)umount /Volumes/nas以断开与网络驱动器的连接,其中 nas 是网络驱动器的名称。如果这不起作用,请使用 sudo 强制命令以必要的权限运行(例如 sudo umount /Volumes/nas)。
- 按 Enter(Press Enter)并输入您的密码(如果提示这样做)。
- 如果这不起作用,请在终端窗口中输入 diskutil unmount (Terminal)/Volumes/nas并按Enter。您可能还需要在此处使用 sudo 命令(例如 sudo diskutil umount /Volumes/nas)。
在 macOS 中
映射网络驱动器(Network Drive)的故障排除提示(Tips)
难以连接到Mac上的网络驱动器?如果您在 macOS 中尝试映射网络驱动器时遇到问题,以下提示可帮助您修复这些问题:
- 确保您的Mac和网络驱动器位于同一网络上并且可以访问互联网。
- 检查您的网络驱动器是否支持SMB协议,macOS 使用该协议连接到共享文件夹和文件。大多数现代NAS设备都支持SMB,大多数操作系统也是如此。
- 验证您是否输入了正确的网络地址、用户名和密码来访问网络驱动器上的文件。
- 如果您在Finder(Finder)中找不到您的网络驱动器,请尝试使用其 IP 地址而不是主机名(例如,使用 smb://192.168.0.2 而不是 smb://nas-drive.local)。
- 如果您的Mac或网络驱动器上有防火墙(firewall)或防病毒软件,请确保它们不会阻止SMB连接。
使用 Mac(Network Using Your Mac)管理网络上的文件
如果您想跨多个设备管理文件,可以使用网络驱动器。使用上述步骤在 macOS 中映射网络驱动器是通过网络访问这些共享文件夹和文件的便捷方法。
设置网络驱动器后,您可以将文件(move your files)移入或移出。您还可以使用 Mac 上的 Google 云端硬盘(use Google Drive on your Mac)作为本地或网络存储的替代方案来保存重要文件。
How to Map a Network Drive in macOS
If you havе a network drive or a Network Attached Storage (NAS) device, you can access it from your Mac.
Mapping a network drive in macOS lets you create a quick and easy shortcut to any shared folders and files on your network. This way, you don’t have to enter the network address whenever you want to access them.
If you want to know how to map a network drive in macOS, follow the steps below.

How to Map a Network Drive in macOS Using Finder
You can map a network drive in macOS using the built-in Finder app using the SMB network protocol.
This common protocol is supported on macOS, most Linux devices, and on Windows PCs. Mapping the drive will allow you to access it as if it was connected to your Mac directly.
- To map a network drive in macOS, first open Finder via your Dock icons or from the Launchpad.
- In Finder, select Go on the menu bar and choose Connect to Server.

- Enter the network address of your drive in the Server Address field. It should start with smb:// followed by your drive’s IP address or hostname and the folder name (for example, smb://192.168.0.2/files or smb://nas-drive.local/files).
- Click Connect. If you’re prompted for a username and password, enter them and click Connect again. You may also need to enter the network area or workgroup of your drive if it’s required.

Once connected, you’ll see a new icon on your desktop and in the Locations section of the Finder sidebar. That’s your mapped network drive—double-click the icon to open and use the drive.
The drive will remain connected until your PC restarts, but you’ll need to repeat these steps to connect to it again afterward. Alternatively, follow the steps below to automatically map your drive after each restart.
How to Disconnect from a Mapped Network Drive in macOS Using Finder
If you no longer need to access your mapped network drive, you can disconnect from it using the Finder app quickly. Make sure to close and save any open files from the drive before proceeding, or you may risk data loss.
To disconnect from a mapped network drive in macOS, locate the drive in the Locations section in the sidebar, then press the Eject icon. Alternatively, right-click the icon of your mapped network drive on your desktop or in the Finder sidebar and choose Eject instead.

How to Automatically Map a Network Drive in macOS
If you want your mapped network drive to remain after you restart your Mac, you need to enable automounting. Then, your Mac will automatically connect to the drive when you log in.
Follow these steps to map a network drive in macOS Ventura and later.
- Press the Apple menu icon and select System Settings.

- In Settings, press General > Login Items.

- Click the plus (+) button at the bottom and navigate to your mapped network drive.

- Select the drive and click Add or Open.

Your mapped network drive will now remain available and connected every time you log in to your Mac.
How to Map a Network Drive in macOS via the Terminal
You can also map a network drive in macOS using the Terminal app. This method allows you to use commands to connect and disconnect from your network drive quickly.
- Open Terminal from the Utilities folder in the Launchpad.
- Type sudo mount_smbfs //username:password@networkaddress/foldername /Volumes/foldername into the Terminal window and press Enter. Replace username, password, networkaddress, and foldername with your own values. For example, mount_smbfs //user:password@192.168.0.10/nas /Volumes/nas. This command will create a nas folder under /Volumes with the same name as your network drive and mount it there.
- To disconnect from your network drive, type umount /Volumes/foldername into the terminal and press Enter. Replace foldername with the name of your network drive.
How to Disconnect from a Mapped Network Drive via the Terminal
To disconnect from a mapped drive using the terminal, you can use the umount command. This command unmounts the folder corresponding to your network drive from the /Volumes directory.
To disconnect from a mapped drive using umount, follow these steps.
- Open the Terminal app via the Utilities folder in the Launchpad.
- In the Terminal window, type ls /Volumes and press Enter to list all the mounted drives on your Mac.
- Find the name of your network drive in the list. It should be the same as the last part of your network address (for example, nas).
- Type umount /Volumes/nas to disconnect from your network drive, where nas is the name of your network drive. If this doesn’t work, use sudo to force the command to run with the necessary privileges (eg. sudo umount /Volumes/nas).
- Press Enter and enter your password (if prompted to do so).
- If this doesn’t work, type diskutil unmount /Volumes/nas into the Terminal window and press Enter. You may also need to use the sudo command here (eg. sudo diskutil umount /Volumes/nas).
Troubleshooting Tips for Mapping a Network Drive in macOS
Struggling to connect to your networked drives on a Mac? If you encounter issues trying to map a network drive in macOS, here are some tips to help you fix them:
- Ensure your Mac and your network drive are on the same network and have internet access.
- Check if your network drive supports the SMB protocol, which macOS uses to connect to shared folders and files. Most modern NAS devices support SMB, as do most operating systems.
- Verify that you have entered the correct network address, username, and password to access files on your network drive.
- If you can’t find your network drive in Finder, try using its IP address instead of its hostname (for example, smb://192.168.0.2 instead of smb://nas-drive.local).
- If you have a firewall or antivirus software on your Mac or your network drive, ensure they are not blocking SMB connections.
Managing Files on a Network Using Your Mac
If you want to manage your files across multiple devices, you can use a network drive. Mapping a network drive in macOS using the steps above is a convenient way to access these shared folders and files across your network.
Once you’ve set up your network drive, you can move your files to or from it. You can also use Google Drive on your Mac as an alternative to local or network storage to save your essential files.