Top DOS Commands That Everyone Should Know

DOS Commands

Software that controls hardware and peripheral devices and make other programs to function properly is called an operating system (OS). Early computers were hard-wired to perform a particular computation or task. Then, punch cards and later magnetic tapes were used to load computer instructions into the computer memory. Since the computer memory space was little and then floppy disk came into existence as a cutting edge technology and computer instructions were moved onto these disk drives. So, the name disk operating system got familiar in computer world.

Now, any operating system is considered as disk operating system. So, the definition of Disk Operating System or simply DOS is:

DOS is an operating system that runs from a hard disk drive. The term also refers to a particular family of disk operating systems, most commonly MS-DOS (Microsoft Disk Operating System). The first widely-installed disk operating system was developed by Microsoft Corporation for IBM and was used in personal computers was, PC-DOS (Personal Computer Disk Operating System). It was running on Intel 8086 16-bit processors.

Also read – What is Operating System?

Top DOS Commands

It is important to know that the DOS commands are not case sensitive that is a DOS command can be written in upper case, or lower case. For example make directory command can be typed as MKDIR or mkdir or Mkdir. Now let us discuss about some of the DOS commands that everyone should know.

  1. CD or CHDIR

CD or CHDIR command changes the directory or displays the current directory.

This command can be used with or without parameters and result of the command typed will depend on whether the parameters are given or not.

Examples of CD or CHDIR command on command prompt

C: \users\admin> cd

On executing this command the command prompt will display the current directory that is

C: \users\admin> cd..

On executing this command, the command prompt rolls back to parent directory. So the result of this command will be

C: \users>

C: \users\admin> cd\

On executing this command, the command prompt rolls back to the root directory. So the result of this command will be


Now let us see what will happen if we provide parameters to the cd command.

C: \users>cd admin

This command will change the directory to admin as

Also read –Different types of Operating Systems.

 It is important to note that parameters given to the cd command must be one of the existing child directories otherwise this command will display the message: “The system cannot find the path specified.”

  • Mkdir

This command is used to make or create a new directory. The later we can use the cd or chdir command to change the directory.

In the above screen shot it is visible that when we type ”C: \users\admin> cd abc“; an error message is displayed because the directory abc has yet not been created. But when we type “C: \users\admin> mkdir abc” it works, because directory abc has been created.

  • CLS

This command clears all the commands and any output on the command window screen or the console. 

  • Dir

DIR command displays the list of subdirectories and files of the current directory.

  • Help

HELP command is an external DOS command that displays the list of all commands if we don’t provide any parameters to the command. To get the help about a particular command we need to provide the command as the parameter to the help command.

On typing help command on command prompt as “C: \users\admin>help”; it will display all the DOS commands.

On typing “C: \users\admin> help cd”

This command will display the help document about the cd command

  • Time

This command is used to display the current time and may also set the new time using this command

The syntax of this command is

            “C: \users\admin> time”

  • Date

This command is used to display the current date and may also set the new date using this command

The syntax of this command is

            “C: \users\admin> date”

  • Copy

Copy command is used to copy one or more files, documents, directories to other location.

Using copy command we cannot copy hidden files within a directory. To copy all the files and hidden files then we use xcopy command.

Syntax of xcopy command

X Copy sourcedestination /a , this copies the archive files.

  • Del

Del command is used to delete one or more files or directories.

C: \users\admin>Del tech.txt

This command on execution will delete the tech text file from admin directory, if the same exists there.

  • Edit

Edit command allows us to create modify or view a text document. When edit command is run on command prompt, a new text editor window appears as

C: \users\admin>edit teach

The Bottom Line

The article discusses DOS Commands that are most used and that you must know. Let us know if you like the article, we will share advanced DOS commands in our next article.

Leave a Reply !!

This site uses Akismet to reduce spam. Learn how your comment data is processed.