How to use commands in Minecraft
Minecraft as a game is simple to play if you’re not looking to build impressive structures. There’s plenty in it to explore and if you’re starting off, you may spend some time learning basic recipes but it’s not hard.
Outside the gameplay, there are a few tools and features in Minecraft that are worth learning and occasionally using, including Minecraft auto-jump settings. Minecraft commands are one such feature — they give players direct control over the game world in ways that normal gameplay simply doesn’t allow.
Minecraft Commands: What They Are and How They Work
Minecraft commands allow users to change the world, alter certain attributes of the player, change the player’s position relative to the world, and much more. They are essentially text-based instructions that the game engine executes instantly.
The command set in Minecraft is extensive and edition-specific — what works in Java Edition may not work in Bedrock Edition, and vice versa. Commands span a wide range of functions, from teleporting players and changing the time of day to summoning mobs, filling regions with blocks, and adjusting game rules. Some commands, like /help and /seed, do not require cheats at all in most contexts. Others, such as /give or /gamerule, require cheats to be enabled or appropriate operator permissions depending on your edition and whether you are playing on a server. The line between “cheat” and “non-cheat” is less about the command itself and more about your edition, world settings, and permission level.
Commands are executed the same way regardless of type, but commands that require elevated permissions must be enabled first before you can use them.
Enable Cheat Commands in Minecraft
How you enable cheats — and what enabling them means for your game — depends on your edition of Minecraft.
Bedrock Edition (single-player worlds): Cheats are enabled on a per-world basis. You should know that enabling cheats in a Bedrock single-player world will disable all achievements for that world. This cannot be undone even if you turn cheats off later, so consider this carefully before proceeding.
- Open Minecraft.
- Select the world you want to enable cheats on.
- Go to the world’s settings.
- Scroll down to the Cheats section.
- Turn the Activate Cheats switch on.
- Confirm you want to enable cheats.
Java Edition (single-player worlds): When creating a new world, open the world settings and toggle Allow Cheats on. For an existing world, you can enable cheats mid-game by opening the world to LAN from the pause menu and turning on the Allow Cheats option. Note that the achievement restriction applies differently in Java Edition — cheats enabled via LAN do not permanently affect your world’s cheat status.
Servers and multiplayer: On a server, cheat access is controlled through operator (op) permissions, not a cheats toggle. A server admin can grant operator status using the /op command from the server console. Server console commands are entered without a leading slash. Which commands are available to players will depend on the server’s configuration and permission settings.
How to Use Minecraft Commands
With the appropriate access enabled, you can enter commands through the in-game chat interface. Here is a fuller breakdown of how commands work so you can adapt them — not just copy them.
Opening the command input: Press T to open chat, or press / to open chat with the slash already pre-typed. Every command starts with a forward slash (/).
Getting help: Type /help to see a list of available commands. Type /help <command> — for example, /help tp — to see the syntax and parameters for a specific command.
Autocomplete and history: Press Tab to autocomplete a command or cycle through valid options for a parameter. Use the Up and Down arrow keys to scroll through your command history, which saves time when repeating or adjusting commands.
Target selectors: Many commands act on players or entities. Instead of typing a player’s name, you can use selectors:
@p— the nearest player@a— all players@e— all entities (mobs, items, etc.)@s— yourself (the command executor)
Coordinates: Commands that involve a location accept two types of coordinates:
- Absolute: Specific world coordinates, e.g.,
100 64 -20 - Relative: Offset from your current position using tildes, e.g.,
~ ~10 ~means 10 blocks above where you are standing
Worked examples:
To teleport yourself to specific coordinates:
/tp @s 100 64 -20
To give the nearest player three diamonds:
/give @p diamond 3
To stop the day-night cycle so it stays daytime:
/gamerule doDaylightCycle false
To follow these steps when entering any command:
- Open Minecraft and select a world to play.
- Once the world loads, tap the forward slash key.
- An input bar will appear at the bottom with a list of commands you can enter.
- Enter a command e.g. Locate.
- Additional parameters that you can pass to that command will be listed.
- Enter a parameter, and tap Enter.
- The command will be executed.
Example
Enter the following;
/locate
This command can list the location of nearby structures. Enter a parameter i.e., which structure you want to find, and tap Enter.
/locate stronghold
The coordinates for the stronghold will be displayed. You can then use the tp command to teleport directly to that location, saving you a significant amount of travel time in the game world.
Some other commonly used Minecraft commands include /gamemode to switch between survival, creative, and adventure modes, /time set to change the in-game time of day, and /weather to control rain and storms. These commands make it much easier to test builds, explore the world, or simply enjoy the game at your own pace without unnecessary obstacles.
Note that some commands will not execute even if your syntax is correct — this usually means you need cheats enabled or a higher permission level for your edition or server.
Essential Minecraft Commands List
Below is a reference list of the most commonly used Minecraft commands, grouped by what they do. Use this as a quick lookup rather than a complete index, or see this Minecraft command guide for a broader walkthrough — the full command list is available on the official Minecraft Wiki.
| Command | What It Does | Example Syntax | Requires Cheats/Op? | Java / Bedrock Notes |
|---|---|---|---|---|
/help | Lists available commands or shows syntax for a specific command | /help tp | No | Available in both editions |
/tp | Teleports a player or entity to a location or another player | /tp @s 100 64 -20 | Yes | Available in both; syntax may vary slightly |
/locate | Finds the nearest structure of a given type | /locate stronghold | Yes | Structure names differ between editions (e.g., stronghold vs Stronghold) |
/gamemode | Switches a player’s game mode (survival, creative, adventure, spectator) | /gamemode creative @s | Yes | Available in both editions |
/give | Gives a specified item to a player | /give @p diamond 3 | Yes | Item ID format differs slightly in Bedrock |
/time set | Sets the in-game time of day | /time set day | Yes | Available in both editions |
/weather | Changes the weather (clear, rain, thunder) | /weather clear | Yes | Available in both editions |
/difficulty | Sets the game difficulty level | /difficulty peaceful | Yes | Available in both editions |
/effect | Applies or removes a status effect from a player or entity | /effect give @p speed 30 2 | Yes | Syntax differs slightly between editions |
/enchant | Enchants the item a player is holding | /enchant @p sharpness 5 | Yes | Available in both; enchantment IDs may differ |
/summon | Spawns a mob or entity at a location | /summon creeper ~ ~ ~ | Yes | Entity names differ slightly in Bedrock |
/fill | Fills a defined region with a specified block | /fill ~-5 ~-1 ~-5 ~5 ~5 ~5 air | Yes | Available in both editions |
/clone | Copies blocks from one region and pastes them to another location | /clone 0 64 0 10 74 10 20 64 0 | Yes | Available in both editions |
/gamerule | Sets or queries a game rule (e.g., disabling the day-night cycle) | /gamerule doDaylightCycle false | Yes (some rules vary) | Available in both; some game rules are edition-specific |
Java vs Bedrock Command Differences
One of the most common reasons a Minecraft command “doesn’t work” is that the player is using the wrong edition’s syntax or a command that simply does not exist in their version of the game. Java Edition and Bedrock Edition have meaningfully different command systems — not just in what is available, but in how commands are structured, what permissions are needed, and how achievements are affected.
| Feature | Java Edition | Bedrock Edition |
|---|---|---|
| Command availability | Broad command set; some commands are Java-exclusive (e.g., /data) | Broad command set; some commands are Bedrock-exclusive or Education Edition-only |
| Syntax differences | Uses Java-specific argument formats; e.g., /effect give | Some commands use different argument order or keywords |
| Achievement/advancement impact | Enabling cheats via LAN does not permanently disable advancements | Enabling cheats permanently disables achievements for that world |
| Permission system | Operator levels (0–4) control command access; set in server properties | Operator permissions; Bedrock also supports permission levels via JSON files on servers |
| Server console commands | Entered without a leading slash in the server console | Entered without a leading slash in the server console |
/locate syntax | Uses namespaced structure IDs (e.g., minecraft:stronghold in newer versions) | Uses its own structure name list; some names differ from Java |
| Target selectors | Full selector support including @s, @e, and NBT arguments | Supports core selectors; NBT arguments are not supported |
Practical troubleshooting tips:
- If a command returns an error, confirm you are looking at documentation for your specific edition.
- Structure names in
/locateare a frequent mismatch point — always verify the correct name for your edition. - On Bedrock servers, operator permissions are managed separately from single-player cheat settings.
- If you are using a server and commands are not working even as an operator, check the server’s permission configuration files.
- Server console commands do not need a leading slash — typing
/tpin the console will cause an error; typetpinstead.
Conclusion
Minecraft doesn’t have a large number of commands. The list is fairly modest and you can look them up on the official Minecraft Wiki over at Gamepedia. Minecraft commands can be run on a local game and on a server, though the server’s settings may restrict which commands are available to players.
Using Minecraft commands is a great way to ‘win’ the game more easily — for example, instead of spending hours searching for a stronghold or a fortress, you can use the locate command to find it instantly. That said, there is still plenty left to do in terms of genuinely playing the game, and commands are best used as tools to enhance your experience rather than replace it entirely.