Press the “up” arrow in the Mac or Linux command line and you’ll see the last command you ran. Keep pressing “up” and you’ll see more commands; you can go back days, months, or even years.