* (CONFIG.SYS directive)
| Company type | Configuration file |
|---|---|
| Industry | Computer software |
| Founded | 1983 |
| Headquarters | N/A , N/A |
| Products | System configuration for DOS and OS/2 |
CONFIG.SYS serves as the chief configuration file for DOS and OS/2 operating systems. This ASCII text file contains setup instructions accessible to users, which the operating system's DOS BIOS—usually found in IBMBIO.COM or IO.SYS—interprets during the startup sequence. CONFIG.SYS was first introduced with DOS version 2.0.
Usage
Within CONFIG.SYS, directives are used to configure DOS for hardware devices, software applications, and memory management operations. Once CONFIG.SYS is processed, DOS launches the command interpreter specified by the SHELL directive; if none is specified, it defaults to COMMAND.COM, which subsequently processes the AUTOEXEC.BAT file.
The file primarily contains name=value pairs that define system parameters or instruct the loading of files such as device drivers and terminate-and-stay-resident programs (TSRs). This configuration file is located in the root directory of the bootable drive.
The CONFIG.SYS filename is also utilized by (DCP), an MS-DOS variant developed by East-German manufacturer VEB Robotron.
Certain DOS derivatives look for alternative configuration filenames that take precedence over CONFIG.SYS:
Advanced iterations of Concurrent DOS 386, Concurrent DOS XM, Multiuser DOS, and REAL/32 employ CCONFIG.SYS or CCONFIG.INI, storing configuration data in a binary format named CCONFIG.BIN, which is typically edited using CONFIG.EXE.
In DR DOS versions starting from 3.31, including distributions like PalmDOS, Novell DOS, and DR-DOS 7.x, the DCONFIG.SYS file overrides CONFIG.SYS. This approach facilitates disk compression and supports multi-boot environments. These systems may also detect ODCONFIG.SYS or DRCONFIG.SYS. The command SYS /DR:ext enables customizing default system file extensions, allowing multiple system file sets to coexist, managed by boot loaders such as LOADER in Multiuser DOS and DR-DOS.
The SHELL directive permits specifying alternate AUTOEXEC.BAT files through /P[:filename.ext], with COMMAND.COM accepting extensions beyond ".BAT"—a capability also present in 4DOS. Additionally, DR-DOS introduces a CHAIN=filespec[,label] directive that continues processing another configuration file, which does not have to be located in the root directory.
Starting with DR-DOS 7.03, the SYS /A command can copy both CONFIG.SYS and AUTOEXEC.BAT alongside other system files.
FreeDOS uses FDCONFIG.SYS; meanwhile, RxDOS utilizes RXCONFIG.SYS, and PTS-DOS employs CONFIG.PTS.
Although CONFIG.SYS and AUTOEXEC.BAT remain on Windows 95 and 98 boot partitions, they are usually empty. In contrast, Windows Me does not parse CONFIG.SYS at startup; instead, it loads environment variables from the Windows Registry (HKLM\System\CurrentControlSet\Control\SessionManager\Environment).
In the case of FlexOS, CONFIG.SYS is a binary configuration file that specifies resource managers and device drivers loaded during system initialization.
Example
A sample CONFIG.SYS for MS-DOS 5 might appear as follows: <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>
:;*?!
- Defines labels within CONFIG.SYS to serve as jump destinations for directives such as , , , and .
- Functions similarly to , but also allows for inline comments appended to other CONFIG.SYS commands. (Note: In MS-DOS/PC DOS, inline comments enclosed in double quotes are not ignored.)
- Marks the beginning of inline comments, complementing the use of ;.
- Prompts with a Yes/No question to confirm whether subsequent CONFIG.SYS directives should be executed. (FreeDOS does not support custom messages but allows conditional execution via boot menus.) Starting with DOS 6.0, similar functionality is available through suffixes appended after directives.
- Forces unconditional execution of the following CONFIG.SYS instruction.
ATemplate:NbndC
- Determines whether programs can be terminated upon encountering errors.
- Defines which drives record file access timestamps in FAT file systems.
- Enables conditional command execution on AT-compatible hardware.
- Functions as a boot manager.
- Adjusts the verbosity level of error messages.
- Alters the default serial device driver assigned to the AUX: device.
- Prevents usage of character devices located outside the phantom \DEV directory.
- Loads the fundamental device driver into memory.
- Produces a brief beep even when audible alerts are disabled.
- Specifies the next operating system to boot.
- Activates or deactivates extended Ctrl+C monitoring.
- Determines the quantity of disk buffers allocated.
- Similar to BUFFERS but allocates buffers within HMA or UMB memory areas.
- , , (Embedded DOS 6-XL only)
- Sets cache size and timing parameters.
- Loads programs listed in CONFIG.SYS and pauses processing until they complete.
- Controls Caps Lock keyboard status.
- , (PTS-DOS only)
- Configures CD-ROM hardware drivers and buffer settings.
- Continues processing CONFIG.SYS from a new file or label reference.
- , , and other PTS-DOS directives manage system behaviors such as clock configuration and screen clearing.
- (OS/2 only)
- Defines OEM codepages for international language support.
- , ..., (DR-DOS 7.02+)
- Configures serial COM ports including number, sequence, I/O addresses, and timeouts.
- , (DOS 4.0+ and RxDOS) redefine inline comment characters or skip lines depending on DOS variant.
- , (DOS 3.0+, DR DOS 3.31+, OS/2) enable and configure internationalization features.
Additional CPU-specific directives (e.g., CPU88, CPU286, CPU386) allow conditional command execution based on processor type, mainly used in PTS-DOS and DR-DOS systems.
DTemplate:NbndF
- Adjusts relocation settings for drive descriptor tables.
- Specifies memory segment address used for multi-sector disk data deblocking.
- Activates internal debugger capabilities.
- 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 information for keyboard, screen, and printer devices.
- Configures sizes for cache memory allocation.
- Defines compatibility mode for floppy disk drives.
- Specifies the font used for display output.
- Controls loading of DOS into high memory area and/or utilization of upper memory blocks.
- Loads DOS configuration tables (BUFFERS, FCBS, FILES, LASTDRIVE, STACKS) into upper memory areas.
- Indicates an alternative directory path to locate DOS files.
- Defines search paths for data files.
- Provides physical parameters for disk drives configuration.
- Sets parameters for drives that are not recognized by default.
- Refer to .
- Enables specification of drives for PDUMP.nnn error log generation.
- Outputs a message on screen display.
- Displays messages including ANSI escape sequences support.
- Adds extra verification steps when launching programs.
- Assigns assumed error or return codes for subsequent commands.
- Controls A20 gate state during program startup.
- Terminates CONFIG.SYS processing prematurely except for SWITCHES and SHELL directives.
- Configures hash table size to optimize file open operations (distinct from MS-DOS FASTOPEN).
- Sets the count of cached File Control Blocks (FCBs) allowed open simultaneously (shares buffer with FILES under DR-DOS).
- Equivalent to FCBS but loads FCBs into upper memory regions.
- Functions as a boot manager.
- Defines the maximum number of files that can be open at once.
- Same as FILES but loads file handles into upper memory blocks.
- Allows execution of designated CONFIG.SYS subsections (see IGNORE).
GTemplate:NbndI
- Waits for a key press or timeout, assigning the error level to the corresponding ASCII value (or 1024 if timed out).
- Resumes CONFIG.SYS execution at a designated label.
- Continues nested CONFIG.SYS processing at a specified label, then returns to the previous point.
- Refer to , , or for additional details.
- Consult for further information.
- See for related commands.
- Refer to or for more context.
- See or for related functionality.
- Consult for additional guidance.
- Loads a terminate-and-stay-resident (TSR) program into memory following DOS data segment relocation. Compare with INSTCDEX.
- Refer to , , or for related options.
- See for further details.
- Consult or for supplementary information.
- Activates console and command line history buffer along with enhanced pattern search capabilities.
- Defines the address of the High Memory Area (HMA) segment.
- Configures energy-saving settings related to the HLT instruction.
- Specifies system checks for boot sector viruses during startup.
- Loads installable file system drivers.
- Prevents execution of particular CONFIG.SYS subsections. See for more information.
- Permits designated programs to operate at CPU ring 2, enabling direct hardware I/O access.
- Incorporates directives from another menu block, emulated via GOSUB/RETURN in DR-DOS.
- Sets the status of keyboard Insert mode.
- Loads a TSR program into memory.
- Installs a TSR program into upper memory, equivalent to HIINSTALL in DR DOS 5.0.
- Loads a TSR program after relocating the DOS data segment. Compare with INSTCDEX.
- Adjusts PIC interrupt priorities so that a specified IRQ attains the highest priority.
KTemplate:NbndM
- Defines keyboard layout configuration.
- Assigns relocated keyboard buffer address.
- Sets maximum number of accessible drives.
- Functions like LASTDRIVE but additionally loads Current Directory Structure into upper memory.
- Lists paths for DLL searches.
- Manages compatibility with legacy applications.
- Determines the number of allowable file locks.
- Enables support for boot logos and integrates with PTS-DOS boot manager systems.
- Configures parameters such as count, order, I/O address, and timeout for LPT1 devices.
- Applies similar configuration settings to LPT2 devices.
- Configures LPT3 device similarly to LPT1 and LPT2.
- Enables and configures LPT4 devices accordingly.
- Sets delay before elevating process priority.
- Defines strategy for memory allocation management.
- Specifies default DOS memory allocation method.
- Establishes menu option definitions.
- Sets menu color schemes (emulated in DR-DOS).
- Assigns default menu block (emulated in DR-DOS).
- Defines individual menu blocks (emulated in DR-DOS).
- Enables operations involving multitrack disk access.
- Continues CONFIG.SYS processing in a new file after loading device drivers and sets the %NEWFILE% environment variable.
NTemplate:NbndQ
- Determines default "No" character response in Yes/No/Resume prompts.
- Controls keyboard Num Lock state, turning it on or off.
- Executes conditionally based on the last error code, such as .
- Displays a message and waits for a keypress, similar to and commands in DR-DOS environments.
- Requires user confirmation upon encountering errors within CONFIG.SYS processing.
- Configures buffer sizes allocated to LPT ports.
- Executes commands conditionally on PC-compatible hardware platforms.
- Sets scheduler priority levels for processes.
- Assigns priority levels specifically for disk I/O operations.
- Changes default printer driver assignment (e.g., switching from LPT1 to LPT3).
- Restricts execution of DOS programs under certain conditions.
- Loads the user interface shell environment.
- Executes commands conditionally on IBM PS/1-compatible systems.
- Executes commands conditionally on IBM PS/2-compatible systems.
- Suppresses output directed to STDOUT.
RTemplate:NbndT
- Activates automatic system reboot upon encountering errors.
- Permits inclusion of comments within CONFIG.SYS files.
- Allocates a drive letter for local block device drivers.
- Defines the default character used for Resume () prompts.
- Enables returning from nested CONFIG.SYS processing to the previous GOSUB or SWITCH point with an optional return value.
- Specifies the size of real mode memory available.
- Allows simultaneous loading of programs in the background during CONFIG.SYS execution.
- Manages whether the first deleted file character is retained in FAT directory entries.
- Sets video display mode in FreeDOS or screen access methods under PTS-DOS.
- Controls the status of the keyboard Scroll Lock key.
- Establishes environment variables for the session.
- Loads the command interpreter shell program.
- Loads the shell with a predefined memory allocation to optimize usage of HMA or UMB under PTS-DOS.
- Configures keyboard modifier states such as Shift Lock, Num Lock, Scroll Lock, and Insert mode.
- Determines whether files close automatically when rebooting via Ctrl+Alt+Del.
- Skips the Power-On Self Test (POST) during reboot sequences.
- , STACKSIZE, STACKSHIGH
- Set hardware interrupt stack sizes and buffer locations across various DOS versions and derivatives, with some compatibility details omitted for brevity.
- , SYSBOOT, SYSGEN, SYSLOAD, SYSTOUMB
- PTS-DOS commands that manage boot procedures, system memory assignments, and loading options.
- , SUPPRESSPOPUPS, SWAPPATH
- OS/2-specific CONFIG.SYS parameters controlling user interface elements, error logging behavior, and swap file directory paths.
- , SWITCHES, SWITCHAR
- Manage conditional processing and define system switch characters across different DOS variants.
- , THREADS, TIMESLICE
- OS/2 directives that handle hardware fixes, concurrency thread counts, and scheduler time slice durations.
- , TRACE, TRACEBUF
- Control execution timeouts for CONFIG.SYS, enable single-step debugging functions, and configure log buffer sizes primarily in DR-DOS and PTS-DOS systems.
- , TRAPDUMP
- Specify temporary file extensions (PTS-DOS) and detailed error logging configurations (OS/2).
UTemplate:NbndZ
- Designates a specific segment for use as Upper Memory Block (UMB) by DOS management.
- Defines which UMB server to utilize.
- Indicates address ranges allocated as UMB RAM.
- Enables or disables verification of disk write operations.
- Sets the DOS version string reported to running applications.
- Controls VGA display operational status.
- Specifies the active video mode setting.
- Determines if virtual DMA functionality is permitted.
- Enables or disables processor Virtual Mode Extensions (VME).
- Configures VxD driver settings for Windows environments.
- Sets system support parameters for Windows operating systems.
- Adjusts relocation settings for the Extended BIOS Data Area (XBDA).
- Allows conditional execution on XT-compatible hardware platforms.
- Enables built-in Year 2000 compliance features.
- Defines the default affirmative response character in prompts.
- Configures tracking of file deletions.
Issues
Although it is possible to boot the system without CONFIG.SYS or AUTOEXEC.BAT files, these are critical for comprehensive operating system customization and fulfilling software dependencies. Damaged or missing configuration files require diagnostic efforts.
In cases where CONFIG.SYS does not include a SHELL directive or if it is corrupted, DOS attempts to locate COMMAND.COM within the root directory. Versions prior to 6.0 will fail to boot if COMMAND.COM cannot be found. Starting with MS-DOS 6.0/PC DOS 6.1 and Novell DOS 7 and later, users are prompted to specify an alternative command processor path if COMMAND.COM is absent or aborted. This mechanism permits limited runtime shell replacement without restarting the system.
Due to incompatibilities between MS-DOS 7.0+ COMMAND.COM and DR-DOS, DR-DOS versions 7.02 and above restrict skipping SHELL directives when operating in "skip", "trace", or "step" modes. This enhances stability in dual-boot configurations. Recovery procedures are available to address invalid shell arguments by prompting users to enter a valid shell before loading COMMAND.COM.
The size of CONFIG.SYS is constrained to a few kilobytes under MS-DOS/PC DOS (up to 64 KB in later releases), whereas DR-DOS imposes no such limit beyond file system constraints. MS-DOS processes CONFIG.SYS by compiling it into tokenized form and executes directives sequentially—device drivers before TSRs. Conversely, DR-DOS interprets each directive line individually, allowing fine-grained control over driver and TSR loading order through DEVICE and INSTALL commands. This approach facilitates resolution of load conflicts and supports conditional directive execution based on hardware detection or user input.
Additionally, DR-DOS utilizes INSTALL to incorporate non-resident programs into the CONFIG.SYS execution flow, improving customization options and debugging capabilities.
MS-DOS/PC DOS versions 2.0 through 4.01 limit SHELL command line length to 31 characters. Later versions increase this limit to 128 characters while DR-DOS accepts up to 255 characters. It should be noted that CONFIG.SYS directives do not support long filenames.
Dual Booting DOS and Windows 9x
When Windows 95 is installed over a pre-existing DOS or Windows system, the original CONFIG.SYS and AUTOEXEC.BAT files are renamed to CONFIG.DOS and AUTOEXEC.DOS to enable dual boot functionality between Windows 9x and DOS. During DOS startup, these renamed files are temporarily reverted to their original names, CONFIG.SYS and AUTOEXEC.BAT. Meanwhile, backup copies of the Windows 95 versions are saved as CONFIG.W40 and AUTOEXEC.W40.
In cases where Caldera DR-DOS versions 7.02 or 7.03 coexist with Windows 95, the CONFIG.SYS and AUTOEXEC.BAT files for Windows remain untouched. DR-DOS employs its own startup configuration files named DCONFIG.SYS and AUTODOS7.BAT.
OS/2 and Windows NT
OS/2 extensively utilizes CONFIG.SYS to set up drivers and environment parameters before launching its graphical user interface.
Within the OS/2 subsystem of Windows NT, the configuration settings traditionally held in CONFIG.SYS are instead maintained in the system registry.
There exists a variety of undocumented CONFIG.SYS commands specific to OS/2.
CONFIG.SYS continues to be used by 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
- Detailed information on AUTOEXEC.BAT and CONFIG.SYS at Computer Hope
- Overview of CONFIG.SYS directives for Windows 98 / MS-DOS 7.10 (archived)
- Caldera's CONFIG.SYS Command Reference (archived) – guide to DR-DOS 7 directives
- Documentation of FreeDOS CONFIG.SYS directives
- PTS-DOS 2000 Pro User Manual featuring CONFIG.SYS directives (archived)
- German-language unofficial PTS-DOS FAQ (2004) with additional CONFIG.SYS commands