Command blocks are powerful tools used by map makers and redstone engineers to automate game actions. Because they are not available in the standard creative inventory, you must use in-game chat commands to obtain one.
/give command with cheats enabled./give @p chain_command_block or /give @p repeating_command_block.Enable Cheats in Your World
Before you can get a command block, you need to make sure cheats are turned on in your world. If you created a new world, open the world settings and ensure that Allow Cheats is toggled to ON.
If you are already playing in an existing single-player Java world, press Esc, click Open to LAN, select Allow Cheats: ON, and then click Start LAN World.
Open the Chat Window
Next, bring up the chat interface where you can enter console commands. On PC (Java and Bedrock), press the T key or the forward slash key (/) to open the chat bar.
Console and mobile players can tap the chat icon at the top of the screen to open the text input box.
Type the Give Command
Type the proper command to receive the block directly into your inventory. In both Java and Bedrock editions, type /give @p command_block and press Enter or tap the send button.
You can also check out Redstone Basics for Beginners to learn how command blocks fit into larger automated contraptions.
Place and Use Your Command Block
Once the command executes successfully, a standard command block will appear in your hotbar or inventory. Select it and click on any solid block surface to place it in the world.
Right-click or interact with the placed block to open its console interface, where you can type in specific game commands for your automated contraptions.
Frequently Asked Questions
Can I get a command block in Survival mode?
Yes, but only if cheats are enabled in your world. Type the give command into the chat while in Survival mode, though you will still need operator permissions or cheats turned on.
Why is my give command failing?
Make sure cheats are enabled in your world settings. If cheats are disabled, the game will display an error message stating that you do not have permission to use that command.




















