Step 1: Open the command history window.
q:
Step 2: Navigate through previous commands with the arrow key (↑ and ↓).
↑
↓
Step 3: Press Enter to select a previous command to execute.
Enter