4

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

Does DOS have a shell, like the bash in Linux?

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

FreeDOS screenshot

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

phuclv
  • 30,396
  • 15
  • 136
  • 260
Koray Tugay
  • 1,980

3 Answers3

6

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

Imgur

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
ComSpec=C:\Windows\system32\cmd.exe

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

SHELL=C:\DOS\COMMAND.COM C:\DOS /E:512 /P

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.

https://www.4dos.info/4dinfo.htm

phuclv
  • 30,396
  • 15
  • 136
  • 260
4

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

4

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

phuclv
  • 30,396
  • 15
  • 136
  • 260
Karan
  • 57,289