How to Use the macOS smbutil Command to Check SMB File Sharing Connections

Troubleshooting File Sharing on Mac

macOS relies heavily on the Server Message Block (SMB) protocol to connect to network-attached storage (NAS) drives, Windows servers, and other Macs. Usually, you simply open Finder, press Command + K, type smb://server_address, and the network drive mounts perfectly.

However, when an SMB connection fails, drops randomly, or transfers files at an agonizingly slow speed, the graphical Finder provides almost no troubleshooting information. It simply hangs on a “Connecting…” screen or throws a generic “Server connection interrupted” error.

To diagnose the actual problem, you need to use the smbutil command in the macOS Terminal. This built-in utility provides deep insight into your SMB connections, showing you exactly which dialect of the protocol your Mac is using and where the connection is failing.

Step 1: Open the Terminal

To use smbutil, you must open the command line.

  1. Press Command + Space to open Spotlight Search.
  2. Type Terminal and press Enter.

Step 2: View Active SMB Connections

If you have successfully mounted a network drive, but it feels sluggish, the first thing you should check is the SMB protocol version. Older servers might force your Mac to use SMB1, an archaic, insecure, and incredibly slow protocol that Apple strongly discourages using.

To check the active connection stats, run the following command:

smbutil statshares -a

This command outputs a detailed table for every actively mounted SMB share. Look for the row labeled SMB_VERSION.

  • If it says SMB_3.02 or SMB_3.1.1, your connection is modern, secure, and fast.
  • If it says SMB_2.1, it is acceptable but lacks modern encryption.
  • If it says SMB_1, this is the root cause of your slow transfer speeds. You must log into the server (e.g., your Synology NAS or Windows Server) and explicitly configure it to use a minimum protocol of SMB2 or SMB3.

Step 3: Test a Connection Before Mounting

If you cannot even get the drive to mount in Finder, you can use smbutil to test if the server is actually responding to SMB traffic on port 445.

Use the status flag followed by the IP address or hostname of the server:

smbutil status 192.168.1.50

If the server is online and correctly configured for file sharing, the Terminal will output the server’s NetBIOS name, its workgroup, and the server type (e.g., Windows or Samba). If the command simply times out and returns an error, the server is either powered off, the SMB service has crashed, or a firewall is actively blocking port 445 between your Mac and the server.

Step 4: Resolve DFS Routing Issues

In large corporate environments, IT departments often use Distributed File System (DFS) namespaces. Instead of connecting to a specific server, you connect to a generic namespace (like smb://company.local/files), and a DFS server routes you to the correct physical machine.

If the DFS routing breaks, your Mac will fail to mount the drive. You can query the DFS referral cache to see exactly which physical server your Mac is currently trying to connect to.

smbutil dfs 192.168.1.50

This will list the physical IP addresses behind the namespace. If the IP address listed is incorrect or dead, you can force macOS to clear its cache and request a fresh route by unmounting the drive and restarting the Mac, or by contacting your IT department with the exact routing error provided by the smbutil output.

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.