When you want to rerun a previously executed command in the terminal, you can use the up and down arrow keys to navigate through the history of commands. If you want to search for a specific command, press Ctrl + R and start typing. The terminal will search through the history and show you the latest matching command. Press Ctrl + R again to search for older commands.