You can do this really easily. By using the gconf-editor.
You can do that by pressing Alt+F2 and then typing in gconf-editor. Click Run.
1. Browse through to apps/metacity/general
2. Double click on the button_layout
3. What you will see is
What this means is that you have the close button followed by the maximize button followed by the minimize button. The colon on the right side would signify that all your buttons are aligned towards the left. In order to move your buttons to the right you can play with this order of things.
For Example, I normally have the following settings, similar to windows.
Which is Minimize followed by maximize followed by the close button aligned to the right like so.