Instructor: History expansions always begin with an exclamation mark. For example, to run the last command that we ran again, we can use double exclamation marks. I run the date commands.
Then if I just do two exclamation marks and hit enter, you'll see it'll run it again. This is particularly useful if you're doing something that requires superuser permission but forgot to put sudo at the beginning of the command.
For example, you can use Bash to turn your wireless on and off, use ifconfig, pass the name of the wireless interface, and say, "Down." Doing this requires that you use sudo. If I do sudo two exclamation marks, you can see it runs it again. Now it works.
Another handy history expansion is exclamation mark and dollar sign, which refers to the last argument of the previous commands. For example, if I create a script and I want to give it execute permissions now, I can just do that. I gave that script file execute permissions. It's pretty handy. It saves some typing.