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.
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 (DCP), an MS-DOS derivative by the former East-German VEB Robotron.
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, 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. Both files are typically modified through a configuration utility named CONFIG.EXE only.
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. 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, whereas some issues of DR-DOS 7.02 and higher will instead also look for DRCONFIG.SYS.Further, under DR DOS 6.0 and higher, the SYS /DR:ext
command can be used to change the default file extensions. 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. 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). 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. 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.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.
FreeDOS implements a similar feature with its FDCONFIG.SYS configuration file. RxDOS 7.24 and higher use RXCONFIG.SYS instead. 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, loading environment variables from the Windows Registry instead:
HKLM\System\CurrentControlSet\Control\SessionManager\Environment
Under FlexOS, CONFIG.SYS is a binary file defining the resource managers and device drivers loaded.