You can remember the meaning of 命令 with this easy mnemonic:
I've ordered the doctor the doctor to take my life (命) if I ever needed life support, because machines will only make (令) my life miserable.
Using mnemonics to remember the meaning of Chinese characters like can have an enormous impact on how long to learn Mandarin it takes.