Loading AI tools
Primary system configuration file for DOS From Wikipedia, the free encyclopedia
CONFIG.SYS is the primary configuration file for the DOS and OS/2 operating systems. It is a special ASCII text file that contains user-accessible setup or configuration directives evaluated by the operating system's DOS BIOS (typically residing in IBMBIO.COM or IO.SYS) during boot. CONFIG.SYS was introduced with DOS 2.0.[nb 1]
The directives in this file configure DOS for use with devices and applications in the system. The CONFIG.SYS directives also set up the memory managers in the system. After processing the CONFIG.SYS file, DOS proceeds to load and execute the command shell specified in the SHELL line of CONFIG.SYS, or COMMAND.COM if there is no such line. The command shell in turn is responsible for processing the AUTOEXEC.BAT file.
CONFIG.SYS is composed mostly of name=value directives which look like variable assignments. In fact, these will either define some tunable parameters often resulting in reservation of memory, or load files, mostly device drivers and terminate-and-stay-resident programs (TSRs), into memory.
In DOS, CONFIG.SYS is located in the root directory of the drive from which the system was booted.
The filename is also used by Disk Control Program (DCP), an MS-DOS derivative by the former East-German VEB Robotron.[1]
Some versions of DOS will probe for alternative filenames taking precedence over the default CONFIG.SYS filename if they exist:
While older versions of Concurrent DOS 3.2 to 4.1 did not support CONFIG.SYS files at all, later versions of Concurrent DOS 386 and Concurrent DOS XM, as well as Multiuser DOS, System Manager and REAL/32 will probe for CCONFIG.SYS (with "C" derived from "Concurrent") instead of CONFIG.SYS. Some versions of Multiuser DOS use a filename of CCONFIG.INI instead,[2][3] whereas REAL/32 is known to look for MCONFIG.SYS. These operating systems support many additional and different configuration settings (like INIT_INSTALL) not known under MS-DOS/PC DOS, but they are stored in the binary repository named CCONFIG.BIN rather than in CCONFIG.INI.[2][3] Both files are typically modified through a configuration utility named CONFIG.EXE only.[2][3]
Under 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 (with "D" derived from "DR DOS"), if present, will take precedence over CONFIG.SYS.[4][5][6][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.
In addition to this, OpenDOS 7.01 and DR-OpenDOS 7.02 will look for a file named ODCONFIG.SYS,[8][9][6] whereas some issues of DR-DOS 7.02 and higher will instead also look for DRCONFIG.SYS.[6]
Further, under DR DOS 6.0 and higher, the SYS /DR:ext
command can be used to change the default file extensions.[8][10][7] For example, with SYS /L /DR:703
the written Volume Boot Record would look for a renamed and modified IBMBIO.703 system file (instead of the default IBMBIO.COM) and the IBMBIO.703 would look for IBMDOS.703 and [D]CONFIG.703 (instead of IBMDOS.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] The SHELL 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 by 4DOS).[11] Under DR DOS 6.0 and higher, the CONFIG.SYS directive CHAIN=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][6] DR-DOS 7.02 and higher optionally support an additional parameter as in CHAIN=filespec,label to jump to a specific :label in the given file.[8][9][6]
DR-DOS 7.03 and higher support a new SYS /A
parameter in order to copy the corresponding CONFIG.SYS and AUTOEXEC.BAT files along with the system files.[7]
FreeDOS implements a similar feature with its FDCONFIG.SYS configuration file. RxDOS 7.24 and higher use RXCONFIG.SYS instead.[12] PTS-DOS uses CONFIG.PTS.
Both CONFIG.SYS and AUTOEXEC.BAT can be found included in the root folder of Windows 95, and Windows 98 boot drives, as they are based on DOS. Typically, these files are left empty, with no content.
Windows ME does not even parse the CONFIG.SYS file during the Windows boot process,[13] loading environment variables from the Windows Registry instead:
Under FlexOS, CONFIG.SYS is a binary file defining the resource managers and device drivers loaded.
An example CONFIG.SYS for MS-DOS 5:
DOS=HIGH,UMB
DEVICE=C:\DOS\HIMEM.SYS
DEVICE=C:\DOS\EMM386.EXE RAM
DEVICEHIGH=C:\DOS\ANSI.SYS
FILES=30
SHELL=C:\DOS\COMMAND.COM C:\DOS /E:512 /P
CPU386 DEVICE=C:\DOS\EMM386.EXE
or CPU386 GOTO label386
PDUMP.nnn
error logs.ONERROR > 0 GOTO failload
or ONERROR > 10 ONERROR <> 17 ONERROR <= 30 ECHO Error 11-16 or 18-30 occurred
.[4]/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.)[8][14][11][19]The system can still boot if this file is missing or corrupted. However, this file, along with AUTOEXEC.BAT, is essential for the complete bootup process to occur with the DOS operating system. These files 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.[19] 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 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 at runtime without having to reboot the system.
Since the MS-DOS 7.0 and higher COMMAND.COM executable is incompatible with DR-DOS,[21] 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.[8][19][21] (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.[19]) 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
),[7] the user is prompted to enter a valid shell file name before trying to load COMMAND.COM from the root.[8][21] Pressing ↵ Enter without specifying a file will assume the former default.[8]
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.[4][19] This is because the former operating systems (since DOS 3.0[22]) will compile the file into some tokenized in-memory representation[22] 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)[8][19] 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][8] 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.[4][11][8]
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.[4][11] DR-DOS even accepts up to 255 characters.[4][11] CONFIG.SYS directives do not accept long filenames.
When installing Windows 95 over a preexisting DOS/Windows install, CONFIG.SYS and AUTOEXEC.BAT are renamed to CONFIG.DOS and AUTOEXEC.DOS. This is intended to ease dual booting between Windows 9x and DOS. When booting into DOS, they are temporarily renamed CONFIG.SYS and AUTOEXEC.BAT. Backups of the Windows 95 versions are made as CONFIG.W40 and AUTOEXEC.W40 files.
When Caldera DR-DOS 7.02/7.03 is installed on a system already containing Windows 95, Windows' CONFIG.SYS and AUTOEXEC.BAT retain those names. DR-DOS' startup files are installed as DCONFIG.SYS (a name already used in earlier versions of DR DOS) and AUTODOS7.BAT.[5]
OS/2 uses the CONFIG.SYS file extensively for setting up its configuration, drivers and environment before the graphical part of the system loads.
In the OS/2 subsystem of Windows NT, what appeared as CONFIG.SYS to OS/2 programs was actually stored in the registry.
There are many undocumented or poorly documented CONFIG.SYS directives used by OS/2.[23]
CONFIG.SYS continues to be used by the OS/2 derivatives eComStation[24] and ArcaOS.[25]
CONFIG.SYS
was derived from an identically named file used by the operating system DX-85M for the Durango F-85 family of computers introduced in 1978 - five years before the advent of MS-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.Seamless Wikipedia browsing. On steroids.
Every time you click a link to Wikipedia, Wiktionary or Wikiquote in your browser's search results, it will show the modern Wikiwand interface.
Wikiwand extension is a five stars, simple, with minimum permission required to keep your browsing private, safe and transparent.