Minecraft Commands List: Every Cheat Worth Knowing
Commands turn Minecraft from a survival game into a sandbox you control completely. You can skip the night, hand yourself a stack of diamonds, teleport across the world, or find the nearest stronghold without wandering for an hour. This Minecraft commands list covers the ones worth memorising, written with their exact syntax, plus the target selectors and gamerules that make them far more powerful than they first appear.
How to Enable Cheats First
Commands only work if cheats are enabled for the world you are in.
- Java Edition: turn on Allow Cheats when creating the world. On an existing world, pause, choose Open to LAN, set Allow Cheats to On and start the LAN world. Cheats stay active for that session.
- Bedrock, mobile and console: open the world settings, find the Cheats section and switch Activate Cheats on. Be aware this disables achievements for that world permanently.
- Servers: you need operator status. Run
op yournamefrom the server console.
Open the chat window with T on Java or the chat button on mobile, then type a forward slash to begin a command.
Target Selectors
Most commands take a target. Instead of typing a player name every time, use these shortcuts. They work in almost every command that accepts a player or entity.
| Selector | Means |
|---|---|
@s | Yourself, whoever ran the command |
@p | The nearest player |
@a | All players |
@r | A random player |
@e | All entities, including mobs and dropped items |
You can filter selectors with arguments in square brackets. @e[type=zombie,distance=..20] targets every zombie within twenty blocks, which combined with /kill clears an area instantly.
Essential Minecraft Commands
| Command | What it does |
|---|---|
/gamemode creative | Switch to creative. Also survival, adventure, spectator. |
/time set day | Skip to morning. Also night, noon, midnight. |
/weather clear | Stop rain or a thunderstorm. |
/tp @s 100 64 -200 | Teleport yourself to those coordinates. |
/give @s diamond 64 | Give yourself a stack of any item. |
/kill @e[type=creeper] | Remove every creeper currently loaded. |
/seed | Show the world seed. |
/locate structure minecraft:stronghold | Find the nearest structure and its coordinates. |
/locate biome minecraft:cherry_grove | Find the nearest biome of that type. |
/difficulty peaceful | Change difficulty, or remove hostile mobs entirely. |
/effect give @s night_vision 999 1 | Apply a status effect for a set duration. |
/enchant @s sharpness 5 | Enchant the item you are holding. |
/summon minecraft:villager | Spawn any entity where you are standing. |
/setblock 10 64 10 minecraft:stone | Place a single block at exact coordinates. |
/fill 0 64 0 10 70 10 minecraft:air | Fill or clear a whole region at once. |
/spawnpoint | Set your respawn point where you stand. |
/clear @s | Empty your inventory, or clear one item type. |
/locate is the one most players underuse. It will point you at a stronghold, an Ancient City, a Woodland Mansion or a Nether fortress without any searching, which pairs well with the coordinates in our best Minecraft seeds collection.
Gamerules Worth Knowing
Gamerules change how the world itself behaves, and they persist until you change them back. The syntax is /gamerule ruleName value.
| Gamerule | Effect |
|---|---|
keepInventory true | Keep your items when you die. The most-used rule in the game. |
doDaylightCycle false | Freeze time where it is. |
doWeatherCycle false | Stop weather changing. |
doMobSpawning false | Stop all natural mob spawning. |
mobGriefing false | Creepers stop destroying blocks, endermen stop moving them. |
doFireTick false | Fire stops spreading. Useful in wooden builds. |
doImmediateRespawn true | Skip the death screen entirely. |
randomTickSpeed 10 | Crops and trees grow much faster. Default is 3. |
showcoordinates true | Display coordinates on screen. Bedrock only; Java uses F3. |
Be careful with randomTickSpeed. Setting it very high will grow your crops instantly and may also drop your frame rate to single digits.
Multiplayer and Server Commands
| Command | What it does |
|---|---|
/op playername | Grant operator permissions. |
/deop playername | Remove them again. |
/whitelist add playername | Allow a player onto a whitelisted server. |
/kick playername reason | Remove a player from the session. |
/ban playername | Block a player permanently. /pardon reverses it. |
/msg playername text | Send a private message. /tell and /w do the same. |
/say text | Broadcast a message to everyone. |
/list | Show who is currently online. |
If you are setting up a world for friends, our guide to making a Minecraft server covers the configuration these commands sit on top of.
Java and Bedrock Command Differences
Most commands are identical across editions, but there are real gaps worth knowing about.
- Experience: Java uses
/xpor/experience; Bedrock uses/xponly. - Game modes: Bedrock accepts numbers as well as names, so
/gamemode 1works the same as/gamemode creative. - Java only:
/datapack,/advancement,/attribute,/spectateand the full/teamsystem. - Bedrock only:
/fog,/camerashake,/mobeventand/structure. - Coordinates: Bedrock needs
/gamerule showcoordinates true, while Java players press F3.
Our Java and Bedrock comparison covers the wider differences between the two versions.
Tips for Using Commands
- Press Tab to autocomplete. It fills in item names, structure IDs and coordinates, which saves you from typos in long identifiers.
- Use the tilde for relative coordinates.
/tp @s ~ ~10 ~moves you ten blocks up from wherever you are. - Press the up arrow in chat to repeat your last command.
- Test on a copy of your world before running
/fillover a large area. It is not undoable. - Namespaces are optional in most cases.
minecraft:stoneandstoneboth work.
Useful Command Combinations
Individual commands are handy. Combining them with selectors and relative coordinates is where they become genuinely powerful.
/kill @e[type=item]clears every dropped item on the ground. Useful after a large build when thousands of stray blocks are hurting your frame rate./tp @a @steleports every player on the server to you, which is far faster than reading coordinates out loud./fill ~-5 ~-1 ~-5 ~5 ~-1 ~5 minecraft:stonelays a flat 11×11 platform under your feet, anywhere, instantly./effect give @s minecraft:night_vision 99999 0 truegives you permanent night vision with the particle effects hidden, which is the single best quality-of-life command for building./time set dayfollowed by/gamerule doDaylightCycle falselocks the world in permanent daylight so nothing spawns while you build./give @s minecraft:diamond_pickaxe{Enchantments:[{id:efficiency,lvl:5}]}gives you a pre-enchanted tool on Java. Bedrock uses/enchanton a held item instead./locate structure minecraft:ancient_citythen/tpto the coordinates it returns turns a long expedition into two commands.
Relative coordinates with the tilde symbol are the key to most of these. ~ means your current position on that axis, so ~10 is ten blocks along it. The caret symbol works similarly but relative to the direction you are facing, which is useful for commands you run while looking at something.
Frequently Asked Questions
Do commands disable achievements?
On Bedrock, yes. Turning cheats on disables achievements for that world permanently. On Java, advancements keep working with cheats enabled.
How do I turn on cheats in a world I already started?
On Java, pause the game, choose Open to LAN, set Allow Cheats to On and start the LAN world. On Bedrock, open the world settings and enable cheats there.
What is the command to keep items after dying?
/gamerule keepInventory true. It applies to the whole world and stays set until you change it back.
Can I use commands on mobile?
Yes. Mobile runs Bedrock Edition, so every Bedrock command works. Enable cheats in world settings and use the chat button to type them.
Why does my command say I do not have permission?
Cheats are off, or you are not an operator on that server. Single-player worlds need Allow Cheats enabled; servers need you to be opped from the console.

One Comment