List and define SMB shares from command-line In MacOS, is it possible to list and/or define SMB shares at the command-line?
On a Linux machine with Samba, I can use the testparm command and the /etc/samba/smb.conf file.
On Windows it would be the net share ... command.
On Mac, I only know the &quot;System Preferences&quot; &gt; &quot;Sharing&quot; GUI. But to check or set these shares on multiple machines, I would like to be able to do it through SSH sessions and the command-line.
Is this possible?
On macOS open Terminal and type man sharing to review the manual page. You can use sharing -l to list AFP/SMB share info. You can add and remove shares using this command line tool.
You can use the df -h command or mount command to list externally mounted volumes &amp; shares.