You can comment the command you are currently typing out in the terminal using the shortcut Alt + #
.
This will prefix the current command with a #
, like the below.
# Current command:
$ sudo vim /etc/hosts
# After pressing `Alt + #`:
$ #sudo vim /etc/hosts