Here’s a list of useful Terminal commands

Show hidden files in the Finder
defaults write com.apple.finder AppleShowAllFiles YES; killall Finder

Hide hidden files in the Finder
defaults write com.apple.finder AppleShowAllFiles NO; killall Finder

Flush the DNS cache on macOS 10.10.4 and up (requires admin password)
sudo killall -HUP mDNSResponder

Disable “Remote Disc” in Finder
sudo defaults write /Library/Preferences/com.apple.NetworkBrowser EnableODiskBrowsing -bool false; killall Finder

Quit printer dock icon automatically after finished printing (requires reboot)
defaults write com.apple.print.PrintingPrefs "Quit When Finished" -bool YES

DISABLE: Quit printer dock icon automatically after finished printing (requires reboot)
defaults write com.apple.print.PrintingPrefs "Quit When Finished" -bool NO

Use default set of Dock icons
defaults delete com.apple.dock; killall Dock

View SMB version of connection
smbutil statshares -a

List logged in users
last |grep "logged in"

Remove user account picture
dscl . delete /Users/[username] jpegphoto; dscl . delete /Users/[username] Picture

Change user account to admin
sudo dseditgroup -o edit -a [username] -t user admin

Change user account to standard
sudo dseditgroup -o edit -d [username] -t user admin

Change password of user account
dscl . -passwd /Users/[username] [oldpassword] [newpassword]

Get version number for an application
defaults read /Applications/Microsoft\ Word.app/Contents/Info CFBundleShortVersionString