You can use this form without the number by using the first few letters of the command you wish to rerun. That covers the methods to use when you want to rerun the command without changes, but now let's look at editing the command before rerunning it. You would work differently with the two editors, and the one you choose is entirely up to your personal preference. Each press of the key will move you back one more command. If no changes are desired, you can press enter when you get to the command you want to rerun.
Transpositions are one of the most common command typing errors.
To recall commands in Emacs, press Control-p. Repeat this to move back through your command history . If you go too far you can use Control-n to move to more recent commands. You can do command line editing with other shells. It is quite different from using the ksh .