STORAGE (CONFIG.SYS directive)
| Company type | Configuration file |
|---|---|
| Industry | Operating systems |
| Founded | DOS version 2.0 |
| Products | Initialization commands for DOS and OS/2 boot process |
CONFIG.SYS serves as the main configuration file for the DOS and OS/2 operating system families. This plain text file, written in ASCII, contains initialization commands that the operating system's DOS BIOS—usually found in IBMBIO.COM or IO.SYS—executes during the boot process. CONFIG.SYS was first introduced with DOS version 2.0.
Usage
Directives within CONFIG.SYS are responsible for setting up DOS to support hardware devices, software applications, and memory management utilities. After CONFIG.SYS is processed, DOS launches the command interpreter specified by the SHELL directive or defaults to COMMAND.COM, which then executes the commands in the AUTOEXEC.BAT file.
The configuration file primarily consists of name=value pairs that either define system parameters or load files such as device drivers and terminate-and-stay-resident programs (TSRs) into memory.
In DOS environments, CONFIG.SYS is located in the root directory of the bootable drive.
The same filename is also utilized by (DCP), an MS-DOS variant developed by East-German company VEB Robotron.
Certain DOS variants check for alternative configuration filenames that take precedence over CONFIG.SYS:
Early versions of Concurrent DOS (3.2–4.1) did not support CONFIG.SYS; however, later releases such as Concurrent DOS 386, Concurrent DOS XM, Multiuser DOS, System Manager, and REAL/32 use CCONFIG.SYS (denoting "Concurrent") instead. Some Multiuser DOS editions employ CCONFIG.INI, while REAL/32 looks for MCONFIG.SYS. These systems often maintain supplementary configuration data in binary files like CCONFIG.BIN, which are typically managed through CONFIG.EXE.
In versions like DR DOS 3.31, PalmDOS 1.0, Novell DOS 7, and DR-DOS 7.02 and later, DCONFIG.SYS (short for "DR DOS") supersedes CONFIG.SYS. Initially designed to support disk compression utilities managing drive letter reassignments, it has since evolved to enable multiple configuration files for multi-boot environments.
OpenDOS 7.01 and DR-OpenDOS 7.02 also search for ODCONFIG.SYS, while some DR-DOS 7.02+ editions look for DRCONFIG.SYS. Since DR DOS 6.0, the command SYS /DR:ext allows customization of default file extensions, permitting multiple parallel system file sets within a single root directory—selectable via boot loaders such as LOADER included with Multiuser DOS and DR-DOS.
The SHELL directive supports specifying alternative AUTOEXEC.BAT files using /P[:filename.ext], with COMMAND.COM accepting extensions other than .BAT in this context (a feature also supported by 4DOS). From DR-DOS 6.0 onward, the CHAIN=filespec directive enables continued processing of another configuration file located anywhere on the boot drive; starting with version 7.02, an optional label parameter allows jumping to a designated section within that file.
Starting with DR-DOS 7.03, the SYS /A option was introduced to copy corresponding CONFIG.SYS and AUTOEXEC.BAT files alongside system files.
FreeDOS provides a comparable capability through FDCONFIG.SYS; RxDOS 7.24 and newer utilize RXCONFIG.SYS; and PTS-DOS implements its own version named CONFIG.PTS.
Both CONFIG.SYS and AUTOEXEC.BAT exist in the root directories of Windows 95 and Windows 98 boot drives but are generally left empty.
Windows Me does not process CONFIG.SYS during startup; instead, it retrieves environment variables directly from the Windows Registry at:
- HKLM\System\CurrentControlSet\Control\SessionManager\Environment
Within the FlexOS operating system, CONFIG.SYS differs as a binary file that specifies resource managers and device drivers loaded at boot time.
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>
:;*?!
- Marks labels in CONFIG.SYS that serve as jump targets for , , , , and commands.
- Functions similarly to , also utilized for inline comments after other directives. (Within MS-DOS/PC DOS, inline comments enclosed in double quotes are not ignored.)
- Used to begin inline comments alongside the ; directive.
- Prompts a Yes/No confirmation before executing subsequent CONFIG.SYS commands. (FreeDOS allows optional conditions with boot menus but lacks optional messaging.) DOS 6.0 and later versions support a comparable syntax by appending after directives.
- Forces execution of the next CONFIG.SYS command without condition.
ATemplate:NbndC
- Determines whether programs can be interrupted upon encountering errors.
- Sets which drives record file access timestamps in FAT file systems.
- Executes conditionally on AT-compatible computers.
- Controls the boot manager functionality.
- Adjusts the verbosity level of error messages.
- Alters the default serial port driver for AUX: from COM1: to COM4:.
- Prevents character devices from being accessible outside the virtual \DEV directory.
- Loads a base device driver into memory.
- Produces a brief beep sound even if audible alerts are disabled.
- Indicates the subsequent operating system to boot.
- Enables or disables extended Ctrl+C checking.
- Defines the number of disk buffers allocated.
- Similar to BUFFERS but loads buffers into HMA or UMB memory areas.
- , CACHETTL, CACHEFLUSH (Embedded DOS 6-XL)
- Manage cache allocation timing and flushing behavior.
- Loads programs within CONFIG.SYS and pauses further processing until they return control.
- Sets the keyboard's Caps Lock state.
- , CDDBUFFERS (PTS-DOS only)
- Specifies CD-ROM driver name and buffer quantity.
- Continues processing CONFIG.SYS from another file or label.
- , CLS, CODEPAGE (PTS-DOS, OS/2)
- Define clock type, clear screen, and set OEM code pages.
- , COLOR (PTS-DOS only)
- Configure CMOS RAM address and boot menu color settings.
- , COM2, COM3, COM4 (DR-DOS 7.02+)
- Determine count, sequence, I/O addresses, and timeouts for serial ports.
- , COMMENT (various DOS versions)
- Specify DMA buffer size and redefine inline comment indicators.
- (DOS 3.0+, DR DOS 3.31+, OS/2)
- Activates and configures internationalization support.
- , CPSW (DR DOS, MS-DOS)
- Set cursor position on display and enable codepage switching support.
- , CPU88, CPU86, CPU286, CPU386, CPU486 (PTS-DOS, DR-DOS)
- Conditional execution based on CPU model or speed.
DTemplate:NbndF
- Configures relocation of drive descriptor tables in memory.
- Assigns memory segment address for multi-sector disk data deblocking operations.
- Enables support for an internal debugger.
- Controls boot manager settings.
- Loads device drivers into conventional memory.
- Loads device drivers into upper memory blocks (equivalent to in DRDOS 5.0).
- Sets country code and codepage for keyboard, screen, and printer devices.
- Configures sizes of cache memory regions.
- Determines floppy disk compatibility mode settings.
- Specifies font used for display output.
- Manages loading of DOS into high memory and usage of upper memory areas (similar to in DRDOS 5.0).
- Loads DOS internal tables such as BUFFERS, FCBS, FILES, LASTDRIVE, STACKS into upper memory segments.
- Defines an alternate directory path for DOS system files.
- Specifies search paths for data files used by DOS utilities.
- Sets physical parameters for disk drives connected to the system.
- Defines parameters for drives not recognized by the system automatically.
- See .
- Enables error logging to PDUMP.nnn files on a specified drive.
- Outputs a message directly to the screen during startup or processing.
- Displays messages utilizing ANSI escape sequences for color or formatting effects.
- Adds extra validation checks when launching programs from CONFIG.SYS or AUTOEXEC.BAT.
- Defines expected error or return codes from executed programs or drivers.
- Controls A20 gate state when initiating program execution to manage memory addressing beyond 1MB boundary.
- Terminates CONFIG.SYS processing prematurely except for SWITCHES and SHELL commands under certain conditions.
- Sets size of hash tables used to accelerate file opening operations, differing from MS-DOS/PC DOS FASTOPEN driver implementation.
- Specifies number of cached File Control Blocks that can be open simultaneously (shares buffer with FILES under DR-DOS).
- Similar to FCBS but loads these structures into upper memory blocks instead of conventional memory.
- Manages boot manager configuration options related to device drivers and partitions.
- Determines maximum number of files that can be open at once by DOS processes.
- Same as FILES directive but explicitly loads file handles into upper memory areas for improved performance.
- Includes execution of specified CONFIG.SYS subsections or labels (see IGNORE directive).
GTemplate:NbndI
- Waits for a key press or timeout, setting the error level to the ASCII value of the key or 1024 if timed out.
- Resumes processing of CONFIG.SYS at a designated label.
- Continues nested CONFIG.SYS processing at a specified label, then returns to the prior point.
- Refer to , , or for additional details.
- See related commands , , and .
- Consult for further information.
- Refer to or for more context.
- See or for related usage.
- Consult for additional guidance.
- Loads a TSR program into memory following relocation of the DOS data segment. Compare with INSTCDEX.
- See commands , , and for related functions.
- Refer to for further reference.
- See or for comparable features.
- Activates console and command line history buffer with enhanced pattern searching capabilities.
- Defines the segment address for the High Memory Area (HMA).
- Configures energy-saving mode through HLT instruction.
- Sets system checks to detect boot sector viruses.
- Loads installable file system drivers.
- Prevents execution of specific subsections within CONFIG.SYS.
- Grants certain programs permission to operate at ring 2, allowing direct hardware I/O access.
- Includes directives from an alternate menu block, simulated via GOSUB/RETURN in DR-DOS environments.
- Sets the status of keyboard Insert mode.
- Installs a TSR program into memory space.
- Loads a TSR program into upper memory area, equivalent to HIINSTALL in DR DOS 5.0.
- Installs TSR after DOS data segment relocation (also see INSTCDEX).
- Adjusts PIC interrupt priorities, assigning highest priority to a specified IRQ line.
KTemplate:NbndM
- Defines keyboard layout configuration.
- Specifies the relocated address of the keyboard buffer.
- Sets the maximum number of drives accessible by the system.
- Similar to LASTDRIVE but loads Current Directory Structure into upper memory regions.
- Lists directories used in DLL search paths.
- Manages compatibility settings for legacy applications.
- Determines the number of file locks permitted.
- Configures boot logo display when using PTS-DOS boot manager.
- Sets parameters such as count, order, I/O address, and timeout for LPT1 port.
- Applies similar configuration settings to LPT2 port.
- Applies similar configuration settings to LPT3 port.
- Enables and configures LPT4 device settings.
- Defines wait duration before elevating process priority level.
- Configures strategy for memory allocation management.
- Establishes default DOS memory allocation approach.
- Defines available menu options within the system interface.
- Specifies color schemes for menus, emulated via ECHO command in DR-DOS.
- Sets default menu block, emulated through TIMEOUT and SWITCH commands in DR-DOS environment.
- Defines individual menu blocks, emulated using ECHO and SWITCH commands in DR-DOS systems.
- Enables operations on multitrack disk devices.
- Continues processing CONFIG.SYS from another file, optionally loading a device driver and setting %NEWFILE% environment variable.
NTemplate:NbndQ
- Sets default character representing No () in Yes/No/Resume prompts.
- Determines whether keyboard Num Lock status is enabled or disabled at startup.
- Executes commands conditionally based on previous error code, e.g., .
- Displays text and waits for a key press, similar to combined plus commands in DR-DOS systems.
- Requires user confirmation upon encountering errors during CONFIG.SYS processing.
- Configures buffer sizes used by LPT ports.
- Executes commands conditionally on PC-compatible hardware platforms.
- Adjusts scheduler priority settings for processes.
- Assigns priority levels specifically for disk I/O operations programs.
- Changes default printer device driver from LPT1 to LPT3 or LPT4 as specified.
- Specifies whether DOS applications are permitted to execute under current configuration.
- Loads a user interface shell environment upon startup.
- Executes commands conditionally on IBM PS/1-compatible machines only.
- Executes commands conditionally on IBM PS/2-compatible machines only.
- Suppresses output sent to STDOUT display.
RTemplate:NbndT
- Activates automatic system reboot upon encountering errors.
- Permits inclusion of comments within CONFIG.SYS files.
- Allocates drive letters for local block device drivers.
- Sets the default Resume () response character in Yes/No/Resume dialogs.
- Returns control from nested CONFIG.SYS processing to the preceding GOSUB or SWITCH command, optionally passing a return value.
- Defines the size of real mode memory.
- Allows simultaneous loading of programs in CONFIG.SYS, functioning similarly to CALL or INSTALL commands in DOS.
- Determines if the initial character of deleted files is recorded in the FAT reserved area.
- Specifies video modes (FreeDOS) or screen access methods (PTS-DOS).
- Controls the status of the keyboard Scroll Lock key (on/off).
- Establishes environment variables.
- Loads the command interpreter shell.
- Similar to SHELL but supports pre-allocating space for COMMAND.COM within HMA or UMBs to reduce fragmentation with third-party shells.
- Defines keyboard modifier key states such as Shift Lock, Num Lock, Scroll Lock, and Insert mode.
- Determines whether files close upon pressing Ctrl+Alt+Del.
- Skips the Power-On Self Test (POST) during reboot.
- Acts as a compatibility placeholder due to varying stack structures among different versions.
- Specifies the number of stacks allocated for hardware interrupts.
- Sets the default stack size for newly created threads.
- Functions like STACKS but loads buffers into upper memory blocks.
- Configures boot manager settings.
- , reserved for internal use (MS-DOS 3.0 only, ignored by DR-DOS 7.02 and later).
- (PTS-DOS) Manages behavior of the A20 gate for extended memory support.
- (DOS 6.0+, excluding DR DOS and FreeDOS) Defines submenu blocks emulatable under DR-DOS using CLS, ECHO, and SWITCH commands.
- (OS/2 3.0+) Redirects error logging to a drive instead of displaying pop-ups.
- , specifies swap file location (OS/2).
- , enables conditional nested processing within CONFIG.SYS (DR DOS 6.0+), with RETURN returning control to prior execution point.
- , sets default switch character ('/' or '-') across various DOS systems including DR-DOS, PTS-DOS, FreeDOS, and RxDOS.
- , special configuration options available in DOS 4.0 and Novell DOS 7+, not recognized by PTS-DOS.
- , toggles floating-point unit rounding bug fixes (available in OS/2 Warp 4 FixPak 1 and later).
- , alternative filename for DOS operating system (PTS-DOS).
- , configures memory placement of DOS components (PTS-DOS).
- , loads system from an alternate disk sector (PTS-DOS).
- , defines system memory pool size for dynamic allocation (Embedded DOS 6-XL).
- , loads DOS code and data into upper memory blocks (PTS-DOS).
- , sets number of concurrent threads supported (OS/2).
- , timeout parameters for CONFIG.SYS single-step execution and Yes/No prompts (DR DOS 6.0+, PTS-DOS).
- , configures scheduler time slice duration (OS/2).
- , specifies temporary file extensions (PTS-DOS).
- , globally or locally enables/disables single-step processing of CONFIG.SYS and AUTOEXEC.BAT scripts (DR-DOS 7.02+, PTS-DOS, OS/2), with distinct OS/2 behavior.
- , sets TRACE log buffer size (OS/2).
- , enables comprehensive error logging functionality (OS/2 3.0+).
UTemplate:NbndZ
- Directs DOS to allocate a specified segment as upper memory block space.
- Selects the UMB server utilized by DOS.
- Defines address ranges designated as UMB RAM areas.
- Enables or disables verification of disk write operations.
- Specifies the DOS version number reported to applications.
- Configures VGA display status settings.
- Sets current video mode analogous to FreeDOS’s SCREEN command.
- Determines whether virtual DMA usage is permitted.
- Controls deactivation of processor Virtual Mode Extensions (VME).
- Configures Windows VxD driver settings.
- Sets up system support parameters for Windows environments.
- Manages relocation of the Extended BIOS Data Area (XBDA).
- Enables conditional execution on XT-compatible hardware platforms.
- Configures built-in support for Year 2000 compliance.
- Sets default affirmative response character in prompt dialogs.
- Manages tracking of file deletions.
Issues
Although the system can start without CONFIG.SYS or AUTOEXEC.BAT, these files are crucial for complete operating system customization and meeting software demands. If either file becomes corrupted, troubleshooting is required.
In cases where CONFIG.SYS does not include a SHELL directive or if the file is absent or damaged, DOS attempts to locate COMMAND.COM in the root directory of the boot drive. Versions prior to 6.0 will fail to boot without this file, whereas MS-DOS 6.0, PC DOS 6.1, and Novell DOS 7 and later will prompt the user to specify a command processor path. This prompt also appears if the main shell terminates unexpectedly or exits intentionally, allowing a limited replacement of the runtime shell without rebooting.
COMMAND.COM from MS-DOS 7.0 and later is incompatible with DR-DOS, which is generally installed in the root of drive C: in dual-boot environments. Starting with DR-DOS 7.02, it is no longer possible to bypass SHELL directives when using skip, trace, or step modes, improving boot-time stability. Specific key commands restore previous skipping behaviors to assist recovery from incorrect SHELL parameters. When no SHELL directive is found during skip mode, users are prompted to enter a valid shell filename before COMMAND.COM is loaded.
The maximum size of CONFIG.SYS differs across systems: MS-DOS and PC DOS limit it to several kilobytes (up to 64 KB), while DR-DOS imposes no explicit restriction other than those dictated by the file system. MS-DOS processes CONFIG.SYS by compiling it into a tokenized format that enforces a fixed loading order—device drivers precede TSRs. Conversely, DR-DOS parses directives sequentially, enabling exact control over loading sequences through DEVICE and INSTALL commands. This approach aids in resolving driver conflicts and supports conditional logic based on hardware detection, user input, or errors—facilitating integration of temporary software during startup.
Earlier MS-DOS editions restricted the SHELL command line length to 31 characters; later versions increased this limit to 128 characters, while DR-DOS allows up to 255 characters. CONFIG.SYS directives do not support long filenames.
Dual booting DOS and Windows 9x
When Windows 95 is installed over an existing DOS/Windows configuration, the original CONFIG.SYS and AUTOEXEC.BAT files are renamed CONFIG.DOS and AUTOEXEC.DOS respectively to enable dual booting between Windows 9x and DOS environments. During a DOS boot session, these files are temporarily restored to their standard names. Windows 95’s versions are backed up as CONFIG.W40 and AUTOEXEC.W40.
In setups where Caldera DR-DOS 7.02 or 7.03 coexists with Windows 95, the Windows CONFIG.SYS and AUTOEXEC.BAT remain unaltered. Instead, DR-DOS employs DCONFIG.SYS and AUTODOS7.BAT as its configuration files at startup.
OS/2 / Windows NT
OS/2 relies extensively on CONFIG.SYS for configuring system parameters, loading device drivers, and setting environment variables prior to launching its graphical interface.
Within the OS/2 subsystem of Windows NT, what OS/2 applications recognize as CONFIG.SYS is actually maintained within the Windows registry.
A substantial number of undocumented CONFIG.SYS directives exist in OS/2, reflecting its intricate configuration requirements.
CONFIG.SYS continues to be a fundamental component in 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 available at Computer Hope
- Overview of Windows 98 / MS-DOS 7.10 CONFIG.SYS instructions (archived)
- Caldera's CONFIG.SYS Command Reference (archived; directives for DR-DOS 7)
- Details on FreeDOS CONFIG.SYS commands
- User Manual for PTS-DOS 2000 Pro including CONFIG.SYS directives (archived)
- German-language unofficial PTS-DOS FAQ (archived; contains CONFIG.SYS directives)