List and define SMB shares from command-line
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.