FILES (CONFIG.SYS directive)
| Company type | Configuration file |
|---|---|
| Industry | Computer software |
| Founded | 1983 |
| Headquarters | N/A |
| Products | Configuration for DOS and OS/2 operating systems |
CONFIG.SYS serves as the main configuration file for DOS and OS/2 operating systems. This plain text file, written in ASCII, holds setup instructions that the operating system's DOS BIOS—commonly found in IBMBIO.COM or IO.SYS—interprets during system startup. The CONFIG.SYS file was first introduced with DOS version 2.0.
Usage
The directives within CONFIG.SYS are used to configure DOS for hardware devices, software applications, and memory management functions. Once CONFIG.SYS processing is complete, DOS launches the command interpreter specified by the SHELL directive; if none is provided, it defaults to COMMAND.COM, which subsequently executes the AUTOEXEC.BAT script.
Typically, this file contains name=value pairs that either define configuration parameters or load specific files, mainly device drivers and terminate-and-stay-resident programs (TSRs), into memory.
In DOS systems, CONFIG.SYS is located in the root directory of the bootable drive.
Certain DOS variants check for alternative filenames that can override CONFIG.SYS:
Earlier editions of Concurrent DOS did not support CONFIG.SYS; however, later releases such as Concurrent DOS 386, Concurrent DOS XM, Multiuser DOS, and REAL/32 utilize CCONFIG.SYS (derived from "Concurrent") or CCONFIG.INI instead. Additionally, REAL/32 may employ MCONFIG.SYS. These platforms allow extra configuration options stored in binary files like CCONFIG.BIN, which are generally managed using CONFIG.EXE.
In DR DOS version 3.31 and subsequent iterations including Novell DOS, the file DCONFIG.SYS (originating from "DR DOS") takes precedence over CONFIG.SYS. Initially associated with disk compression utilities, it now facilitates managing multiple configurations for multi-boot environments. Versions such as OpenDOS 7.01 and DR-OpenDOS 7.02 also recognize ODCONFIG.SYS or DRCONFIG.SYS.
Starting with DR DOS 6.0, the command SYS /DR:ext enables renaming of system and configuration files to allow several parallel sets within a single root directory. Boot loaders like LOADER in Multiuser DOS and DR-DOS 7.x can then select among these sets. The SHELL directive supports specifying alternative AUTOEXEC.BAT scripts using /P[:filename.ext], and COMMAND.COM is capable of processing extensions other than .BAT in this mode.
From version 6.0 onward, DR-DOS includes support for CHAIN=filespec, which continues processing an additional configuration file that may be located outside the root directory. Versions 7.02 and later added the ability to jump to specific labels within chained files using CHAIN=filespec,label. Furthermore, DR-DOS 7.03 introduced a SYS /A option to copy both CONFIG.SYS and AUTOEXEC.BAT along with system files.
FreeDOS utilizes FDCONFIG.SYS, while from version 7.24 onwards RxDOS employs RXCONFIG.SYS. The operating system PTS-DOS uses CONFIG.PTS.
Due to their foundation on DOS, both CONFIG.SYS and AUTOEXEC.BAT reside in the root directories of boot drives for Windows 95 and Windows 98, although these files are often left empty. In contrast, Windows Me does not interpret CONFIG.SYS during startup; instead, it loads environment variables directly from the Windows Registry at:
- HKLM\System\CurrentControlSet\Control\SessionManager\Environment
Within the FlexOS operating system, CONFIG.SYS exists as a binary file that specifies resource managers and device drivers loaded during boot time.
Example
Below is a sample CONFIG.SYS configuration for MS-DOS 5: <syntaxhighlight lang="ini" line="1"> 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 </syntaxhighlight>
:;*?!
- Used to define labels within CONFIG.SYS that serve as jump points for , , , and commands.
- Functions similarly to , also utilized for inline comments following other CONFIG.SYS instructions. (Note: In MS-DOS/PC DOS, inline comments inside double quotes are not ignored.)
- Introduces inline comments alongside the ; directive.
- Prompts a Yes/No confirmation before executing subsequent CONFIG.SYS commands. (FreeDOS does not support optional messages but allows conditions with boot menus.) Starting with DOS 6.0, a comparable feature is available by appending after directives, also supported by DR DOS.
- Executes the following CONFIG.SYS command unconditionally.
ATemplate:NbndC
- Determines whether programs can be aborted upon encountering errors.
- Specifies if drives should record file access timestamps in FAT directory entries.
- Executes conditionally on AT-compatible hardware.
- Acts as a boot manager.
- Controls the verbosity level of error messages.
- Changes the default serial device driver assigned to the AUX device.
- Disables character device drivers located outside the phantom \DEV directory.
- Loads a base device driver into memory.
- Produces a beep sound even when notifications are turned off.
- Defines the operating system to boot next.
- Enables or disables extended Ctrl+C interrupt checking.
- Sets the number of disk buffers allocated.
- Similar to BUFFERS but loads buffers into HMA or UMB memory areas.
- , ,
- Adjust cache size and timing parameters.
- Loads programs during CONFIG.SYS processing, running them in the foreground and pausing further processing until they return.
- Sets the keyboard Caps Lock state.
- , , etc. (PTS-DOS only)
- Configure parameters for CD-ROM drivers.
- Continues processing CONFIG.SYS from another file and optional label.
- , , etc.
- Various system settings primarily specific to PTS-DOS or DR-DOS variants.
- (OS/2 only)
- Defines OEM codepage(s).
- , where x ranges from 1 to 4 (DR-DOS 7.02+)
- Specifies serial device configurations and timeout values.
- , also COMMENTS (DOS 4.0+, RxDOS)
- Redefines characters used for inline comments or causes subsequent lines to be ignored.
- , etc.
- Enables and configures international language support.
Additional directives provide conditional execution based on CPU type (for example, CPU386), manage hardware buffer settings, or modify system behavior across different DOS versions and derivatives. These focus on ensuring compatibility and optimizing performance for business environments relying on legacy systems.
DTemplate:NbndF
- Adjusts relocation of drive descriptor tables in memory.
- Defines the memory segment limit up to which multi-sector disk data deblocking is permitted.
- Activates internal debugger features.
- Functions as a boot manager.
- Loads device drivers into conventional memory.
- Loads device drivers into upper memory blocks (equivalent to in DRDOS 5.0).
- Sets country and codepage parameters for keyboard, screen, and printer devices.
- Configures sizes of cache memory areas.
- Specifies compatibility mode for floppy disk drives.
- Selects display font settings.
- Controls loading DOS into high memory and utilization of upper memory areas (similar behavior to in DRDOS 5.0).
- Loads DOS-related tables such as BUFFERS, FCBS, FILES, LASTDRIVE, STACKS into upper memory regions.
- Defines an alternative directory path for DOS system files.
- Establishes search paths for data files.
- Specifies parameters for physical disk drives.
- Sets parameters for unrecognized or unknown drives.
- See .
- Enables error logging via PDUMP.nnn files and designates associated drive(s).
- Displays text messages on screen during boot or processing.
- Displays messages including ANSI escape sequences for formatting.
- Applies additional verification checks when launching programs.
- Sets assumed error or return codes for subsequent commands.
- Configures the A20 line state upon program startup.
- Terminates CONFIG.SYS processing prematurely except for SWITCHES and SHELL commands.
- Defines hash table size used for accelerating file open operations, differing from MS-DOS/PC DOS FASTOPEN driver behavior.
- Specifies how many File Control Blocks can be cached simultaneously (shares buffer space with FILES under DR-DOS).
- Similar to FCBS but explicitly loads these structures into upper memory areas.
- Functions as a boot manager utility.
- Determines the maximum number of files that may be opened concurrently.
- Like FILES but loads file handle tables into upper memory explicitly.
- Includes execution of specified subsections within CONFIG.SYS (see IGNORE).
GTemplate:NbndI
- Waits for a key press or timeout, setting the error level to the ASCII value or 1024 if timed out.
- Resumes CONFIG.SYS processing at a designated label.
- Continues nested CONFIG.SYS processing at a given label, then returns to the previous point.
- Refer to , , or for additional details.
- See related commands .
- Consult for further information.
- Refer to or as applicable.
- See or for more context.
- Additional information available in .
- Loads a TSR program into memory following DOS data segment relocation. Compare with INSTCDEX.
- Consult , , or for related commands.
- See further details in .
- Refer to or for more information.
- Activates console and command line history buffer along with enhanced pattern search capabilities.
- Defines the address of the HMA segment.
- Configures power-saving mode using HLT instruction.
- Specifies system verification for boot sector viruses.
- Loads installable file system drivers.
- Prevents execution of designated CONFIG.SYS subsections.
- Permits certain programs to operate at ring 2, enabling direct hardware I/O access.
- Incorporates directives from another menu section (implemented via GOSUB/RETURN in DR-DOS).
- Sets the keyboard Insert mode state.
- Loads TSR programs into memory.
- Installs TSR utilities into upper memory (equivalent to HIINSTALL in DR DOS 5.0).
- Loads TSR programs after relocating DOS data segments. Compare with INSTCDEX.
- Adjusts PIC interrupt priorities to assign highest priority to a specified IRQ.
KTemplate:NbndM
- Defines the keyboard layout configuration.
- Sets the address for the relocated keyboard buffer.
- Determines the maximum number of accessible drives.
- Similar to LASTDRIVE but also loads Current Directory Structure (CDS) into upper memory.
- Specifies search paths for dynamic-link libraries (DLLs).
- Manages backward compatibility with legacy applications.
- Sets the quantity of file locks permitted.
- Enables boot logo support, allowing startup messages with PTS-DOS boot manager.
- Configures count, order, I/O address, and timeout parameters for LPT1 device.
- Defines count, order, I/O address, and timeout settings for LPT2 device.
- Sets count, order, I/O address, and timeout values for LPT3 device.
- Enables and configures LPT4 device similarly to previous LPT devices.
- Specifies delay before increasing process priority level.
- Configures the strategy used for memory allocation.
- Sets default DOS memory allocation policy.
- Defines options within menus.
- Specifies menu color schemes (can be emulated under DR-DOS).
- Sets the default menu block (emulatable under DR-DOS).
- Defines multiple menu blocks (emulatable under DR-DOS).
- Enables multitrack disk operations support.
- Continues processing CONFIG.SYS from a new file after loading a device driver and setting %NEWFILE% environment variable.
NTemplate:NbndQ
- Specifies default No () response character in Yes/No/Resume prompts.
- Controls keyboard [[Num Lock|Template:Keypress]] status activation or deactivation.
- Executes conditionally based on the last error code, e.g., .
- Shows text and waits for a key press, similar to and commands in DR-DOS.
- Requires user confirmation when errors occur during CONFIG.SYS processing.
- Sets buffer size parameters for LPT ports.
- Conditional execution depending on PC-compatible hardware detection.
- Adjusts scheduler priority settings.
- Assigns priority levels for disk I/O applications.
- Changes default printer device driver assignment (e.g., switching from LPT1 to LPT3 or LPT4).
- Determines whether DOS applications are permitted to run.
- Loads a user interface shell program.
- Conditional execution on IBM PS/1-compatible systems.
- Conditional execution on IBM PS/2-compatible systems.
- Suppresses output directed to STDOUT.
RTemplate:NbndT
- Activates automatic reboot in case of errors.
- Permits inclusion of comments within CONFIG.SYS (ignored in PTS-DOS).
- Reserves a drive letter to prevent allocation by local block device drivers.
- Establishes the default Resume () response character for Yes/No/Resume prompts.
- Returns control from nested CONFIG.SYS processing to the preceding GOSUB or SWITCH instruction, optionally passing a return code.
- Specifies the size of conventional memory available.
- Loads programs in CONFIG.SYS simultaneously in the background, functioning similarly to CALL or INSTALL commands found in DOS/OS2.
- Configures storage of the first character of deleted files in the reserved FAT area.
- Sets video display mode in FreeDOS; in PTS-DOS, defines screen access protocols.
- Adjusts keyboard Scroll Lock state, enabling or disabling it.
- Defines environment variables.
- Loads the command interpreter shell.
- Similar to SHELL but includes a SIZE parameter to pre-allocate COMMAND.COM into HMA or UMBs, minimizing fragmentation when using third-party shells.
- Sets keyboard modifier keys such as Shift Lock, Num Lock, Scroll Lock, and Insert mode.
- Determines whether files close upon pressing Ctrl+Alt+Del.
- Indicates whether to bypass POST during reboot.
- , STACKSIZE, STACKSHIGH
- Configure hardware interrupt stack sizes and buffer allocations across various DOS versions and derivatives.
- , SYSBOOT, SYSGEN, SYSLOAD
- PTS-DOS commands managing boot procedures and system memory setup.
- , SWITCH
- DOS directives enabling conditional processing and submenu blocks (with some variant-specific limitations).
- , SWAPPATH, THREADS, TIMESLICE
- OS/2 parameters controlling error logging paths, swap file locations, multitasking threads, and scheduler time slices.
- , TRACE
- Manages timeout durations and activates single-step execution within CONFIG.SYS/AUTOEXEC.BAT for DR-DOS and PTS-DOS (with distinctions under OS/2).
- Other directives govern system behaviors involving temporary file extensions (TMPEXT), A20 gate handling (STUBA20), switch character definitions (SWITCHAR), special options (SWITCHES), hardware fixes (SXFAKEHWFPU), trace buffer configurations (TRACEBUF), and error logging mechanisms (TRAPDUMP).
UTemplate:NbndZ
- Assigns a specific segment as an Upper Memory Block (UMB) for DOS usage.
- Defines the UMB server component.
- Sets address ranges for UMB RAM areas.
- Enables or disables verification of disk writes.
- Specifies the DOS version that programs will detect.
- Configures VGA display status parameters.
- Determines current video mode, analogous to FreeDOS's SCREEN directive.
- Controls usage of virtual DMA channels.
- Manages processor Virtual Mode Extensions (VME) settings.
- Configures Windows VxD driver parameters.
- Sets Windows system support options.
- Relocates the Extended BIOS Data Area (XBDA).
- Executes conditionally on XT-compatible machines.
- Configures Year 2000 compliance support.
- Defines default affirmative response character in prompts.
- Controls file deletion tracking features.
Issues
Although a system can start without CONFIG.SYS or AUTOEXEC.BAT files present, these are vital for tailoring the operating system and software environment. Corruption or damage necessitates troubleshooting efforts.
If CONFIG.SYS lacks a SHELL directive or is missing or corrupted, DOS attempts to locate COMMAND.COM in the root directory. Versions prior to 6.0 will fail to boot if COMMAND.COM is absent. MS-DOS 6.0/PC DOS 6.1 and Novell DOS 7 and later prompt users to specify a command interpreter path when COMMAND.COM cannot be found or if loading the shell fails. This mechanism permits limited shell replacement at runtime without requiring a reboot.
Due to incompatibilities between MS-DOS 7.0+ COMMAND.COM and DR-DOS, versions of DR-DOS from 7.02 onward enforce SHELL directives during skip/trace operations to prevent conflicts commonly encountered in dual-boot scenarios. Additional key combinations allow restoration of prior skip behaviors to recover from invalid shell arguments. If no valid SHELL directive is detected during skip processing, users must explicitly specify an appropriate shell before loading COMMAND.COM.
CONFIG.SYS file size restrictions differ depending on the operating system version—MS-DOS/PC DOS limits range from a few kilobytes up to approximately 64 KB in later releases, whereas DR-DOS imposes no practical size constraints beyond those inherent to the file system. MS-DOS processes CONFIG.SYS by compiling it into tokenized memory before executing directives sequentially—loading drivers first followed by TSRs. Conversely, DR-DOS interprets CONFIG.SYS line-by-line, enabling precise control over loading order and flow based on conditions such as processor type, key press states, load errors, or return codes.
This granular control allows DR-DOS users to resolve driver conflicts effectively and integrate temporary external utilities via the INSTALL command within CONFIG.SYS.
Earlier MS-DOS/PC DOS versions restricted SHELL command line length to a maximum of 31 characters. Later editions extended this limit up to 128 characters, while DR-DOS supports command lines up to 255 characters long. It should be noted that CONFIG.SYS directives do not accept long filenames.
Dual Booting DOS and Windows 9x
During the installation of Windows 95 over a pre-existing DOS or Windows environment, the files CONFIG.SYS and AUTOEXEC.BAT are renamed to CONFIG.DOS and AUTOEXEC.DOS to enable dual boot functionality between Windows 9x and DOS. When the system boots into DOS, these files are temporarily reverted to their original filenames. Additionally, Windows 95 configuration files are saved under the names CONFIG.W40 and AUTOEXEC.W40.
When using Caldera DR-DOS versions 7.02 or 7.03 alongside Windows 95, the CONFIG.SYS and AUTOEXEC.BAT files associated with Windows remain unmodified. Instead, DR-DOS relies on DCONFIG.SYS and AUTODOS7.BAT for its startup settings.
OS/2 and Windows NT
OS/2 heavily depends on CONFIG.SYS for setting up drivers and environment variables prior to loading its graphical user interface.
Within the OS/2 subsystem embedded in Windows NT, CONFIG.SYS appeared accessible to OS/2 applications but was actually maintained within the system registry.
There are many undocumented CONFIG.SYS commands specific to OS/2.
CONFIG.SYS continues to be significant in OS/2-based systems such as eComStation and ArcaOS.
See also
- IBMBIO.COM / IO.SYS
- IBMDOS.COM / MSDOS.SYS
- CONFIG (environment variable)
- AUTOEXEC.BAT
- COMMAND.COM
- List of DOS commands
External links
- Information on AUTOEXEC.BAT and CONFIG.SYS at Computer Hope
- Overview of Windows 98 / MS-DOS 7.10 CONFIG.SYS directives (archived)
- Caldera’s CONFIG.SYS Command Reference for DR-DOS 7 (archived)
- Details on FreeDOS CONFIG.SYS directives
- PTS-DOS 2000 Pro User Guide including CONFIG.SYS commands
- Unofficial German PTS-DOS FAQ featuring CONFIG.SYS directives (archived)