I have been reading the posts I found about shell , terminal , bash but I get more and more confused about these terms.

Does the operating system DOS have a shell, like the bash in linux?

Is this the DOS shell, a shell that shows a command line?

enter image description here

Also in this case, the terminal is the keyboard and the monitor if I understand correctly?


Yes. The shell in DOS is the COMMAND.COM program.

  • that's the default shell, not the only shell it can use – phuclv Nov 22 '16 at 3:34

Yes. The shell is pointed to by the variable COMSPEC. For example in MS-DOS the default shell is COMMAND.COM which is stored on the root folder of the system drive

COMSPEC or ComSpec is one of the environment variables used in DOS, OS/2 and Windows, which normally points to the command line interpreter, which is by default COMMAND.COM in DOS or CMD.EXE in OS/2 and Windows NT


You can see the variable in Windows even though DOS is not available because it may be used to run shell commands from an executable or a script

C:\Users\user>set comspec

As mentioned above, COMMAND.COM is the default shell but you can always change it and/or add additional parameters in CONFIG.SYS using SHELL or SHELLHIGH


For example FreeDOS doesn't store the shell at the root level but its own directory

FreeDOS shell

Many alternative shells for DOS like have been produced to add many useful features like auto completion, ANSI commands... The most famous one being 4DOS

4DOS is a replacement for command.com, the command processor included in most versions of DOS, far more powerful and flexible, however, than this feeble program. After many years of being commercially successful, 4DOS is now made available for free by its author, Rex Conn of JP Software, at their Downloads Page. It's officially unsupported, though the support forum will generally try to answer your questions.


  • In DOS, "The shell is pointed to by the variable COMSPEC" sometimes. Sometimes the variable is blank. It was considered an optional (and recommended) variable, but not always set. – TOOGAM Apr 4 '16 at 6:35
  • Your output is ComSpec=C:\Windows\system32\cmd.exe is CMD not DOS. And his question is clearly talking about DOS.. Then you include DOS too. If mentioning windows's cmd it should be as an aside(if at all). Not first thing. – barlop Mar 18 '18 at 22:01

A shell is simply a means to access an OS' features/services, and can be either command line i.e. text-based or GUI-based. DOS' shell is thus its command line interface (CLI) and command interpreter (command.com), that displays the standard DOS prompt. The shell generally runs on top of a text terminal, accepting data from a keyboard and displaying output on a monitor (among other I/O devices).


  • 1
    What do you mean "The shell generally runs on top of a text terminal"? – Koray Tugay Jun 11 '15 at 8:40
  • 1
    A text terminal is just a computer interface for text entry and display. The shell runs on top of it as in utilises it to accepts input and display output. The display could just be a dumb terminal and actual OS operations will be executed by the CPU of course. – Karan Jun 11 '15 at 8:48
  • 1
    This is a very good answer. I will just point out that Unix and Linux work nearly identical when it comes to their text terminal and GUI implemetations when compared to MSDOS and Windows 3.1/95/98/ME. – Ramhound Jun 11 '15 at 10:53
  • can you give an example of a text terminal with no shell? – barlop Mar 18 '18 at 22:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.