How to Get a Command Block in Minecraft

Guide Java Bedrock

Quick answer: Command blocks cannot be crafted - get one with cheats enabled using /give @s command_block, or in Java's Creative inventory under Operator Utilities when the Operator Items Tab setting is on. Place it, right-click to enter a command, and power it with redstone.

What you need

Step by step

  1. 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.
  2. Run /give @s minecraft:command_block in chat. The block goes straight to your inventory.
  3. 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.
  4. 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).
  5. Power it: attach a button or lever for manual runs, or set it to Always Active so it runs without redstone.
  6. Pick block (middle click) on an existing command block copies it; Ctrl + pick block also copies the command and settings inside.
  7. 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