COLOR (CONFIG.SYS directive)
| Company type | Configuration file |
|---|---|
| Industry | Operating systems |
| Founded | 1983 |
| Products | System configuration for DOS and OS/2 |
CONFIG.SYS serves as the main configuration file for the DOS and OS/2 operating system families. This specialized ASCII text document holds setup instructions accessible to users, which are interpreted by the operating system's DOS BIOS—commonly found in IBMBIO.COM or IO.SYS—during the startup process. CONFIG.SYS was first introduced with DOS version 2.0.
Usage
The directives contained within CONFIG.SYS are responsible for configuring DOS to support hardware devices, software applications, and memory management utilities. Once CONFIG.SYS has been processed, DOS initiates the command interpreter specified by the SHELL directive; if none is provided, it defaults to COMMAND.COM, which then executes commands from the AUTOEXEC.BAT file.
Primarily, CONFIG.SYS is composed of name=value entries that establish adjustable settings or load essential files, predominantly device drivers and terminate-and-stay-resident programs (TSRs), into system memory. This file is located in the root directory of the bootable disk.
The same filename convention is also employed by (DCP), an MS-DOS variant developed by the former East-German company VEB Robotron.
Certain DOS variants check for alternate filenames that override CONFIG.SYS:
Earlier releases of Concurrent DOS versions 3.2 through 4.1 lacked support for CONFIG.SYS; however, subsequent editions such as Concurrent DOS 386, Concurrent DOS XM, Multiuser DOS, and REAL/32 utilize CCONFIG.SYS (derived from "Concurrent") instead. Some Multiuser DOS variants opt for CCONFIG.INI, while REAL/32 searches for MCONFIG.SYS. These operating systems also accommodate additional configuration data stored in binary formats like CCONFIG.BIN, which are typically edited using CONFIG.EXE.
On systems like DR DOS 3.31, PalmDOS 1.0, Novell DOS 7, and DR-DOS versions 7.02 and later, a configuration file named DCONFIG.SYS (short for "DR DOS") takes precedence over CONFIG.SYS. Initially introduced alongside disk compression utilities to handle drive letter reassignment, it has evolved to support multi-boot environments. Additionally, OpenDOS 7.01 and DR-OpenDOS 7.02 look for ODCONFIG.SYS, while some DR-DOS 7.02+ editions check for DRCONFIG.SYS.
Starting with DR DOS 6.0 and subsequent releases, users can modify default system file extensions using SYS /DR:ext, enabling multiple sets of system files to coexist within a single root directory and be selected via boot loaders such as those included with Multiuser DOS and DR-DOS 7.x. The SHELL command allows specifying alternative AUTOEXEC.BAT files through the /P[:filename.ext] option; notably, COMMAND.COM supports extensions beyond .BAT (a feature also present in 4DOS). The CHAIN=filespec directive in DR-DOS facilitates continuing configuration processing with another file, which may reside outside the root directory; newer versions provide functionality to jump directly to labeled sections within chained files.
From version 7.03 onward, DR-DOS adds a SYS /A switch that copies CONFIG.SYS and AUTOEXEC.BAT alongside other system files.
In a similar fashion, FDCONFIG.SYS is used by FreeDOS, while RXCONFIG.SYS is recognized by RxDOS version 7.24 and above, and CONFIG.PTS is utilized by PTS-DOS.
Both CONFIG.SYS and AUTOEXEC.BAT are found in the root directory of Windows 95 and Windows 98 boot disks due to their DOS heritage, though these files are generally empty. Conversely, Windows Me does not process 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 configuration file that specifies resource managers and device drivers loaded during system initialization.
Example
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 in CONFIG.SYS that act as jump destinations for directives like , , , and .
- Functions similarly to , but can also serve as inline comments after other CONFIG.SYS commands. (Note: In MS-DOS/PC DOS, inline comments within double quotes are not ignored.)
- Introduces inline comments in addition to the ; directive.
- Prompts the user with a Yes/No confirmation before executing subsequent CONFIG.SYS commands. (FreeDOS supports conditional options with boot menus.) DOS 6.0 and later allow a comparable feature by appending after the directive (e.g., ).
- Forces execution of the following CONFIG.SYS instruction without conditions.
ATemplate:NbndC
- Determines whether programs can be terminated on encountering errors.
- Specifies which drives record file access timestamps in reserved FAT directory entries.
- Allows conditional execution specifically on AT-compatible systems.
- Manages boot loading.
- Adjusts the verbosity level of error messages displayed.
- Changes the default internal serial device driver assignment (from COM1: through COM4:) for the AUX device.
- Prevents access to character devices outside the virtual \DEV directory.
- Loads fundamental device drivers into system memory.
- Produces a beep sound even when audible alerts are disabled.
- Indicates which operating system to load next during boot.
- Enables or disables extended Ctrl+C event checking.
- Sets the quantity of disk buffers allocated.
- Explicitly loads buffers into High Memory Area or Upper Memory Blocks.
- , , (Embedded DOS 6-XL only)
- Controls cache block allocation, retention duration, and flush timing parameters.
- Executes programs within CONFIG.SYS, pausing processing until completion.
- Defines Caps Lock keyboard status as on or off.
- , (PTS-DOS only)
- Specifies CD-ROM driver name and number of buffers.
- (DR DOS 5.0+ and Embedded DOS)
- Continues processing CONFIG.SYS from another file or label.
- , , and other PTS-DOS exclusive directives
- Configure system clock type, clear screen commands, etc.
- , (OS/2 only)
- Sets OEM codepage configurations.
- , x=1..4 (DR-DOS 7.02+)
- Defines count, priority, I/O port address, and timeout settings for COM ports.
Additional commands govern device buffer sizes, internationalization support via COUNTRY directives, CPU-specific conditional execution (CPU386+), and other system-level options essential for optimizing DOS environments in professional applications.
DTemplate:NbndF
- Adjusts relocation of drive descriptor tables in memory.
- Sets memory segment address used for multi-sector disk data deblocking operations.
- Enables internal debugger features.
- Controls boot management functions.
- Loads device drivers into conventional memory areas.
- Loads drivers into upper memory regions (equivalent to in DRDOS 5.0).
- Configures country and codepage information for keyboard, screen, and printer devices.
- Sets cache memory allocations.
- Defines floppy disk compatibility modes.
- Specifies display font settings.
- Manages loading of DOS components into high or upper memory segments.
- Loads DOS internal tables (BUFFERS, FCBS, FILES, LASTDRIVE, STACKS) into upper memory areas.
- Provides an alternative path location for DOS files.
- Defines search paths for data files used by DOS utilities.
- Specifies physical parameters for disk drives.
- Configures parameters for drives not recognized by default drivers.
- Refer to .
- Enables drive specification for PDUMP.nnn error log files.
- Displays messages on the screen during boot or execution.
- Shows messages utilizing ANSI escape sequences for formatting.
- Activates additional verification checks when launching programs.
- Assigns error or return codes expected after program execution.
- Controls A20 gate state at program startup.
- Terminates CONFIG.SYS processing prematurely except for certain SWITCHES and SHELL directives.
- Sets the size of hash tables to speed file open operations (differs from MS-DOS/PC DOS FASTOPEN driver).
- Specifies the maximum number of cached File Control Blocks that can be open simultaneously (shares buffer with FILES under DR-DOS).
- Similar to FCBS but explicitly loads these into upper memory segments.
- Boot manager configuration setting.
- Determines maximum number of files that can be opened concurrently.
- Like FILES but explicitly loads file handles into upper memory areas.
- Includes execution of specified subsections within CONFIG.SYS (see IGNORE).
GTemplate:NbndI
- Waits for a key press or times out, setting the error level to the ASCII value or 1024 if timed out.
- Resumes processing of CONFIG.SYS at the given label.
- Continues nested CONFIG.SYS processing at a specified label, then returns to the previous point.
- Refer to , , or for additional information.
- Consult for further details.
- See for more context.
- Refer to or as needed.
- Consult or for related commands.
- See for further explanation.
- Loads a TSR program following DOS data segment relocation. Related command: INSTCDEX.
- Refer to , , or for more information.
- See for additional details.
- Refer to or as applicable.
- Activates console and command line history buffer with enhanced search capabilities.
- Defines the address of the HMA segment.
- Sets HLT mode for energy conservation.
- Enables scanning of the boot sector for viruses.
- Loads installable file system drivers.
- Skips execution of designated CONFIG.SYS sections.
- Permits certain programs to execute at ring 2, allowing direct hardware access.
- Includes directives from another menu block (can be emulated using GOSUB/RETURN in DR-DOS).
- Sets the keyboard’s Insert mode status.
- Loads a TSR program into memory.
- Loads a TSR program into upper memory (equivalent to HIINSTALL in DR DOS 5.0).
- Installs TSR after relocating DOS data segment (compare with INSTCDEX).
- Adjusts PIC interrupt priorities to assign highest priority to a specified IRQ.
KTemplate:NbndM
- Defines the keyboard layout in use.
- Indicates the address of the relocated keyboard buffer.
- Sets the maximum number of accessible drives.
- Similar to LASTDRIVE but loads Current Directory Structure (CDS) into upper memory.
- Specifies search paths for dynamic link libraries (DLLs).
- Controls compatibility handling for legacy software.
- Determines the number of file locks allowed.
- Configures boot logo support, enabling startup messages via PTS-DOS boot manager.
- Specifies count, sequence, I/O port, and timeout parameters for LPT1 devices.[1]
- Same configuration as LPT1 but applied to LPT2.[1]
- Applies LPT1 settings analogously to LPT3.[1]
- Enables and sets parameters for LPT4 devices.
- Defines wait time before increasing process priority level.
- Configures memory allocation policies.
- Sets default strategy for DOS memory allocation.
- Specifies menu options available at boot time.
- Defines menu color schemes (can be emulated under DR-DOS).
- Sets the default menu block (emulatable with and in DR-DOS).
- Declares a menu block (emulatable via and under DR-DOS).
- Enables multitrack disk operations support.
- Continues CONFIG.SYS processing in another file after loading a device driver, setting %NEWFILE% environment variable.[2]
NTemplate:NbndQ
- Establishes the default character for No () responses in Yes/No/Resume prompts.
- Sets keyboard [[Num Lock|Template:Keypress]] on or off by default.
- Allows conditional execution depending on last error code, e.g., .
- Displays a message and waits for key input, similar to and commands in DR-DOS.
- Requires user confirmation on errors encountered during CONFIG.SYS processing.
- Sets buffer size parameters for LPT ports.
- Enables conditional execution on PC-compatible hardware platforms.
- Configures scheduler priority levels.
- Defines priority settings for disk input/output operations.
- Changes default printer device driver assignment (e.g., switching from LPT1 to LPT3 or LPT4).
- Specifies whether DOS applications are permitted to run.
- Loads a user interface shell environment.
- Enables conditional execution on IBM PS/1-compatible systems.
- Enables conditional execution on IBM PS/2-compatible systems.
- Suppresses output sent to STDOUT.
RTemplate:NbndT
- Activates automatic system reboot upon encountering errors.
- Permits inclusion of comments within CONFIG.SYS (ignored by PTS-DOS).
- Allocates a drive letter for local block device drivers.
- Establishes the default Resume () character used in prompts.
- Returns control from nested CONFIG.SYS processing to the prior GOSUB or SWITCH point, optionally passing a return code.
- Sets the size of real mode memory.
- Allows programs to be loaded simultaneously in the background during CONFIG.SYS processing, functioning similarly to CALL or INSTALL commands in DOS.
- Determines whether the first character of deleted files is stored in the reserved section of FAT directory entries.
- Defines video modes under FreeDOS or screen access methods under PTS-DOS.
- Controls the status of the Scroll Lock key (on or off).
- Establishes environment variables.
- Loads the command interpreter shell.
- Similar to SHELL but includes support for pre-allocating COMMAND.COM size in HMA or UMB areas to optimize memory usage when using third-party shells.
- Specifies keyboard modifier states such as Shift Lock, Num Lock, Scroll Lock, and Insert mode.
- Determines whether files close upon pressing Ctrl+Alt+Del.
- Indicates if POST is bypassed during reboot.
- , STACKSIZE, STACKSHIGH
- Configure stack sizes for hardware interrupts and thread stacks across various DOS versions and OS/2 environments, with some parameters ignored in newer releases or specific systems.
- , SYSBOOT, SYSGEN, SYSLOAD, SYSTOUMB (PTS-DOS exclusive)
- Manage boot manager configurations, alternative DOS boot files, memory locations of DOS components, and loading DOS data/code into upper memory blocks to enhance performance.
- , SWITCH
- Enables conditional branching and submenu blocks within CONFIG.SYS processing (DR-DOS uses CLS, ECHO, SWITCH to simulate SUBMENU functionality).
- , SWAPPATH (OS/2 only)
- Sets paths for error logging and swap file storage.
- , SWITCHES
- Defines default switch characters ('/' or '-') and special command-line processing options across different DOS variants.
- , THREADS (OS/2)
- Activates FPU bug fixes and specifies the number of concurrent threads allowed.
- , TRACE
- Sets timeouts for single-step execution in CONFIG.SYS commands and toggles tracing of CONFIG.SYS/AUTOEXEC.BAT execution for debugging on various DOS systems including DR-DOS, PTS-DOS, FreeDOS, and OS/2.
- , TRAPDUMP
- Specifies temporary file extensions (PTS-DOS) and configures detailed error logging (OS/2).
UTemplate:NbndZ
- Configures DOS to utilize a specific segment as UMB memory.
- Specifies which UMB server is used.
- Defines address ranges allocated as UMB RAM.
- Enables or disables verification of disk writes.
- Sets the DOS version reported to applications.
- Controls VGA display status.
- Indicates current video mode, similar to FreeDOS’s SCREEN setting.
- Determines whether virtual DMA is permitted.
- Specifies if Virtual Mode Extensions (VME) are disabled.
- Configures VxD driver settings for Windows environments.
- Sets system support parameters for Windows operation.
- Manages relocation of the Extended BIOS Data Area (XBDA).
- Enables conditional execution restricted to XT-compatible machines only.
- Configures built-in support for Year 2000 compliance.
- Defines the default Yes character used in prompts.
- Activates deletion tracking features.
Issues
Although the system is capable of booting without CONFIG.SYS or AUTOEXEC.BAT, these configuration files are crucial for a full DOS startup experience and system customization, especially to meet specific software needs. Any damage or corruption in these files requires diagnostic efforts to resolve.
In cases where CONFIG.SYS either omits the SHELL directive or becomes corrupted or missing, DOS defaults to searching for COMMAND.COM within the root directory. Earlier DOS versions prior to 6.0 will fail to boot if COMMAND.COM is not found. However, MS-DOS 6.0, PC DOS 6.1, and Novell DOS 7 and later versions will prompt users to provide a valid command processor path if COMMAND.COM is unavailable. This prompt also occurs if the primary command interpreter terminates intentionally or crashes, enabling users to replace the runtime shell without needing a reboot.
Due to compatibility issues between MS-DOS 7.0+ COMMAND.COM and DR-DOS, DR-DOS versions 7.02 and above prevent skipping SHELL directives during skip or trace modes to avoid conflicts in dual-boot environments. Recovery mechanisms include reactivating skip mode behavior and requesting a valid shell filename before loading COMMAND.COM from the root directory.
The maximum allowable size for CONFIG.SYS varies depending on the operating system: MS-DOS and PC DOS limit this file to a few kilobytes (with newer versions allowing up to 64 KB), whereas DR-DOS imposes no specific size restriction beyond the constraints of the file system itself. MS-DOS processes CONFIG.SYS by compiling it into a tokenized format and executes directives in a predetermined sequence—loading device drivers before TSR programs. Conversely, DR-DOS interprets CONFIG.SYS directives sequentially, line by line, which grants precise control over loading order through commands like DEVICE and INSTALL. This approach is advantageous for troubleshooting driver conflicts or managing load priorities.
The line-by-line processing model in DR-DOS enables conditional logic and interactive user input during startup, based on factors such as CPU type, keyboard input, error codes, or return values. Additionally, the INSTALL command can launch non-resident utilities that integrate directly into CONFIG.SYS execution.
Shell command line length limits have expanded over time: MS-DOS and PC DOS versions 2.0 through 4.01 restrict shell lines to 31 characters, while later releases allow up to 128 characters. DR-DOS supports even longer lines, accommodating up to 255 characters. It should be noted that CONFIG.SYS directives do not accept long filenames.
Dual booting DOS and Windows 9x
When Windows 95 is installed on top of an existing DOS or Windows setup, the original CONFIG.SYS and AUTOEXEC.BAT files are renamed to CONFIG.DOS and AUTOEXEC.DOS respectively. This renaming facilitates dual-boot functionality between Windows 9x and DOS by temporarily restoring these files as CONFIG.SYS and AUTOEXEC.BAT when booting into DOS mode. Additionally, backup copies of the Windows 95-specific configuration files are saved under the names CONFIG.W40 and AUTOEXEC.W40.
In contrast, when Caldera DR-DOS versions 7.02 or 7.03 are installed alongside Windows 95, the Windows configuration files retain their original names (CONFIG.SYS and AUTOEXEC.BAT), while DR-DOS utilizes alternative startup files named DCONFIG.SYS and AUTODOS7.BAT.
OS/2 / Windows NT
OS/2 relies heavily on CONFIG.SYS for loading device drivers and setting environment variables prior to launching its graphical user interface. Within the OS/2 subsystem of Windows NT, what is perceived as CONFIG.SYS by OS/2 applications is actually stored in the Windows registry rather than as a physical file. OS/2 includes numerous undocumented CONFIG.SYS directives unique to its environment.
CONFIG.SYS continues to be employed by OS/2 derivatives 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 settings (archived)
- Caldera’s CONFIG.SYS Command Reference (archived) – summary of DR-DOS 7 directives
- Guide to FreeDOS CONFIG.SYS directives
- PTS-DOS 2000 Pro User Manual detailing CONFIG.SYS commands (archived)
- Unofficial German PTS-DOS FAQ with CONFIG.SYS directive explanations (archived)