What a command block is and where to find it

A command block is a special block in Minecraft that runs commands when activated. Unlike typing commands into the chat window, a command block executes the same instruction repeatedly or on a schedule you set. You cannot find command blocks lying around in the world — you have to create them yourself using a command, and they only work in Creative mode or in Survival mode if you have cheats turned on.

Command blocks look like dark purple or dark gray cubes with a question mark or @ symbol on the front. Once you place one, you can right-click it to open a window where you type the command you want it to run. This is useful for building contraptions, testing game mechanics, or automating repetitive tasks.

Key Takeaways

  • Command blocks only work in Creative mode or in Survival worlds where cheats are enabled.
  • You create a command block by typing a command into the chat window, not by crafting it.
  • The command to summon a command block is /give @s command_block in Java Edition or /give @s command_block in Bedrock Edition.
  • Once you have the block in your inventory, place it like any other block and right-click to open the command window.
  • Different command block types (Impulse, Chain, Repeat) run commands at different times or in different ways.

Enabling cheats in Survival mode

If you are playing Survival mode and want to use command blocks, you must turn on cheats first. When you create a new world, the game asks whether to allow cheats — select "Yes" if you want command blocks later. If you already have a world without cheats on, you cannot turn them on without creating a new world.

To check whether cheats are on in your current world, pause the game and look at the Game menu. If you see an option that says "Open to LAN" or similar, cheats are already on. If you do not see that option, you will need to start a new world and enable cheats during creation.

Getting the command block into your inventory

Open the chat window by pressing the T key (on Java Edition) or the right arrow button (on Bedrock/console versions). Type the command /give @s command_block and press Enter. The command block will appear in your inventory when ready. The @s part means "give this to me" — if you want to give it to another player on a server, replace @s with their username.

If the command does not work, check that cheats are actually on. If you are on Bedrock Edition (Windows 10, Xbox, mobile), the command is the same, but the chat interface looks slightly different — you may need to press the right bumper or a chat icon instead of T.

Placing and opening the command block

Once you have the command block in your inventory, select it like you would any other block and place it in the world by right-clicking (or pressing the trigger button on console). The block will appear as a dark cube. Right-click on it again to open the command window.

Inside the window you will see a text field labeled "Command." This is where you type the instruction you want the block to run. You can type any valid Minecraft command here — for example, /say Hello will make the block broadcast a message to all players, or /summon creeper will spawn a creeper when the block activates. Type your command and click "Done."

Understanding command block types

When you open a command block, you will see a dropdown menu that says "Impulse," "Chain," or "Repeat." Each type runs commands differently. An Impulse block runs its command once when activated by a redstone signal. A Chain block runs only after the command block before it finishes, letting you link multiple blocks in sequence. A Repeat block runs its command every game tick (20 times per second) as long as it receives power.

For most beginners, Impulse is the easiest to start with — place one, give it a redstone signal (like a lever or button), and it runs once. Chain and Repeat blocks are useful once you understand how redstone works and want to build more complex contraptions.

Activating the command block with redstone

A command block does nothing until it receives a redstone signal. The simplest way to test it is to place a lever or button next to the command block, then flip the lever or press the button. You will see the command block light up briefly, and the command will run.

You can also use redstone dust, redstone repeaters, or any other redstone component to power the block. If you want the block to run automatically without a signal, place it in Repeat mode and give it constant power — for example, by placing a lever next to it in the "on" position. Experiment with different redstone setups to control when and how often the command runs.

Common commands to try first

Once your command block is set up, here are a few straightforward commands to test with. /say [message] broadcasts text to all players — replace [message] with whatever you want to say. /give @s diamond 64 gives you 64 diamonds. /time set day sets the time to daytime. /weather clear stops rain and storms.

Each of these commands runs when ready when the block receives power. As you get more comfortable, you can look up more advanced commands in the Minecraft wiki or command reference guides. The key is to start straightforward, test one command at a time, and build from there.

Frequently Asked Questions

Can I use command blocks in Survival mode without turning on cheats?

No. Command blocks only work when cheats are on. If you want to use them in an existing Survival world, you will have to create a new world with cheats enabled from the start.

What is the difference between Impulse, Chain, and Repeat command blocks?

Impulse runs once when powered. Chain runs after the previous command block finishes. Repeat runs continuously while powered. Start with Impulse — it is the simplest to understand and test.

My command block is not running. What am I doing wrong?

Check three things: cheats are on, the command block has power (place a lever next to it and flip it), and the command itself is spelled correctly. If all three are true and it still does not work, the command may not be valid for your game version.

Can I copy and paste commands from the internet into a command block?

Yes. Open the command block window, right-click in the text field, and paste. Make sure the command is valid for your version of Minecraft — Java and Bedrock sometimes use slightly different syntax.

Do command blocks work on servers or multiplayer worlds?

Yes, but only if the server or world owner has cheats on. On public servers, command blocks are usually disabled for security reasons. On your own server or LAN world, you can use them freely.