Anchor::higher    PTS-DOS::dr-dos    CONFIG::least    Under::since    Memory::files    FreeDOS::system

Issues The system can still boot if these files are missing or corrupted. However, these two files are essential for the complete bootup process to occur with the DOS operating system. They contain information that is used to customize the operating system for personal use. They also contain the requirements of different software application packages. A DOS system would require troubleshooting if either of these files became damaged or corrupted.

If CONFIG.SYS does not contain a SHELL directive (or the file is corrupt or missing), DOS typically searches for COMMAND.COM in the root directory of the boot drive. If this is not found, versions of DOS before 6.0 will not start up. MS-DOS 6.0/PC DOS 6.1 and Novell DOS 7 and higher will instead display a prompt to enter the path and filename of a command processor. This recovery prompt is also displayed when the primary command processor is aborted due to faults or if it is exited deliberately.<ref name="Paul_1997_NWDOSTIP"/> (In the case of COMMAND.COM, the internal EXIT command is disabled only when the shell was started with /P.) This also provides limited means to replace the shell without having to reboot the system. Since the MS-DOS 7.0 and higher COMMAND.COM executable is incompatible with DR-DOS, but typically resides in the root of drive C: in dual-boot scenarios with DR-DOS, DR-DOS 7.02 and higher no longer allow to bypass SHELL directives in (Ctrl+)F5/F7/F8 "skip"/"trace"/"step" modes. (Some later issues added (Ctrl+)F6 to reinvoke the former F5 "skip" behaviour in order to allow recovery from problems with invalid SHELL arguments as well.) Also, if no SHELL directive could be found when skipping CONFIG.SYS processing via (Ctrl+)F5 (and also with (Ctrl+)F7/F8, when the default file extension has been changed with SYS /DR:ext), the user is prompted to enter a valid shell file name before trying to load COMMAND.COM from the root.<ref name="Paul_1997_OD-A3"/> Pressing Enter without specifying a file will assume the former default.<ref name="Paul_1997_OD-A3"/>

Depending on the version, the size of the CONFIG.SYS file is limited to a few kilobytes under MS-DOS/PC DOS (up to 64 KB in most recent versions), whereas the file's size is unlimited under DR-DOS.<ref name="Paul_1997_NWDOSTIP"/> This is because the former operating systems will compile the file into some tokenized in-memory representation before they sort and regroup the directives to be processed in a specific order (with device drivers always being loaded before TSRs), whereas DR-DOS interprets the file and executes most directives line-by-line, thereby giving full control over the load order of drivers and TSRs via DEVICE and INSTALL (for example to solve load order conflicts or to load a program debugger before a device driver to be debugged) and allowing to adapt the user interaction and change the flow through the file based on conditions like processor types installed, any type of keys pressed, load or input errors occurring, or return codes given by loaded software.<ref name="Paul_1997_NWDOSTIP"/> This becomes particularly useful since INSTALL can also be used to run non-resident software under DR-DOS, so that temporary external programs can be integrated into the CONFIG.SYS control flow.<ref name="Paul_1997_NWDOSTIP"/><ref name="4DOS_8.00_HELP"/>

In MS-DOS/PC DOS 2.0 through 4.01, the length of the SHELL line was limited to 31 characters, whereas up to 128 characters are possible in later versions.<ref name="Paul_1997_NWDOSTIP"/><ref name="4DOS_8.00_HELP"/> DR-DOS even accepts up to 255 characters.<ref name="Paul_1997_NWDOSTIP"/><ref name="4DOS_8.00_HELP"/> CONFIG.SYS directives do not accept long filenames.

CONFIG.SYS sections
Intro   Usage    CONFIG.SYS directives    Examples    Issues    Dual booting DOS and Windows 9x    OS/2 / NT    See also    References    External links