In Terminal:

gsettings set org.gnome.desktop.wm.preferences button-layout ':minimize,maximize,close'

Or use dconf editor.