The following screenshot shows the regular window which has all these three buttons on the right side.

Edit the Gnome configuration by launching the gconf-editor. To launch the gconf-editor, press Alt + F2, then type gconf-editor and hit Enter.

Here, navigate to the apps > metacity > general option in the left side window and then locate the button_layout option in the right side main window. Double click this option and set its value to close,maximize,minimize:menu .

That’s it, now you will notice that these three buttons appear on the left side of the Ubuntu Window.