This question already has an answer here:

I'm trying to use command blocks for my next creation, but I'm making it so that command blocks make it for me when I press a button. However, I need to have a command that once placed in a command block, it will place another command block with a command already in it (when given a redstone signal, that is).
I'm on Education Edition, so only the Bedrock Edition type of command style will work - Java Edition won't. I have looked for a command that does this,but I can not find one.

marked as duplicate by greg-449, MBraedley, Reflexive, Joachim, Virusbomb Jul 16 at 15:48

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.


Unfortunately, this is not possible.

It is only possible on Java Edition where there are NBT tags and it would be like this:

/setblock <x> <y> <z> command_block 0 replace {Command:"<command>"}

Not the answer you're looking for? Browse other questions tagged or ask your own question.