1. Home
  2. Gaming
  3. Commands minecraft

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.

  1. Open Minecraft.
  2. Select the world you want to enable cheats on.
  3. Go to the world’s settings.
  4. Scroll down to the Cheats section.
  5. Turn the Activate Cheats switch on.
  6. Confirm you want to enable cheats.
enabling cheats for minecraft commands in the settings menu

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:

  1. Open Minecraft and select a world to play.
  2. Once the world loads, tap the forward slash key.
  3. An input bar will appear at the bottom with a list of commands you can enter.
  4. Enter a command e.g. Locate.
  5. Additional parameters that you can pass to that command will be listed.
  6. Enter a parameter, and tap Enter.
  7. 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.

CommandWhat It DoesExample SyntaxRequires Cheats/Op?Java / Bedrock Notes
/helpLists available commands or shows syntax for a specific command/help tpNoAvailable in both editions
/tpTeleports a player or entity to a location or another player/tp @s 100 64 -20YesAvailable in both; syntax may vary slightly
/locateFinds the nearest structure of a given type/locate strongholdYesStructure names differ between editions (e.g., stronghold vs Stronghold)
/gamemodeSwitches a player’s game mode (survival, creative, adventure, spectator)/gamemode creative @sYesAvailable in both editions
/giveGives a specified item to a player/give @p diamond 3YesItem ID format differs slightly in Bedrock
/time setSets the in-game time of day/time set dayYesAvailable in both editions
/weatherChanges the weather (clear, rain, thunder)/weather clearYesAvailable in both editions
/difficultySets the game difficulty level/difficulty peacefulYesAvailable in both editions
/effectApplies or removes a status effect from a player or entity/effect give @p speed 30 2YesSyntax differs slightly between editions
/enchantEnchants the item a player is holding/enchant @p sharpness 5YesAvailable in both; enchantment IDs may differ
/summonSpawns a mob or entity at a location/summon creeper ~ ~ ~YesEntity names differ slightly in Bedrock
/fillFills a defined region with a specified block/fill ~-5 ~-1 ~-5 ~5 ~5 ~5 airYesAvailable in both editions
/cloneCopies blocks from one region and pastes them to another location/clone 0 64 0 10 74 10 20 64 0YesAvailable in both editions
/gameruleSets or queries a game rule (e.g., disabling the day-night cycle)/gamerule doDaylightCycle falseYes (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.

FeatureJava EditionBedrock Edition
Command availabilityBroad command set; some commands are Java-exclusive (e.g., /data)Broad command set; some commands are Bedrock-exclusive or Education Edition-only
Syntax differencesUses Java-specific argument formats; e.g., /effect giveSome commands use different argument order or keywords
Achievement/advancement impactEnabling cheats via LAN does not permanently disable advancementsEnabling cheats permanently disables achievements for that world
Permission systemOperator levels (0–4) control command access; set in server propertiesOperator permissions; Bedrock also supports permission levels via JSON files on servers
Server console commandsEntered without a leading slash in the server consoleEntered without a leading slash in the server console
/locate syntaxUses namespaced structure IDs (e.g., minecraft:stronghold in newer versions)Uses its own structure name list; some names differ from Java
Target selectorsFull selector support including @s, @e, and NBT argumentsSupports 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 /locate are 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 /tp in the console will cause an error; type tp instead.

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.