! (CONFIG.SYS directive)
| Company type | Configuration file |
|---|---|
| Industry | Computer software |
| Founded | 1983 |
| Headquarters | N/A |
| Products | Operating system configuration |
CONFIG.SYS serves as the chief configuration file for DOS and OS/2 operating systems. This plain text file, written in ASCII, holds configuration commands that the operating system's DOS BIOS—usually found in IBMBIO.COM or IO.SYS—interprets during the system startup process. CONFIG.SYS was first introduced with DOS version 2.0.
Usage
The directives within CONFIG.SYS are used to configure DOS for hardware devices and software applications, including memory management utilities. Once CONFIG.SYS has been processed, DOS launches the command interpreter specified by the SHELL directive; if none is specified, it defaults to COMMAND.COM, which then executes AUTOEXEC.BAT.
Typically, the file contains name=value instructions that either adjust system parameters or load device drivers and terminate-and-stay-resident programs (TSRs). In DOS environments, CONFIG.SYS is located in the root directory of the bootable drive.
The same filename convention is also utilized by (DCP), a variant of MS-DOS developed by the former East-German company VEB Robotron.
Certain DOS versions recognize alternative configuration filenames that take precedence over CONFIG.SYS:
- Advanced editions such as Concurrent DOS 386, Concurrent DOS XM, Multiuser DOS, System Manager, and REAL/32 prefer CCONFIG.SYS or CCONFIG.INI (the latter in Multiuser DOS), with supplementary settings maintained in a binary file named CCONFIG.BIN, which can be edited using CONFIG.EXE.
- Versions like DR DOS 3.31, PalmDOS 1.0, Novell DOS 7, OpenDOS 7.01, and DR-DOS 7.02+ prioritize DCONFIG.SYS over CONFIG.SYS to facilitate disk compression and multi-boot arrangements.
- OpenDOS 7.01 and DR-OpenDOS 7.02 also check for the presence of ODCONFIG.SYS, while some builds of DR-DOS 7.02+ look for DRCONFIG.SYS.
- Starting with DR DOS 6.0, the SYS /DR:ext command enables renaming of system and configuration files, allowing multiple independent sets to coexist within a single root directory and be selected through boot loaders such as LOADER.
- The SHELL command supports specifying alternate AUTOEXEC.BAT files by appending /P[:filename.ext], a feature supported by COMMAND.COM and compatible shells like 4DOS.
- From DR-DOS version 6.0 onward, the CHAIN=filespec directive enables chaining to another configuration file during processing; versions 7.02+ allow optional label references within this feature.
- DR-DOS 7.03 and later adds a SYS /A option to duplicate CONFIG.SYS and AUTOEXEC.BAT alongside system files during installation.
Other operating systems utilize similarly purposed files: FreeDOS uses FDCONFIG.SYS, RxDOS from version 7.24 onward employs RXCONFIG.SYS, while PTS-DOS relies on CONFIG.PTS.
In Windows 95 and Windows 98, both CONFIG.SYS and AUTOEXEC.BAT are present in the root directory of the boot drive but typically contain no active commands. Conversely, Windows Me does not process CONFIG.SYS during startup; instead, it uses environment variables stored within the Windows Registry at:
- HKLM\System\CurrentControlSet\Control\SessionManager\Environment
Within the FlexOS operating system, CONFIG.SYS is formatted as a binary file that specifies resource managers and device drivers loaded at boot time.
Example
Below is a sample CONFIG.SYS file for MS-DOS version 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>
:;*?!
- Establishes labels within CONFIG.SYS to serve as jump destinations for commands like , , , , and .
- Functions similarly to , allowing inline commentary. (Note: MS-DOS/PC DOS does not disregard comments enclosed in double quotes.)
- Introduces inline comments adjacent to the ; directive.
- Prompts the user with a Yes/No query to confirm the execution of subsequent CONFIG.SYS instructions.[1] (While FreeDOS lacks customizable messages, it supports conditional execution via boot menus.) DOS versions 6.0 and later provide a comparable feature by appending after directives.
- Forces unconditional execution of the following command.
ATemplate:NbndC
- Determines whether programs can be interrupted upon encountering errors.
- Configures drives to record file access timestamps within FAT directory entries.
- Executes conditionally on AT-compatible hardware.
- Acts as a boot manager.
- Adjusts the verbosity level of error messages.
- Alters the default serial device driver assignment (COM1: through COM4:) for the AUX device.
- Disables character devices that reside outside the virtual \DEV directory.
- Loads fundamental device drivers into memory.
- Emits an audible beep regardless of notification settings.
- Specifies which operating system to boot next.
- Enables or disables extended Ctrl+C detection.
- Allocates a specified number of disk buffers.
- Similar to BUFFERS but loads buffers into High Memory Area (HMA) or Upper Memory Blocks (UMB).
- , ,
- Manage cache block allocation and flushing intervals.
- Loads executable programs during CONFIG.SYS processing, pausing further processing until completion.
- Sets the Caps Lock key state on the keyboard.
- ,
- Defines CD-ROM driver parameters including name and buffer quantity.
- Continues processing CONFIG.SYS from another file or label.
- , , and other directives control system functionality and presentation across DOS variants, focusing on device drivers, buffer management, CPU-specific conditions, and internationalization support.
These directives highlight configuration capabilities that influence system efficiency, device control, and boot sequence management—critical for enterprises operating legacy DOS systems or embedded platforms requiring exact resource allocation and conditional logic tailored to hardware specifications.
DTemplate:NbndF
- Adjusts relocation settings for drive descriptor tables.
- Specifies memory segment address used for multi-sector disk data deblocking operations.
- Activates built-in debugger functionality.
- Functions as a boot manager.
- Loads device drivers into conventional memory areas.
- Loads device drivers into upper memory segments (equivalent to in DRDOS 5.0).
- Sets country and codepage configurations for keyboard, screen, and printer devices.
- Determines sizes for cache memory allocations.
- Defines floppy disk compatibility mode settings.
- Selects display font type.
- Controls loading of DOS into high memory and utilization of upper memory blocks.
- Loads DOS internal tables (such as BUFFERS, FCBS, FILES, LASTDRIVE, STACKS) into upper memory areas.
- Specifies an alternative directory path for DOS system files.
- Defines search paths for data files.
- Sets parameters for physical disk drives.
- Establishes configuration for unrecognized or unknown drives.
- See .
- Enables specification of error log drives for PDUMP.nnn files.
- Outputs a message on the display screen.
- Displays messages incorporating ANSI escape codes.
- Applies additional validation checks when launching programs.
- Assigns an error or return code to be assumed thereafter.
- ; Sets the A20 gate state upon program startup.
- ; Terminates CONFIG.SYS processing prematurely except for SWITCHES and SHELL directives under certain conditions.
- ; Defines hash table size to accelerate file opening operations, differing from MS-DOS/PC DOS FASTOPEN driver behavior.
- ; Configures number of cached File Control Blocks that can be open simultaneously (shares buffer space with FILES in DR-DOS).
- ; Similar to FCBS but explicitly loads these into upper memory areas.
- ; Acts as a boot manager component.
- ; Specifies maximum number of files that can be opened at once.
- ; Equivalent to FILES but explicitly loads file handles into upper memory blocks.
- ; Includes execution of specific CONFIG.SYS subsections (refer to IGNORE).
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 CONFIG.SYS processing at the specified label.
- Continues nested CONFIG.SYS processing at a given label and returns to the previous point afterward.
- Refer to , , or for additional information.
- Consult for further details.
- See for more context.
- Refer to or as applicable.
- Consult or for related commands.
- See for further reference.
- Loads a TSR program after relocating the DOS data segment. Compare with INSTCDEX.
- Refer to , , or for related functions.
- See for additional information.
- Refer to or as needed.
- Activates console and command line history buffers along with enhanced pattern searching capabilities.
- Defines the address of the High Memory Area (HMA) segment.
- Configures power-saving behavior for the HLT instruction.
- Specifies whether to perform a virus check on the system boot sector.
- Loads installable file system drivers.
- Prevents execution of particular CONFIG.SYS subsections.
- Permits designated programs to operate at ring 2, allowing direct hardware I/O access.
- Incorporates directives from another menu block, emulated via GOSUB/RETURN in DR-DOS environments.
- Sets the status of the keyboard Insert mode.
- Loads a TSR program into memory.
- Installs TSRs into upper memory, equivalent to HIINSTALL in DR DOS version 5.0.
- Loads TSR after relocating the DOS data segment. Compare with INSTCDEX.
- Adjusts PIC interrupt priorities, assigning highest priority to a specified IRQ number.
KTemplate:NbndM
- Defines the keyboard layout configuration.
- Specifies the location of the relocated keyboard buffer in memory.
- Sets the maximum number of accessible drive letters.
- Similar to LASTDRIVE but also loads the Current Directory Structure (CDS) into upper memory areas.
- Specifies paths where DLLs are searched for loading.
- Controls compatibility handling for legacy software applications.
- Sets the number of permissible file locks.
- Manages display of boot logos, useful when used with PTS-DOS boot manager utilities.
- Configures count, order, I/O port address, and timeout settings for LPT1 devices.
- Provides similar configuration options for LPT2 devices.
- Likewise configures LPT3 devices with count, order, I/O address, and timeout parameters.
- Enables and sets up LPT4 devices accordingly.
- Defines wait duration before elevating process priority levels.
- Determines memory allocation strategies employed by DOS.
- Sets default strategy for DOS memory allocation management.
- Defines options available within menu structures.
- Specifies menu color schemes, which can be emulated under DR-DOS systems.
- Selects default menu blocks, emulatable within DR-DOS environments.
- Establishes menu blocks themselves, compatible with DR-DOS emulation methods.
- Enables operations involving multitrack disk access techniques.
- Continues processing CONFIG.SYS directives from a new file after loading a device driver and defining the %NEWFILE% environment variable.
NTemplate:NbndQ
- Sets the default No () character used in Yes/No/Resume prompt dialogs.
- Controls keyboard [[Num Lock|Template:Keypress]] state, turning it on or off at startup.
- Enables conditional execution based on the last error code encountered, such as .
- Displays messages and waits for key input, similar to DR-DOS commands and .
- Requires user confirmation when errors occur during CONFIG.SYS processing.
- Configures buffer sizes allocated for LPT ports to optimize performance.
- Executes commands conditionally on PC-compatible hardware platforms only.
- Assigns scheduler priority levels to processes or tasks within DOS environment.
- Specifies priority settings specifically for disk I/O related programs.
- Changes default printer device driver assignment (for example, switching from LPT1 to LPT4).
- Manages execution control over DOS programs loaded during startup or runtime.
- Loads a user interface shell environment as part of system initialization.
- Enables conditional execution exclusively on IBM PS/1-compatible systems.
- Enables conditional execution exclusively on IBM PS/2-compatible systems.
- Suppresses output directed to standard output (STDOUT) streams.
RTemplate:NbndT
- Activates automatic system reboot upon encountering errors.
- Permits inclusion of comments within CONFIG.SYS (not recognized by PTS-DOS).
- Allocates a drive letter for local block device drivers.
- Sets the default character used to resume operations in prompts.
- Returns control from nested CONFIG.SYS processing to the preceding GOSUB or SWITCH command, optionally providing a return code.
- Defines the amount of real mode memory available.
- Allows concurrent loading of programs within CONFIG.SYS, functioning similarly to CALL or INSTALL commands in DOS.
- Stores the initial character of deleted files in the reserved area of the FAT.
- Specifies video mode settings in FreeDOS or screen access methods in PTS-DOS.
- Controls the status of the keyboard’s Scroll Lock key.
- Establishes environment variables for the system.
- Loads the command interpreter shell.
- Functions like SHELL but includes a size parameter to pre-allocate COMMAND.COM into HMA or UMBs, minimizing fragmentation.
- Defines keyboard modifier key states such as Shift Lock and Num Lock.
- Determines whether files close automatically when Ctrl+Alt+Del is pressed.
- Skips Power-On Self-Test (POST) during system reboot.
- , STACKSIZE, STACKSHIGH
- Configure sizes and stacks for hardware interrupts across different DOS versions, with some parameters disregarded in later releases.
- , SYSBOOT, SYSGEN, SYSLOAD
- PTS-DOS commands that manage boot options, system memory allocation, and alternative operating system loading procedures.
- Defines submenu blocks available from DOS 6 onward, unsupported by DR-DOS or FreeDOS but can be simulated.
- , SWAPPATH, THREADS, TIMESLICE
- OS/2-exclusive parameters controlling error logging paths, swap file locations, multitasking threads, and CPU time slices for scheduling.
- , SWITCHES
- Conditional directives for CONFIG.SYS processing predominantly found in DR DOS and Novell DOS variants.
- , TMPEXT
- Sets default switch characters ('/' or '-') and temporary file extensions across multiple DOS platforms.
- , TRACEBUF
- Enables or configures single-step execution tracing within CONFIG.SYS or AUTOEXEC.BAT under DR-DOS, PTS-DOS, and OS/2 with varying capabilities.
- , SXFAKEHWFPU
- OS/2-specific settings addressing error logging and fixes for FPU-related bugs.
This segment details essential CONFIG.SYS commands applicable to system setup across diverse DOS distributions such as DR-DOS, PTS-DOS, FreeDOS, Novell DOS, and OS/2. These options allow organizations to tailor boot sequences, error management, memory allocation, device prioritization, and shell loading—vital for enhancing legacy system efficiency and ensuring compatibility within professional IT infrastructures.
UTemplate:NbndZ
- Configures DOS to designate a particular segment as Upper Memory Block (UMB) space.
- Sets which UMB server is utilized by the system.
- Defines address ranges allocated for UMB RAM usage.
- Enables or disables verification of disk writes.
- Specifies the DOS version reported to software applications.
- Manages VGA display status settings.
- Indicates the currently active video mode.
- Determines whether virtual DMA support is enabled.
- Disables the processor’s Virtual Mode Extensions (VME).
- Sets up VxD drivers for Windows environments.
- Configures Windows system support parameters.
- Manages relocation settings for the Extended BIOS Data Area (XBDA).
- Executes conditionally on XT-compatible hardware platforms.
- Enables built-in Year 2000 compliance features.
- Sets the default character used for affirmative responses in prompts.
- Controls tracking of file deletions.
Issues
While the system is capable of booting without CONFIG.SYS or AUTOEXEC.BAT, these files are crucial for comprehensive DOS customization and to meet specific software requirements. Any damage or corruption in these files necessitates troubleshooting efforts.
In the absence of a SHELL directive in CONFIG.SYS, or if the file is missing or corrupted, DOS attempts to locate COMMAND.COM in the root directory. Older DOS versions cannot boot without this file, whereas MS-DOS 6.0, PC DOS 6.1, and Novell DOS 7 and later versions will prompt users to provide the path to a command processor. This recovery prompt also appears if the primary shell is intentionally exited or aborted, allowing a limited runtime shell replacement without needing a reboot.
COMMAND.COM from MS-DOS 7.0 and later is not compatible with DR-DOS; however, it is often found on the C: drive 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, which improves system stability during boot configuration problems. If no valid SHELL directive exists when skipping CONFIG.SYS processing, users are prompted to specify a shell before COMMAND.COM loads.
Under MS-DOS and PC DOS, CONFIG.SYS size is restricted to a few kilobytes (up to 64 KB in later releases), whereas DR-DOS imposes no such limit aside from file system constraints. MS-DOS compiles CONFIG.SYS into a tokenized form in memory before executing directives in a strict sequence—loading drivers prior to TSRs—while DR-DOS processes directives line-by-line. This approach allows detailed control over the order of driver and TSR loading using DEVICE and INSTALL commands. Such flexibility helps resolve conflicts during loading and supports conditional execution based on hardware presence, key presses, load failures, or software return codes.
The INSTALL command in DR-DOS can also launch non-resident programs that integrate seamlessly within the CONFIG.SYS processing flow, thereby enhancing system configurability and debugging options.
In MS-DOS/PC DOS versions 2.0 through 4.01, the SHELL line was restricted to 31 characters; subsequent versions expanded this limit to 128 characters, while DR-DOS permits up to 255 characters. It should be noted that CONFIG.SYS directives do not support long file names.
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 as CONFIG.DOS and AUTOEXEC.DOS to enable dual-boot functionality. Booting into DOS temporarily restores these original filenames, whereas Windows 95 versions of these files are saved as CONFIG.W40 and AUTOEXEC.W40.
In contrast, installing Caldera DR-DOS 7.02 or 7.03 alongside Windows 95 keeps the Windows CONFIG.SYS and AUTOEXEC.BAT filenames unchanged. Instead, DR-DOS employs DCONFIG.SYS and AUTODOS7.BAT as its startup configuration files.
OS/2 / Windows NT
OS/2 depends extensively on CONFIG.SYS for setting up device drivers and environment variables prior to launching its graphical user interface.
Within the OS/2 subsystem on Windows NT, CONFIG.SYS configurations are maintained within the system registry rather than stored as separate files.
Numerous CONFIG.SYS directives under OS/2 remain undocumented.
CONFIG.SYS continues to be utilized 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 commands (archived)
- Caldera's CONFIG.SYS Command Reference (archived) – Summary of DR-DOS 7 CONFIG.SYS commands
- Guide to FreeDOS CONFIG.SYS commands
- PTS-DOS 2000 Pro User Guide including summary of CONFIG.SYS commands
- Unofficial German PTS-DOS FAQ (2004) featuring additional CONFIG.SYS commands
- ↑ Cite error: Invalid
<ref>tag; no text was provided for refs namedPaul_2000_CONFIG