How to Use Commands in Minecraft | Minecraft
Skip to Main Content

How to Use Commands in Minecraft

Change your experience with the press of a button!

Did you know that Minecraft has a set of magical incantations that allow you to teleport around the world, locate specific biomes and structures, generate items, mobs and blocks, set the weather and time of day, and much, much more?

That’s right, pure sorcery! “Commands”, or “slash commands” as they’re sometimes called, allow you to make changes to your Minecraft experience, from summoning mobs to adjusting the weather conditions of the world. In this article, we’ll explain what they are, how to use them, and provide a list of some of the most useful commands for players. 

Whether you’re a seasoned player or a newcomer to Minecraft’s blockverse, you’re sure to find something useful here. Let’s get started and learn how to use commands in Minecraft!

Who can use commands?

Commands are powerful tools that can make an enormous difference to the way you play Minecraft. They can be used to change the rules of your world, for example, changing the in-game time, or locating a specific object or biome. In short, commands can help in several different ways, allowing you to take your creativity to the next level. Most commands are kept behind a layer of protection that requires a player to have certain permissions, and can be turned on or off through the press of a button called “Allow Cheats”. Depending on the game mode, you’ll find that the default setting of Allow Cheats can vary. For example, in Creative mode, it’s turned on, while in Survival mode, it’s turned off. 

In Bedrock Edition singleplayer, you can change these permissions by going to the Game tab of the settings menu and toggling on “Allow Cheats”. Note that enabling cheats will permanently stop players from unlocking achievements in that world – even if you turn them off again later.

In Java Edition singleplayer, you need to select the “Allow Cheats” option when you create the world. If you forgot to do that, it’s possible to enable them temporarily by opening the game menu, selecting “Open to LAN” and ticking the “Allow Cheats” option and then clicking “Start LAN world”. You don’t actually need to be on a LAN or have others join for this to work, though you should be aware that this option disables the ability to pause, and if you are on a network then others will be able to find and join your game. To go back to normal, just quit the world and rejoin it again. 

In multiplayer, you’ll need to have a high-enough permission level to be able to use commands. If you started your own server or Realm, you should have the permissions by default. If you’re playing on someone else’s server, you’ll need to ask them for help.

How to use commands

There are a few ways to use commands. The simplest and easiest is to type them into the chat window – open it up and type in the command. All commands written in the chat window should be preceded by a forward-slash (‘/’) character. Type your slash, and then the command that you want. If you type the command wrong, you’ll get an error and the command won’t run. Only you can see the error. 

You can also execute commands using command blocks, in data packs or behavior packs, in a server’s console, or in a few other ways depending on the platform you’re playing on. However, these types of commands are beyond the scope of this guide, but there are several deep dives out there that can teach you!

Many commands have “arguments”, which doesn’t mean that they’re annoyed at each other. Instead, an argument is something that goes after a command that changes how it behaves. For example, when using the `/difficulty` command you need to type an argument after it to set the difficulty – either `peaceful`, `easy`, `normal`, or `hard`. The full command could then be `/difficulty easy`. 

It can be tricky to remember all the commands and arguments, so we’ve included a feature that displays them above the text box. If you start typing, it’ll filter the available possibilities for what you type. You can press the tab key to autocomplete with the first entry in the list and press it again to cycle through possible arguments. Tab will also automatically fill in the coordinates of whatever block you’re looking at if the command you’re using requires coordinates.

You can recall previously sent commands by pressing the up arrow when you have the chat box open, making it easy to repeat the same command.

Handy commands

Here are a few commands that will prove useful to almost all players. Remember to use them responsibly.

/teleport [target player] <destination> 
Teleport yourself or another player to a specific location.  
Example: `/teleport steve alex -200 64 300` will teleport Steve and Alex to the coordinates -200, 64, 300.

/give <player> <item> [amount] 
Give a player a specific item with a specified quantity.  
Example: `/give Steve minecraft:diamond 10` will give Steve 10 diamonds.

/weather <clear/rain/thunder> 
Change the weather in your game.  
Example: `/weather clear` will set the weather to clear.

/time set <time> 
Set the time of the day.  
Example: /time set 1000 will set the time to morning. You can use “day”, “night”, “noon”, or “midnight” as well.

/summon <entity> [x] [y] [z] 
Summon an entity (such as a mob or item) at specified coordinates. 
Example: `/summon minecraft:zombie` will summon a zombie at your current location.

/kill [player] 
Kill yourself or another player – handy if you get stuck somewhere.  
Example: `/kill steve` will kill Steve instantly.

/setworldspawn [x] [y] [z] 
Set the world spawn point to your current location or specified coordinates. 
Example: `/setworldspawn` will set the world spawn point to your current location.

/locate <category> <thing> 
Find the nearest `structure` or `biome` of a specified type.  
Example: `/locate structure minecraft:stronghold` will give you the x, y and z coordinates of the nearest stronghold. You can then use `/teleport` to get there.

/op <playername> 
Make a player an operator of a server

/kick <playername> 
Removes a player from a server

/ban <playername> 
Bans a player from a server

 

While commands can look intimidating to some, it can be a great tool for enhancing your experience in Minecraft – so don’t be afraid to experiment with them. Good luck!

Duncan Geere
Written By
Duncan Geere
Published

Community Creations

Discover the best add-ons, mods, and more being built by the incredible Minecraft community!

    Block...Block...Block...