As my colleague @quovadimus82 has previously documented, OS X El Capitan includes a new option for showing and hiding the menubar.
This option is available in System Preferences, in the General preferences.
It is also possible to use the defaults command to set the menubar’s behavior. Here’s how you can set the menubar to be hidden and unhidden using defaults:
To hide:
defaults write NSGlobalDomain _HIHideMenuBar -bool true
To show:
defaults write NSGlobalDomain _HIHideMenuBar -bool false
Once run, logout and log back in to see the change in behavior. Alternatively, you can run the following command as the logged-in user to restart Finder and show the changes:
killall Finder