Previous command: the shortcut in 3 apps
On Mac it is usually ↑ (2 of 3 apps); on Windows it is usually ↑ (2 of 3 apps); on Linux it is usually ↑ (2 of 3 apps). The table shows where each app agrees and where it differs.
| App | Mac | Windows | Linux |
|---|---|---|---|
| BashPrevious command | CtrlPor↑ | CtrlPor↑ | CtrlPor↑ |
| Chrome DevToolsPrevious command · Console | ↑ | ↑ | ↑ |
| Claude CodePrevious prompt | ↑ | ↑ | ↑ |
How the apps compare
- Mac: ↑ in Chrome DevTools and Claude Code; Ctrl+P in Bash.
- Windows: ↑ in Chrome DevTools and Claude Code; Ctrl+P in Bash.
- Linux: ↑ in Chrome DevTools and Claude Code; Ctrl+P in Bash.
Where and when it works
- Chrome DevTools (Console).
Learn it by pressing it: Bash shortcuts practice, Chrome DevTools shortcuts practice or Claude Code shortcuts practice.