Command History in Windows
In windows, command prompt you can use up and down arrow keys to view command history. Or run the command doskey /history
to view list of previously used commands.
In windows PowerShell: Similar to command prompt you can use up and down arrow keys to see command history. or run the command Get-History
to view command history.
Unix-like Terminals (Linux, macOS, Git Bash, etc.):
You can use the up and down arrow keys to scroll through your command history. You can use history
command to view list of previously used commands.
You can search your command history by pressing Ctrl + R
and then typing a keyword. It will show you the most recently used commands based on keyword input. If you press Ctrl+ R
repeatedly, it will cycle through matching commands based on the keyword input.
To view specific command type ! followed by command number. For example !5
will show command number 5 from history.