The other day I only had access to my secondary Mac (mac mini) via the Terminal. For some reason Screen Share did not work. I needed to enabled File Sharing on my mac mini in order to transfer some backup files from my MacBook Pro to the mac mini. Coffee was brewing!
This is how I activated File Sharing via the terminal on the mac mini. I ran these two commands:
sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.smbd.plist
and then this one:
sudo defaults write /Library/Preferences/SystemConfiguration/com.apple.smb.server.plist EnabledServices -array disk
I was then able to see the shares on my MacBook Pro. This approach is good for home use because in this case we are sharing all folders in the mac mini.
If you like to disable file sharing via terminal again run this command:
sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.smbd.plists
Hope this post was helpful. If you like it grab a NYCMoments Coffee Mug from my sister website. Thanks!