As Windows technology diverged from DOS over time, use ofCONFIG.SYS diminished. BothCONFIG.SYS andAUTOEXEC.BAT are in theroot folder of theWindows 95 andWindows 98 boot drives, but typically, they are empty.Windows Me does not use a CONFIG.SYS file at all.[1] Instead, it loadsenvironment variables from theWindows Registry key:HKLM\System\CurrentControlSet\Control\SessionManager\Environment.
During boot, theDOS BIOS[2] loads the file from theroot directory of the drive from which the system boots. After processing the file, the system loads and executes thecommand shell specified in theSHELL line, orCOMMAND.COM if there is no such line. The command shell in turn is responsible for processing theAUTOEXEC.BAT file.
Even though loading CONFIG.SYS is part of a normal bootup process, the system can boot if the file is missing or corrupt. A system probably requires troubleshooting if the file gets deleted or corrupted.
IfCONFIG.SYS does not contain aSHELL directive (or the file is corrupt or missing), DOS typically searches forCOMMAND.COM in the root directory of the boot drive.[3] 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.[4] (In the case ofCOMMAND.COM, the internalEXIT command is disabled only when the shell was started with/P.) This also provides limited means to replace the shell atruntime without having to reboot the system.Since the MS-DOS 7.0 and higher COMMAND.COM executable is incompatible with DR-DOS,[5] 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 bypassSHELL directives in (Ctrl+)F5/F7/F8 "skip"/"trace"/"step" modes.[6][3][5] (Some later issues added (Ctrl+)F6 to reinvoke the formerF5 "skip" behaviour in order to allow recovery from problems with invalidSHELL arguments as well.[3]) Also, if noSHELL directive could be found when skippingCONFIG.SYS processing via (Ctrl+)F5 (and also with (Ctrl+)F7/F8, when the default file extension has been changed withSYS /DR:ext),[7] the user is prompted to enter a valid shell file namebefore trying to load COMMAND.COM from the root.[6][5] Pressing↵ Enter without specifying a file will assume the former default.[6]
Depending on the version, the size of theCONFIG.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.[4][3] This is because the former operating systems (since DOS 3.0[8]) will compile the file into some tokenized in-memory representation[8] 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 viaDEVICE andINSTALL (for example to solve load order conflicts or to load a program debugger before a device driver to be debugged)[6][3] 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.[4][6] This becomes particularly useful sinceINSTALL 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.[4][9][6]
In MS-DOS/PC DOS 2.0 through 4.01, the length of theSHELL line was limited to 31 characters, whereas up to 128 characters are possible in later versions.[4][9] DR-DOS even accepts up to 255 characters.[4][9]CONFIG.SYS directives do not acceptlong filenames.
When installingWindows 95 over a preexisting DOS/Windows install,CONFIG.SYS andAUTOEXEC.BAT are renamed toCONFIG.DOS andAUTOEXEC.DOS. This is intended to ease dual booting between Windows 9x and DOS. When booting into DOS, they are temporarily renamedCONFIG.SYS andAUTOEXEC.BAT. Backups of the Windows 95 versions are made asCONFIG.W40 andAUTOEXEC.W40 files.
When Caldera DR-DOS 7.02/7.03 is installed on a system already containing Windows 95, Windows'CONFIG.SYS andAUTOEXEC.BAT retain those names. DR-DOS' startup files are installed asDCONFIG.SYS (a name already used in earlier versions of DR DOS) andAUTODOS7.BAT.[10]
OS/2 uses aCONFIG.SYS file for configuring options, drivers and environment before the graphical subsystem loads. There are many undocumented or poorly documentedCONFIG.SYS directives used by OS/2.[11]CONFIG.SYS continues to be used by the OS/2 derivativeseComStation[12] andArcaOS.[13] In the OS/2 subsystem ofWindows NT, what appeared asCONFIG.SYS to OS/2 programs is actually stored in the registry.
Some DOS variants load a file with an alternate name if its exists instead of loading from the defaultCONFIG.SYS:
CCONFIG.SYS
WhileConcurrent DOS versions 3.2 to 4.1 did not support CONFIG.SYS, later versions,Concurrent DOS 386 andConcurrent DOS XM, as well asMultiuser DOS,System Manager andREAL/32 load CCONFIG.SYS (initial "C" referring to "Concurrent") instead of CONFIG.SYS. Some versions of Multiuser DOS use a filename of CCONFIG.INI instead,[14][15] whereas REAL/32 is known to look for MCONFIG.SYS. These operating systems support many additional and different configuration settings (likeINIT_INSTALL) not known under MS-DOS/PC DOS, but they are stored in the binary repository named CCONFIG.BIN rather than in CCONFIG.INI.[14][15] Both files are typically modified through a configuration utility namedCONFIG.EXE only.[14][15]
DCONFIG.SYS
DR DOS 3.31,PalmDOS 1.0,Novell DOS 7,OpenDOS 7.01, and DR-DOS 7.02 and higher, a file named DCONFIG.SYS (initial "D" referring to "DR DOS"), if present, takes precedence over CONFIG.SYS.[4][10][16][7] Since DR DOS 6.0, this was used in conjunction with disk compression software, where the original boot drive C: would become drive D: after loading the compression driver (and the "D" in the file name came in handy as well), but it is commonly used to help maintain multiple configuration files in multi-boot scenarios.
ODCONFIG.SYS
OpenDOS 7.01 and DR-OpenDOS 7.02 look for a file named ODCONFIG.SYS,[6][17][16] whereas some issues of DR-DOS 7.02 and higher instead also look for DRCONFIG.SYS.[16]
Under DR DOS 6.0 and higher, theSYS /DR:ext command can be used to change the default file extensions.[6][18][7] For example, withSYS /L /DR:703 the writtenVolume Boot Record would look for a renamed and modified IBMBIO.703 system file (instead of the defaultIBMBIO.COM) and the IBMBIO.703 would look for IBMDOS.703 and [D]CONFIG.703 (instead ofIBMDOS.COM and [D]CONFIG.SYS), so that multiple parallel sets of files can coexist in the same root directory and be selected via a boot-loader like LOADER, supplied with Multiuser DOS and DR-DOS 7.02/7.03.[4] TheSHELL directive is enhanced to provide means to specify alternative AUTOEXEC.BAT files via/P[:filename.ext] and in this specific scenario, COMMAND.COM will accept file extensions other than ".BAT" as well (both features are also supported by4DOS).[9] Under DR DOS 6.0 and higher, the CONFIG.SYS directiveCHAIN=filespec can be used to continue processing in the named file, which does not necessarily need to reside in the root directory of the boot drive.[4][16] DR-DOS 7.02 and higher optionally support an additional parameter as inCHAIN=filespec,label to jump to a specific:label in the given file.[6][17][16]
DR-DOS 7.03 and higher support a newSYS /A parameter in order to copy the corresponding CONFIG.SYS and AUTOEXEC.BAT files along with the system files.[7]
REM(DOS 4.0 and DR DOS 3.31 and higher;[3] ignored under PTS-DOS)
Starts a comment as long as no text precedes it on a line.
;(DOS 6.0 and DR DOS 6.0 and higher)
Starts a comment and unlikeREM can follow a directive to form an in-line comment. SeeCOMMENT. In MS-DOS/PC DOS, the inline-comment is not ignored if put in double-quotes.
Similar toINSTALL under DOS, loads programs in CONFIG.SYS. Similar toRUN under OS/2, but runs in foreground and halts CONFIG.SYS processing until return.
DEVICE(DOS 2.0 and DOS Plus 2.1 with FIDDLOAD and DR‑DOS 3.31 and higher; OS/2[nb 2][nb 3])
Loads a device driver into memory.
DEVICEHIGH(DOS 5.0 and DR‑DOS 6.0 and higher; OS/2[nb 2][nb 3])
Loads a device driver into upper memory. (Same asHIDEVICE in DR‑DOS 5.0.)
HIDEVICE(DR DOS 5.0 and higher only)
SeeDEVICEHIGH.
HIINSTALL(DR DOS 5.0 and higher only)
SeeINSTALLHIGH.
HIINSTALLLAST(EDR-DOS 7.01.07 and DRMK only)
Installs a TSR program into memory, likeHIINSTALL, but installs after the DOS data segment relocation. Compare also:INSTCDEX.
Specifies programs (which would normally run at the CPU'sIOPLring 3) which should be allowed to run atring 2 in order to directly access the hardware for I/O.
INCLUDE(DOS 6.0 and higher, not DR-DOS, not FreeDOS)
Include directives from another menu block. (Can be emulated usingGOSUB andRETURN under DR-DOS.)
INSERT(DR-DOS 7.02 and higher only)
Specifies whether the keyboardInsert mode status is turned on or off.[6]
IRQPRIORITY(Embedded DOS 6-XL only)
Rotates PIC controller interrupt priorities so that specified number gets the highest priority
KEYBOARD(PTS-DOS only)
Specifies the keyboard layout.
KEYBUF(FreeDOS only)
Specifies the address of the relocated keyboard buffer.
LASTDRIVE(DOS 3.0 and DOS Plus 2.1 with FIDDLOAD and DR DOS 3.31 and higher; OS/2[nb 2][nb 3])
Specifies the maximum of drives that can be accessed.
LASTDRIVEHIGH(MS-DOS 7.0[21] and DR-DOS 7.02 and higher,[6] and FreeDOS only)
Same as LASTDRIVE, but explicitly loads the Current Directory Structure (CDS) into upper memory.
Specifies if system should reboot automatically on errors.
RESERVEDRIVELETTER(OS/2 3 FixPack 24 and higher only)
Specifies a drive letter not to be used up for local block device drivers.
RESUMECHAR(DR-DOS 7.02 and higher only)
Specifies the default Resume (R) character in Yes/No/Resume queries.[6][3])
RMSIZE(OS/2[nb 2] only, ignored under DR-DOS 7.02 and higher)
Defines the real mode memory size.
SAVENAME(PTS-DOS only)
Specifies, if the first character of deleted files should be stored in thereserved area of directory entries in theFAT file system.
SCREEN(FreeDOS and PTS-DOS only)
Similar toVIDEOMODE under PTS-DOS, specifies the video mode to be used under FreeDOS. Under PTS-DOS,SCREEN does not specify the video mode but screen access methods.
SCROLLOCK(DR-DOS 7.02 and higher only)
Specifies whether the keyboardScroll Lock status is turned on or off.[6][3])
SET(DOS 6.0 and DR‑DOS 6.0 and higher; OS/2[nb 2])
Sets environment variables.
SHELL(DOS 2.0 and DR‑DOS 3.31 and higher; OS/2[nb 2][nb 3])
SHELLHIGH(DR-DOS 7.02 and higher and PTS-DOS and FreeDOS only)
Same asSHELL, but supports an additionalSIZE parameter to define the size of the pre-allocation for COMMAND.COM to relocate its resident portion into the HMA (with/MH). Can be useful to avoid HMA fragmentation in conjunction with third-party shells which cannot load into the HMA. SHELLHIGH under PTS-DOS tries to load the shell into UMBs instead.)[6][25][9][3]
SHIFTSTATE(PTS-DOS only)
Specifies the state of the keyboard modifiers like Shift Lock, Num Lock, Scroll Lock or Insert mode.
SHUTDOWN(PTS-DOS only)
Specifies if files should be closed onCtrl+Alt+Del.
SOFTREBOOT(PTS-DOS only)
Specifies if POST should be skipped on reboots.
STACK(ignored under DR‑DOS 3.31-5.0 and 7.02 and higher only)
Compatibility dummy - DR DOS 3.31 - 6.0 were mostly reentrant and had a different stacks layout.
STACKS(DOS 3.2 and Novell DOS 7 and higher, ignored under DR DOS 6.0 and PTS-DOS)
Specifies the number of stacks for hardware interrupts.
STACKSIZE(Embedded DOS 6-XL only)
Default stack size allocated for new threads.
STACKSHIGH(MS-DOS 7.0[21] and DR-DOS 7.02 and higher,[6] and FreeDOS only)
Same asSTACKS, but explicitly loads buffers into upper memory.
STORAGE(PTS-DOS only)
Boot manager.
STRING(MS-DOS 3.0 only, ignored under DR-DOS 7.02 and higher)
Configures minimum and maximum time slices for scheduler.
TMPEXT(PTS-DOS only)
Specifies the file extension for temporary files.
TRACE(DR-DOS 7.02 and higher and PTS-DOS only; OS/2[nb 2])
Globally or locally enables or disables CONFIG.SYS (and AUTOEXEC.BAT) single-stepping execution.[3][6] The functionality under OS/2 differs significantly from that under DOS.
?(DR DOS 3.41 and higher, Embedded DOS[nb 4] and FreeDOS only)
Displays a yes/no query and (since DR DOS 5.0) optional message to ask the user to confirm evaluation of subsequent directives.[25] FreeDOS does not support optional messages, but optional conditions in conjunction with boot menus defined withMENU andMENUDEFAULT. DOS 6.0 and higher supports a similar feature by adding a? after the name field, i.e.DEVICE? instead of?DEVICE. This variant is also supported by DR DOS.
!(FreeDOS only)
Unconditionally evaluate the subsequent directive.
CLS(DR DOS 6.0 and higher only)
Clears screen.
ECHO(DR‑DOS 5.0 and higher, and PTS-DOS and FreeDOS only)
Displays a message on screen.
EECHO(FreeDOS only)
Displays a message including ANSI escape sequences.
GETKEY(DR DOS 6.0 and higher only)
Waits for key or timeout and sets error level to pressed key's ASCII code; 1024 on timeout.
PAUSE(PTS-DOS only)
Similar toECHO andGETKEY under DR-DOS, displays text and waits for a key press.
TIMEOUT(DR‑DOS 6.0 and higher and PTS-DOS only)
Specifies the timeouts in CONFIG.SYS single-stepping and withSWITCH,GETKEY and?, and the default answers for Yes/No queries andSWITCH selections.[6][25][3] PTS-DOS only supports the timeout value.
Stops file processing before the end of the file has been reached (except forSWITCHES andSHELL directive processing under some conditions).
FORCE(PTS-DOS only)
Include execution of specified CONFIG.SYS subsections. SeeIGNORE.
GOSUB(DR DOS 6.0 and higher only)
Continues processing at a label, withRETURN returning to old location.[6]
GOTO(DR DOS 5.0 and higher only)
Continues processing at a label.
IGNORE(PTS-DOS only)
Exclude execution of specified CONFIG.SYS subsections. SeeFORCE.
NEWFILE(Datalight ROM-DOS only)
Continues processing in new file (similar to DR-DOSCHAIN) and optionally after loading a specific device driver and setting%NEWFILE% environment variable.[26]
ONERROR(DR DOS 6.0 and higher only)
Conditional execution depending on last return code/error status only, i.e.ONERROR> 0 GOTO failload orONERROR> 10 ONERROR<> 17 ONERROR<= 30 ECHO Error 11-16 or 18-30 occurred.[4]
RETURN(DR‑DOS 6.0 and higher only)
Returns processing to the location of the lastGOSUB orSWITCH. A return code can be specified but defaults to 0 if not specified.
SWITCH(DR DOS 6.0 and higher only)
Conditionally continues processing at one of the specified labels depending on keys pressed, withRETURN returning to old location.[6][25][3]
^The filename of the DOS configuration fileCONFIG.SYS was derived from an identically named file used by the operating systemDX-85M for theDurango F-85 family of computers introduced in 1978 - five years before the advent ofMS-DOS 2.0/PC DOS 2.0 in 1983. Both files are text files and use various directives to configure the system and load drivers, however, the syntax differs.
^abcdefghijkPaul, Matthias R. (1997-07-30).NWDOS-TIPs — Tips & Tricks rund um Novell DOS 7, mit Blick auf undokumentierte Details, Bugs und Workarounds [Tips & tricks for Novell DOS 7, with a focus on undocumented details, bugs and workarounds]. MPDOSTIP (in German) (3 ed.). Archived fromthe original on 2016-11-05. Retrieved2012-01-11. (NB. NWDOSTIP.TXT is a comprehensive work onNovell DOS 7 andOpenDOS 7.01, including the description of many undocumented features and internals. It is part of the author's yet larger MPDOSTIP.ZIP collection maintained up to 2001 and distributed on many sites at the time. The provided link points to a HTML-converted older version of the NWDOSTIP.TXT file.)
^abcdPaul, Matthias R. (2004-06-17)."Re: Random Lockups with DR-DOS 7.03".opendos@delorie.com;FidoNet conference: ALT_DOS. Archived fromthe original on 2019-04-28. Retrieved2019-04-28.[...] all MS-DOS versions prior to Windows 95 [...] used a COM style COMMAND.COM file which has a special signature at the start of the file [...] queried by the MS-DOS BIOS before it loads the shell, but not by the DR-DOS BIOS [...] COMMAND.COM would [...] check that it is running on the "correct" DOS version, so if you would load their COMMAND.COM under DR-DOS, you would receive a "Bad version" error message and their COMMAND.COM would exit, so DR-DOS would [...] display an error message "Bad or missing command interpreter" (if DR-DOS was trying to load the SHELL= command processor after having finished CONFIG.SYS processing). In this case, you could enter the path to a valid DR-DOS COMMAND.COM (C:\DRDOS\COMMAND.COM) and everything was fine. Now, things have changed since MS-DOS 7.0 [...] COMMAND.COM has internally become an EXE style file, so there is no magic [...] signature [...] to check [...] thus no way for DR-DOS to rule out an incompatible COMMAND.COM. Further, their COMMAND.COM no longer does any version checks, but [...] does not work under DR-DOS [...] just crashes [...] the PC DOS COMMAND.COM works fine under DR-DOS [...][3][4]
^abcdPaul, Matthias R. (2017-08-14) [2017-08-07]."The continuing saga of Windows 3.1 in enhanced mode on OmniBook 300".MoHPC - the Museum of HP Calculators.Archived from the original on 2018-05-01. Retrieved2018-05-01.[...] SYS [...] /A Additionally copy [D]CONFIG.SYS and AUTOEXEC.BAT file(s). [...] /B or /L Do not modify the Boot Sector in destination (with LOADER). [...] /DR[:ext] Use other file extension for system files (BIN) (with LOADER). [...]
^abErnst, Martin; Grell, Detlef (November 1987). Grell, Detlef (ed.). "Damit die Scheibe spurt - 720 KB-Disketten mit MF-Drives im AT; Atari ST-Disketten unter DOS ab Version 3.2 in PCs, ATs oder Modell 30".c't - magazin für computertechnik. Programm (in German). Vol. 1987, no. 11.Verlag Heinz Heise GmbH & Co. KG. pp. 216–218, 220, 222, 224, 226, 228 [226].ISSN0724-8679.
^abPaul, Matthias R. (2001-04-09).NWDOS-TIPs — Tips & Tricks rund um Novell DOS 7, mit Blick auf undokumentierte Details, Bugs und Workarounds [Tips & tricks for Novell DOS 7, with a focus on undocumented details, bugs and workarounds]. MPDOSTIP (in German) (3 ed.).
^ecm (2018-10-08)."RxDOS 7.24 release".bttr-software.de. DOS ain't dead.Archived from the original on 2018-12-15. Retrieved2020-01-27.
^Kurth, Rüdiger; Groß, Martin; Hunger, Henry (2016-11-29) [2007]."Betriebssystem DCP".www.robotrontechnik.de (in German).Archived from the original on 2019-04-03. Retrieved2019-04-28.
^abcdPaul, Matthias R. (2002-04-06)."Re: [fd-dev] ANNOUNCE: CuteMouse 2.0 alpha 1".freedos-dev.Archived from the original on 2020-02-07. Retrieved2020-02-07.[...]DR-DOS 7.02+ has a [D]CONFIG.SYS directive to override theserial ports detected during System BIOSPOST, so tools likeDEBUG [...] are no longer required to update or change the port settings in segment 40h. [...] insert a line to [D]CONFIG.SYS to make the port available to theSystem BIOS, DOS, and most drivers and applications: [...] COM4=260,1 ; setI/O address forCOM4 to 260h, timeout 1 [...] Since old machines and DOS versions did not know aboutCOM3 and COM4 at all, good software will try to use the data stored in segment 0040h [...] Optionally hide the chosen mouse COM port from the system configuration to avoid any clobbering by oldBASIC programs. [...]
^Schneider, Stefanie (1994-06-17)."Das Ende von DOS ist nur noch eine Frage der Zeit" [The end of DOS is only a question of time].Computerwoche (in German). Munich, Germany:IDG Business Media GmbH.Archived from the original on 2022-01-02. Retrieved2022-01-02.[...] So handelt es sich bei dem fuer Ende 1994, Anfang 1995 erwartetenMS-DOS 7.0 offenkundig um eine der grafischen Benutzeroberflaeche entledigte Version vonWindows 4.0, die auch den Codenamen "Chicago" traegt. Dieses neue DOS soll der CW-Schwesterpublikation "PC-Welt" zufolge durch die neuen Parameter "standard" und "enhanced" in der Systemdatei Io.sys die leidigen Speicherbarrieren ueberwinden. [...] (NB. The undocumented settingsSTANDARD andENHANCED are optional parameters of the CONFIG.SYS directiveDOS.)