In Windows, type the first part of the previous command and then hit F8. The shell will perform a backward search through previous commands that match the first part of what you’ve just typed.