Azure Docs

Mount an Azure Files share on macOS

This guide explains how to mount an Azure Files share on a macOS client using the Server Message Block (SMB) protocol. Azure Files offers fully managed file shares in the cloud that are accessible via the industry-standard Server Message Block (SMB) protocol.

Prerequisites

Steps to Mount

1. Obtain Storage Account Name and Key

Navigate to your storage account in the Azure portal. In the left-hand menu, select Access keys. Copy the storage account name and one of the keys. You'll need these for authentication.

2. Mount the Share using Finder

macOS provides a straightforward way to connect to SMB shares:

  1. Open Finder.
  2. From the menu bar, select Go > Connect to Server... (or press Cmd + K).
  3. In the "Server Address" field, enter the SMB connection string in the following format:
    smb://YOUR_STORAGE_ACCOUNT_NAME.file.core.windows.net/YOUR_FILE_SHARE_NAME
    Replace YOUR_STORAGE_ACCOUNT_NAME with your storage account name and YOUR_FILE_SHARE_NAME with the name of your file share.
  4. Click Connect.
  5. You will be prompted for credentials. Choose Registered User.
  6. Enter the following:
    • Name: YOUR_STORAGE_ACCOUNT_NAME
    • Password: Your storage account access key.
  7. Click Connect.

Your Azure Files share should now be mounted and accessible in Finder under "Locations" or as a mounted volume.

3. Mount the Share using the Terminal (Optional)

For command-line users, you can mount the share using the mount command:

Note: Mounting via the terminal requires more advanced configuration and is generally less common for typical users. The Finder method is recommended for most scenarios.

First, create a mount point directory:

mkdir ~/AzureShare

Then, use the mount command:

mount -t cifs //YOUR_STORAGE_ACCOUNT_NAME.file.core.windows.net/YOUR_FILE_SHARE_NAME ~/AzureShare -o vers=3.0,username='YOUR_STORAGE_ACCOUNT_NAME',password='YOUR_STORAGE_ACCOUNT_ACCESS_KEY',sec=ntlmssp

Replace the placeholders with your actual storage account name, file share name, and access key.

To unmount the share, use:

umount ~/AzureShare

Troubleshooting

Security Considerations

For more advanced configurations or specific requirements, refer to the official Azure documentation on Azure Files integration with macOS.