Shell/Terminating a Partial Command

From Coder Merlin
< Shell
Revision as of 10:18, 23 November 2021 by Guanyu-su (talk | contribs) (Created page with "== Terminating a Partial Command == If you begin a command in error or change your mind about issuing a command, you can use the {{SpecialKey|CONTROL|C}} key sequence to cance...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Within these castle walls be forged Mavens of Computer Science ...
— Merlin, The Coder

Terminating a Partial Command[edit]

If you begin a command in error or change your mind about issuing a command, you can use the CONTROL-C key sequence to cancel what you've typed so far and continue with a new command prompt.

Try it now:

john-williams@codermerlin:~$  echo iThoughtIKnewWhatIWasDoingBut CONTROL-C


Hint.pngHelpful Hint

If you began issuing a command but need to do something else in the shell before actually issuing it, an alternative to the above is to temporarily store what you've typed so far, do something else, then return to the original command. You can do that with:

CONTROL-U Cut backwards
CONTROL-Y Yank the original text back