If you have just bought a server and wish to access all commands, such as switching gamemodes or whitelisting your server then you need to give yourself admin rights.
Follow these steps:
1. Click on the “Console” button on the Minecraft control panel:
2. Write the following command without / and press enter: