What Is the Command to Get a Command Block in Minecraft?
If you've spent any time in Minecraft's creative or server environments, you've probably heard about command blocks — the powerful in-game tools that let players automate actions, build complex contraptions, and run server-side scripts without needing external mods. But unlike most items in the game, command blocks can't be found in the creative inventory by default. You have to know the right command to get one.
Here's exactly how it works — and why the specifics depend more on your setup than you might expect.
The Basic Command to Obtain a Command Block
The standard command to give yourself a command block in Minecraft is:
/give @s command_block Type this into the chat window (opened with T on Java Edition or the chat icon on Bedrock), and a command block will appear in your inventory. The @s selector targets yourself — the player entering the command.
You can also use your own username instead of @s:
/give YourUsername command_block To receive more than one at a time, add a quantity at the end:
/give @s command_block 64 This gives you a full stack of 64 command blocks at once.
Java Edition vs. Bedrock Edition: Does the Command Differ?
Mostly no — but there are small differences worth knowing. 🎮
On Java Edition, the command above works exactly as written. The item ID command_block is consistent and hasn't changed in recent versions.
On Bedrock Edition (Windows, mobile, console), the same /give @s command_block command works, but the item ID format sometimes behaves differently depending on which version you're running. In some older Bedrock builds, items used numeric IDs rather than string names. On modern Bedrock, the string ID format (command_block) is the standard and preferred approach.
The Three Types of Command Blocks
What many players don't realize is that there are actually three distinct command block variants, each with a different ID:
| Type | Item ID | Behavior |
|---|---|---|
| Impulse Command Block | command_block | Runs once when activated |
| Chain Command Block | chain_command_block | Runs after the previous block in a chain |
| Repeating Command Block | repeating_command_block | Runs every game tick while powered |
Each serves a different purpose in automation and map-making. If you're building a contraption that needs continuous execution, you'll want the repeating variant. For sequential logic, chain blocks let you link commands together. The basic impulse block is the default starting point for most setups.
Why Can't You Just Find It in Creative Mode?
Command blocks are intentionally locked out of the standard creative inventory. Mojang designed them this way because they can execute powerful server-side commands — including ones that affect all players, change the world, or run administrative functions. Handing them out freely through the inventory would create significant potential for accidental or intentional misuse, especially on multiplayer servers.
This also means cheats must be enabled in your world settings for the /give command to work at all. In singleplayer, you toggle this when creating a world (or can enable it later through the "Open to LAN" option with cheats turned on). On a server, you need to have operator (op) status — meaning server-level permissions.
Without operator status or cheats enabled, the command will simply fail with a permission error.
Operator Permissions and Server Environments
On a multiplayer server, the server admin must grant you operator status using:
/op YourUsername This is typically done through the server console or by another operator. Once you have op status, the /give command for command blocks becomes available to you.
Different server setups handle permissions differently. Some use permission plugins (like LuckPerms on Bukkit/Spigot/Paper servers) that allow finer control — meaning even non-op players can sometimes be granted access to specific commands without full admin rights. If you're playing on a managed server and the command isn't working, it's worth checking whether your permission level covers command block access specifically.
What About Minecraft Education Edition?
In Education Edition, command blocks follow slightly different rules tied to classroom and world management settings. The same /give syntax generally applies, but world settings controlled by the "teacher" or admin role determine whether command execution is available at all.
Placing and Using the Command Block
Once you have the item, placing it is straightforward — just like any other block. Right-clicking (or the equivalent on your platform) opens the command block interface, where you can:
- Type or paste the command you want it to execute
- Set the condition (conditional vs. unconditional)
- Set whether it needs redstone power or runs always
The block needs a redstone signal to activate in most modes, though the "Always Active" setting removes that requirement for repeating and chain blocks.
The Variables That Shape Your Experience
Whether the command works cleanly depends on several factors that vary from player to player:
- Java vs. Bedrock — item IDs and behavior differ slightly
- Singleplayer vs. multiplayer — cheats vs. op permissions
- Server type — vanilla, Bukkit, Spigot, Paper, Fabric, or Forge each handle commands a little differently
- Game version — older versions used numeric IDs; newer ones use string names
- Permission plugins — on managed servers, your access level may be granular
The command itself is simple. What shapes whether it works — and which variant you actually need — comes down to the specifics of your world, your platform, and the kind of automation you're trying to build.