Command block id: 138
Type these in commands and replace
/give
(v1.7.9-) OR
/give
Chat with our AI personalities
Do /give @p minecraft:command_block 64
you cannot directly open a door with a command,but there are ways to open doors with command blocks:like have a command block next to a comparater (in the snapshot at mojang.com) and have the command block reapatadly get powerd by a clock and in the command block have:/testfor @a/p/f/r[selectors] and wire the comparator to the door and when someone meets the testfor selector the door opens!
Command blocks currently can not be crafted. In creative mode the command /give YOURPLAYERNAME 137 1 will give you 1 command block (all you need in creative).
The only way to get a command block in Minecraft is to have cheats on in your world.Once you generated a world like that, type in the following command:/give [your Minecraft character's name] 137 [amount up to 64]That will give you a command block.
You can't craft it, it can only be obtained through the /give command.