While giving commands in Command Prompt, sometimes you forget what command you typed before or want to know all the commands that have been given in the session, then this cmd trick will be useful. There are many commands that are used in Command prompt, we will use one of the command prompt command to get the Command history in Windows CMD.
Read below, how to get the command history in cmd.
Getting Command History in CMD
1 Open Command Prompt (click on 'Start' and search 'cmd' and open cmd/command prompt from search result or Press 'Windows Key + R' and type 'cmd' into the Run field, then press 'Enter' to start the 'Command Prompt')
2 To do a test, give some commands into Command prompt.
3 Now to know all the commands you gave in CMD, type the command that is given below into command prompt-
➜ doskey /history
4 Press Enter after you typed the above command, and you will get all the commands you gave before in that session.
Example for Command History in CMD
5 So, when you want to get the command history that you have used in Command Prompt, then use this CMD trick.
0 Comments