MENUCOLOR (CONFIG.SYS directive)
| Company type | Configuration file |
|---|---|
| Industry | Operating systems |
| Founded | DOS version 2.0 |
| Products | System configuration for DOS and OS/2 |
CONFIG.SYS serves as the main configuration file utilized by DOS and OS/2 operating systems. This plain text file, written in ASCII, holds configuration instructions that the operating system's DOS BIOS—typically located in IBMBIO.COM or IO.SYS—interprets during system startup. The introduction of CONFIG.SYS dates back to DOS version 2.0.
Usage
The directives within CONFIG.SYS are responsible for setting up DOS to manage devices, applications, and memory allocation effectively. Once CONFIG.SYS has been processed, DOS launches the command interpreter specified by the SHELL command; if none is defined, it defaults to COMMAND.COM, which then executes the AUTOEXEC.BAT script.
This file mainly consists of name=value pairs that adjust configurable parameters or load device drivers and terminate-and-stay-resident (TSR) utilities into memory.
In DOS environments, CONFIG.SYS is located in the root directory of the bootable drive.
Certain DOS variants recognize alternative configuration filenames that override CONFIG.SYS priority:
- Versions such as Concurrent DOS 386, Concurrent DOS XM, Multiuser DOS, and REAL/32 seek CCONFIG.SYS or CCONFIG.INI (the latter specific to Multiuser DOS) instead of CONFIG.SYS. These systems also support supplementary settings stored in binary files like CCONFIG.BIN, which are managed through CONFIG.EXE.
- In DR DOS from version 3.31 onward—including PalmDOS 1.0, Novell DOS 7, OpenDOS 7.01, and DR-DOS 7.02+—the filename DCONFIG.SYS takes precedence to facilitate multi-boot configurations and disk compression features. Additionally, OpenDOS 7.01 and DR-OpenDOS 7.02 look for ODCONFIG.SYS, while DR-DOS 7.02+ may utilize DRCONFIG.SYS.
- Starting with DR DOS 6.0, users can modify default system file extensions using SYS /DR:ext, allowing several sets of system files to coexist and be selected by boot loaders such as LOADER.
- The SHELL directive in DR-DOS supports specifying alternative AUTOEXEC batch files through the /P[:filename.ext] option, which permits extensions other than .BAT (a feature also supported by 4DOS).
- The CHAIN=filespec command in DR-DOS enables continuation of configuration processing from another file that may reside outside the root directory; versions 7.02 and later allow targeting specific labels within these chained files.
- From DR-DOS 7.03 onward, the SYS /A command can copy CONFIG.SYS and AUTOEXEC.BAT alongside other system files during setup.
Comparable functions exist in other DOS-compatible operating systems:
- FDCONFIG.SYS is used by FreeDOS, - RXCONFIG.SYS is implemented in RxDOS version 7.24 and above, - CONFIG.PTS is employed by PTS-DOS.
Windows 95 and Windows 98, which are built on a DOS foundation, include CONFIG.SYS and AUTOEXEC.BAT files in their root directories but typically leave them vacant. In contrast, Windows Me does not process CONFIG.SYS during startup; instead, it relies on environment variables stored within the Windows Registry at:
- HKLM\System\CurrentControlSet\Control\SessionManager\Environment
For FlexOS systems such as FlexOS 286 version 1.13, CONFIG.SYS is a binary file that specifies resource managers and device drivers loaded during 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>
:;*?!
- Establishes labels within CONFIG.SYS to act as jump points for , , , , and commands.
- Functions like , but allows for in-line remarks following other CONFIG.SYS instructions. (In MS-DOS/PC DOS, inline comments enclosed in double quotes are not disregarded.)
- Used to initiate in-line commentary alongside the ; directive.
- Presents a Yes/No prompt to confirm whether subsequent CONFIG.SYS commands should execute. (FreeDOS supports optional conditions via boot menus but lacks optional message prompts.) DOS version 6.0 and later provide a comparable feature by appending after commands (e.g., ).
- Forces execution of the next CONFIG.SYS command without condition.
ATemplate:NbndC
- Determines whether applications can be terminated upon encountering errors.
- Sets which drives record file access timestamps within FAT file systems.
- Enables conditional execution on AT-compatible hardware.
- Acts as a boot manager.
- Adjusts the verbosity level of error messages.
- Alters the default serial device driver assigned to the AUX device.
- Disables character devices located outside the phantom \DEV directory.
- Loads a fundamental device driver into memory.
- Produces a beep sound even when notification sounds are turned off.
- Defines the subsequent operating system to boot.
- Enables or disables extended Ctrl+C interrupt checking.
- Specifies the number of disk buffers allocated.
- Similar to BUFFERS but loads buffers into High Memory Area (HMA) or Upper Memory Blocks (UMB).
- , CACHETTL, CACHEFLUSH (Embedded DOS 6-XL only)
- Manage cache block allocation timing and flushing intervals.
- Executes programs within CONFIG.SYS, pausing processing until they return control.
- Sets the Caps Lock state on the keyboard.
- , CDDBUFFERS (PTS-DOS only)
- Configures CD-ROM driver identification and buffer quantity.
- Continues processing CONFIG.SYS from a different file or label.
- , CLS, CODEPAGE (PTS-DOS or OS/2 only)
- Configure screen clearing, system clock type, and OEM codepages respectively.
- , COM2, COM3, COM4 (DR-DOS 7.02+)
- Define count, logical sequence, I/O ports, and timeout values for COM ports.
- , COMMENT(S), COUNTRY
- Set DMA buffer size, redefine inline comment characters, and enable internationalization support respectively.
- , CPSW (DR-DOS or MS-DOS specific)
- Control cursor positioning on display and enable codepage switching features.
- , CPU88, CPU86, CPU286, CPU386, CPU486 variants (PTS-DOS or DR-DOS)
- Conditional execution based on specific CPU models or clock speeds.
DTemplate:NbndF
- Configures relocation of drive descriptor tables in memory.
- Specifies the memory segment address used for multi-sector disk data deblocking.
- Activates internal debugger capabilities.
- Functions as a boot manager utility.
- Loads device drivers into conventional memory space.
- Loads device drivers into upper memory area (equivalent to in DRDOS 5.0).
- Sets country and codepage parameters for keyboard, screen, and printer devices.
- Defines cache memory size settings.
- Determines floppy disk compatibility mode settings.
- Selects display font parameters.
- Controls loading DOS into high or upper memory areas (similar to in DRDOS 5.0).
- Loads DOS system tables such as BUFFERS, FCBS, FILES, LASTDRIVE, STACKS into upper memory blocks.
- Specifies an alternate path location for DOS system files.
- Defines search paths for data files.
- Sets physical disk drive parameters explicitly.
- Defines parameters for drives that are not recognized automatically.
- See .
- Enables error logging with
PDUMP.nnnfiles on specified drives. - Displays standard messages on screen during processing.
- Shows messages including ANSI escape sequences for enhanced formatting.
- Activates additional validation checks when launching programs.
- Specifies an assumed error or return code for subsequent operations.
- Controls A20 gate state upon program startup.
- Terminates CONFIG.SYS processing prematurely except for certain SWITCHES and SHELL commands.
- Sets hash table size to accelerate file open operations, differing from MS-DOS/PC DOS FASTOPEN drivers.
- Defines how many File Control Blocks can be cached simultaneously (shares buffer space with FILES under DR-DOS).
- Similar to FCBS but loads these blocks into upper memory area.
- Boot manager configuration option.
- Specifies maximum number of files that can be open concurrently.
- Like FILES but loads file handles into upper memory blocks.
- Includes execution of specified subsections within CONFIG.SYS (refer to IGNORE).
GTemplate:NbndI
- Waits for a key press or timeout, setting the error level to the ASCII value of the key pressed or to 1024 if timed out.
- Resumes CONFIG.SYS execution at a designated label.
- Continues nested CONFIG.SYS processing at a specified label and then returns to the previous point.
- Refer to , , or for additional information.
- See also .
- Consult .
- Refer to or for further details.
- See or for related commands.
- Consult .
- Loads a TSR program into memory similarly to , but after relocating the DOS data segment.
- See , , or for more information.
- Refer to .
- See or for additional context.
- Activates console and command line history buffering along with enhanced pattern searching capabilities.
- Defines the address of the High Memory Area (HMA) segment.
- Configures energy-saving mode using the HLT instruction.
- Determines whether a system boot sector virus check is performed.
- Loads device drivers for installable file systems.
- Prevents execution of specified CONFIG.SYS subsections.
- Permits certain programs to operate at ring 2, allowing direct hardware input/output access.
- Includes directives from another menu block, emulated by GOSUB/RETURN in DR-DOS environments.
- Sets the status of the keyboard Insert mode.
- Installs a TSR program into memory.
- Loads a TSR program into upper memory, equivalent to HIINSTALL in DR DOS 5.0.
- Installs a TSR program after relocation of the DOS data segment.
- Adjusts PIC interrupt priorities to favor a specified IRQ number.
KTemplate:NbndM
- Defines the keyboard layout configuration.
- Specifies the relocated address of the keyboard buffer.
- Sets the maximum number of accessible drive letters.
- Similar to LASTDRIVE but additionally loads Current Directory Structure into upper memory.
- Establishes search paths for DLL files.
- Manages compatibility settings for legacy software.
- Determines the number of allowable file locks.
- Configures boot logo display when using PTS-DOS boot manager.
- Defines parameters such as count, order, I/O address, and timeout for the LPT1 device.
- Provides similar configuration options for LPT2 device.
- Configures LPT3 device with comparable parameters.
- Enables and sets up LPT4 device functionality.
- Specifies delay before elevating priority of waiting processes.
- Controls memory allocation policies and strategies.
- Sets default memory allocation strategy used by DOS.
- Defines available menu options within CONFIG.SYS.
- Specifies menu color schemes, emulated through ECHO in DR-DOS systems.
- Sets a default menu block, emulated via TIMEOUT and SWITCH commands in DR-DOS.
- Defines individual menu blocks, emulated using ECHO and SWITCH within DR-DOS environments.
- Enables multitrack disk operations support.
- Continues processing CONFIG.SYS from an external file, optionally loading device drivers and setting %NEWFILE% environment variable.
NTemplate:NbndQ
- Sets the default character representing No () in Yes/No/Resume prompts.
- Specifies whether the keyboard's [[Num Lock|Template:Keypress]] is enabled or disabled at startup.
- Enables conditional execution based on the last error code returned, such as .
- Displays text and waits for a keypress, functioning similarly to and commands in DR-DOS.
- Requires user confirmation when errors occur during CONFIG.SYS processing.
- Configures buffer sizes for printers connected via LPT1 through LPT3 ports.
- Allows conditional execution based on PC-compatible hardware detection.
- Sets process scheduling priority levels.
- Adjusts priority settings specifically for disk I/O operations programs.
- ; Changes default printer device driver assignment among LPT1 to LPT4 ports.
- Determines whether DOS applications are permitted to run under current settings.
- Loads a user interface shell environment during startup.
- ; Enables conditional execution on IBM PS/1-compatible machines only.
- ; Enables conditional execution on IBM PS/2-compatible machines only.
- ; Suppresses output sent to STDOUT.
RTemplate:NbndT
- Activates automatic system reboot upon encountering errors.
- Permits inclusion of comments within CONFIG.SYS.
- Allocates a drive letter for local block device drivers.
- Defines the default Resume () character used in Yes/No/Resume prompts.
- Facilitates returning from nested CONFIG.SYS processing to the previous GOSUB or SWITCH point, optionally with a return code.
- Specifies the size of real mode memory.
- Enables simultaneous loading of programs in CONFIG.SYS, functioning similarly to CALL or INSTALL commands in DOS.
- Saves the initial character of deleted files within the FAT reserved space.
- Determines video mode settings under FreeDOS or screen access methods under PTS-DOS.
- Controls the on/off status of the keyboard Scroll Lock key.
- Defines environment variables.
- Loads the command interpreter shell.
- Functions like SHELL but includes a size parameter to load COMMAND.COM into HMA or UMBs, optimizing memory usage with third-party shells.
- Sets keyboard modifier states such as Shift Lock, Num Lock, Scroll Lock, and Insert mode.
- Specifies behavior for file closure when Ctrl+Alt+Del is pressed.
- Controls whether POST is bypassed during reboot.
- , STACKSIZE, STACKSHIGH
- Configure stack parameters across various DOS variants to manage hardware interrupts and buffer placement in upper memory areas (specific to MS-DOS, DR-DOS, FreeDOS).
- , SYSBOOT, SYSGEN, SYSLOAD, SYSTOUMB
- PTS-DOS options for boot sequence management, system loading addresses, and memory optimization via UMB usage.
- , STUBA20
- Internal or hardware-dependent controls applicable in MS-DOS or PTS-DOS environments.
- , SUPPRESSPOPUPS, SWAPPATH
- OS/2 features that manage submenu blocking, specify error logging drives, and configure swap file locations.
- , SWITCHAR, SWITCHES
- Enable conditional CONFIG.SYS processing with customizable switch characters and special options across different DOS systems.
- , THREADS, TIMESLICE
- OS/2-specific parameters for hardware fixes, controlling concurrent thread counts and scheduler time slices.
- , TRACE, TRACEBUF
- Manage timeouts for CONFIG.SYS commands and enable stepwise execution with adjustable log buffer sizes across DOS variants including DR-DOS, PTS-DOS, and OS/2.
- , TRAPDUMP
- Handles temporary file extension settings (PTS-DOS) and detailed error logging (OS/2).
UTemplate:NbndZ
- Assigns a particular segment for use as UMB memory by DOS.
- Configures the UMB server parameters.
- Defines address ranges designated as UMB RAM.
- Toggles disk write verification on or off.
- Sets the DOS version reported to applications.
- Configures VGA display status indicators.
- Specifies the active video mode, similar to FreeDOS's SCREEN setting.
- Determines whether virtual DMA is enabled or disabled.
- Controls deactivation of processor Virtual Mode Extensions (VME).
- Configures VxD drivers for Windows environments.
- Sets system support parameters for Windows operation.
- Manages relocation of the Extended BIOS Data Area (XBDA).
- Enables conditional execution on XT-compatible hardware.
- Configures built-in Year 2000 compatibility support.
- Defines default Yes character used in user queries.
- Manages deletion tracking functionality.
Issues
Although a system can start without CONFIG.SYS present, both this file and AUTOEXEC.BAT are critical for a complete DOS boot process. They tailor the operating system environment and define necessary software components. If either file becomes damaged or corrupted, troubleshooting becomes essential.
When CONFIG.SYS does not include a SHELL directive or if it is missing or corrupted, DOS attempts to locate COMMAND.COM in the root directory of the boot drive. Versions prior to 6.0 will fail to boot if COMMAND.COM is not found. Starting with MS-DOS 6.0/PC DOS 6.1 and Novell DOS 7 and later versions, users are prompted to specify a command interpreter path if COMMAND.COM is absent or if the primary shell terminates unexpectedly. This prompt allows users to replace the shell at runtime without needing to reboot.
Since MS-DOS version 7.0 and newer COMMAND.COM versions are incompatible with DR-DOS but often reside in C:\ in dual-boot configurations, DR-DOS versions 7.02 and above prevent bypassing SHELL directives during skip/trace/step modes (triggered by Ctrl+F5/F7/F8). Some later releases introduced Ctrl+F6 to restore skip functionality for recovery from invalid SHELL arguments. If no SHELL directive is detected while skipping CONFIG.SYS processing, users receive a prompt requesting a valid shell filename before an attempt is made to load COMMAND.COM. Pressing Enter defaults to the previously used standard shell.
The size of CONFIG.SYS is restricted to a few kilobytes (up to 64 KB) in MS-DOS/PC DOS environments but remains unlimited under DR-DOS except for file system constraints. MS-DOS compiles CONFIG.SYS into a tokenized structure loaded into memory before sorting directives by type—device drivers precede TSRs. Conversely, DR-DOS processes directives sequentially line-by-line, offering precise control over driver and TSR load order through DEVICE and INSTALL commands. This approach resolves conflicts related to load sequences and supports conditional directives based on hardware detection or user input, thereby enhancing customization options and facilitating debugging.
Significantly, under DR-DOS, INSTALL can execute non-resident software integrated seamlessly within CONFIG.SYS processing.
In MS-DOS/PC DOS versions from 2.0 through 4.01, the SHELL directive was limited to 31 characters. Later releases expanded this limit up to 128 characters while DR-DOS supports up to 255 characters. It should be noted that CONFIG.SYS directives do not allow long filenames.
Dual booting DOS and Windows 9x
When Windows 95 is installed over a pre-existing DOS or Windows environment, it renames the files CONFIG.SYS and AUTOEXEC.BAT to CONFIG.DOS and AUTOEXEC.DOS respectively, enabling a dual boot setup between Windows 9x and DOS. During a DOS boot, these renamed files temporarily revert to their original filenames. Additionally, backup copies of the Windows 95 versions are saved as CONFIG.W40 and AUTOEXEC.W40.
In cases where Caldera DR-DOS 7.02 or 7.03 is installed alongside Windows 95, the original CONFIG.SYS and AUTOEXEC.BAT files used by Windows remain intact. Instead, DR-DOS employs DCONFIG.SYS and AUTODOS7.BAT for its startup configuration procedures.
OS/2 / Windows NT
OS/2 depends extensively on CONFIG.SYS for configuring system parameters, loading device drivers, and setting up the environment before launching its graphical user interface.
Within the OS/2 subsystem of Windows NT, the settings traditionally found in CONFIG.SYS are maintained within the system registry rather than as a standalone file.
OS/2 includes numerous undocumented CONFIG.SYS commands, highlighting the intricate nature of its configuration requirements.
CONFIG.SYS continues to play a critical role in OS/2-based operating 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
- AUTOEXEC.BAT and CONFIG.SYS details – Computer Hope (2017)
- Overview of Windows 98 / MS-DOS 7.10 CONFIG.SYS directives – Microsoft Support (archived)
- CONFIG.SYS command guide – Caldera (1998) (partial DR-DOS 7 directives)
- FreeDOS CONFIG.SYS directive explanations – FreeDOS Help
- PTS-DOS 2000 Pro User Manual with CONFIG.SYS commands (incomplete) – Paragon Software
- Unofficial German PTS-DOS FAQ (2004) including extra CONFIG.SYS directives