How to disable the Guest account in macOS Mojave using `dscl`?
Here is how to disable Guest user via command line

sudo defaults write /Library/Preferences/com.apple.loginwindow GuestEnabled -bool FALSE

Note, re-enabling it is quick, but you need extra help if you need to set this up without the first GUI step or MDM. 


Enable Guest User in 10.14.x Via the Command Line (without a MDM)?