How to Get a Command Block in Minecraft
Guide Java Bedrock
What you need
- Cheats enabled in your world (or operator permissions on a server)
- A redstone power source: button, lever or redstone block
Step by step
- Enable cheats: in singleplayer, create the world with Allow Commands (Java) or Cheats (Bedrock) ON, or open to LAN with Allow Cheats: On. On servers you need operator status.
- Run /give @s minecraft:command_block in chat. The block goes straight to your inventory.
- Java alternative: in Creative mode, open Options > Controls and set Operator Items Tab to ON - the block appears in the Operator Utilities tab of the Creative inventory.
- Place the block, right-click it and type your command (for example /time set day). The interface also sets the block type: impulse (runs once), chain (runs after another block) or repeat (runs every tick).
- Power it: attach a button or lever for manual runs, or set it to Always Active so it runs without redstone.
- Pick block (middle click) on an existing command block copies it; Ctrl + pick block also copies the command and settings inside.
- Command blocks have bedrock-level blast resistance and cannot be pushed by pistons, so they are safe in any build.
Java vs Bedrock
Both editions use /give @s command_block. The Creative Operator Utilities tab is Java-only; Bedrock players always use the command.
Versions: Command blocks exist in Java since 1.4.2 and in Bedrock since 1.0.5. Obtaining them always requires cheats or operator permissions.
Frequently asked questions
Can I craft a command block?
No. There is no recipe in Survival - the only ways in are /give, /setblock, pick block on an existing one, or Java's Operator Utilities tab.
Why does my command block do nothing?
It needs power: impulse and chain blocks run when triggered by redstone (or set to Always Active), and repeat blocks run every game tick while powered. Also check the command syntax - errors show in the block's previous output box.
Can I break a command block in Survival?
Command blocks are unbreakable in Survival and Adventure mode. Switch to Creative to remove them.
Related:How to Use RedstoneHow to Make a Redstone ClockCommandsRedstone