Basic commands in Windows command prompt

Now let us take a look at some basic commands in windows command prompt.

To show all commands
> help

To get help on specific command
> help commandName
> commandname /?

To exit command prompt
> exit

To clear the output screen of command prompt
> cls

To echo the message on output screen
> echo

To display contents of a file, You can use below commands. more command will display the contents of a file one page at a time. This is just like more command in Linux. type command will display contents of entire file in one go.

> more <file-name>

> type <file-name>

To print the file, you can execute below command.
> print <file-name>

cmd command starts child command prompt.

We can set the color of the window using below command.
COLOR [background][foreground]

COLOR 08

Here are some of the color values.

  1. 08 = Black/Gray
  2. 19 = Blue/Light Blue
  3. 2A = Green/Light Green

You may also like...