This command is also pronounced as 'bang bang' command. It repeats the last typed command in your shell.
Look t the above snapshot, 'ls' command is repeated by passing '!!' command. After that, 'echo command will be repeated' has also repeated.
This command is pronounced as one bang. Last typed command will be repeated by '!!'. But, if you want to repeat other commands then you can use '!' command followed by one or more characters of that command.
Look at the above snapshot, command "!fi" repeats the above command 'file office'.
Here, n denotes a number. Just type '!' followed by the command line number you want to use and that command will be executed.
Look at the above snapshot, we have executed command 'ls' from the line number 1043.