DOSDATA (CONFIG.SYS directive)
| Company type | Configuration file |
|---|---|
| Industry | Operating systems |
| Founded | 1983 (with DOS version 2.0) |
| Products | Configuration for DOS and OS/2 |
CONFIG.SYS serves as the central configuration file for DOS and OS/2 operating systems. This plain text file, written in ASCII, holds setup instructions accessible to users, which are interpreted by the operating system's DOS BIOS—typically found in IBMBIO.COM or IO.SYS—during the system startup. CONFIG.SYS made its debut with DOS version 2.0.
Usage
The directives within CONFIG.SYS tailor DOS for hardware devices, software applications, and memory allocation. Once CONFIG.SYS has been processed, DOS initiates the command interpreter indicated by the SHELL directive, or defaults to COMMAND.COM, which subsequently executes AUTOEXEC.BAT.
This configuration file primarily contains name=value entries that specify adjustable parameters or load essential files such as device drivers and terminate-and-stay-resident programs (TSRs) into system memory.
In DOS environments, CONFIG.SYS is located in the boot drive's root directory.
Certain DOS variants check for alternative filenames that override CONFIG.SYS:
Earlier versions of Concurrent DOS did not support CONFIG.SYS; however, later editions like Concurrent DOS 386 and XM, along with Multiuser DOS, System Manager, and REAL/32, utilize CCONFIG.SYS or CCONFIG.INI for configuration purposes, with settings saved in a binary file named CCONFIG.BIN. These configurations are commonly managed through CONFIG.EXE.
In systems such as DR DOS 3.31, PalmDOS 1.0, Novell DOS 7, and DR-DOS versions 7.02 and above, the file DCONFIG.SYS takes precedence over CONFIG.SYS. Initially designed to support disk compression utilities by managing drive letter assignments, it also enables multi-boot setups. OpenDOS 7.01 and DR-OpenDOS 7.02 may employ ODCONFIG.SYS, while some DR-DOS releases search for DRCONFIG.SYS. The command SYS /DR:ext allows customization of default system file extensions to facilitate parallel configurations and boot loaders such as LOADER.
The SHELL command can specify alternative AUTOEXEC.BAT files using /P[:filename.ext], permitting COMMAND.COM to accept extensions other than ".BAT" in these instances (a feature also supported by 4DOS). From DR-DOS 6.0 onward, the CHAIN=filespec directive enables continuation of configuration processing from another file located anywhere on the boot drive; DR-DOS 7.02+ extends this with an optional label parameter (CHAIN=filespec,label). Additionally, DR-DOS 7.03+ introduces the SYS /A option to copy both CONFIG.SYS and AUTOEXEC.BAT along with system files during setup.
Other DOS variants include FDCONFIG.SYS for FreeDOS, RXCONFIG.SYS for RxDOS version 7.24 and later, and CONFIG.PTS used by PTS-DOS.
Due to their DOS heritage, both CONFIG.SYS and AUTOEXEC.BAT are present in the root directory of Windows 95 and Windows 98 boot drives but are generally left empty. Windows Me does not process CONFIG.SYS at startup; instead, it loads environment variables directly from the Windows Registry at:
- HKLM\System\CurrentControlSet\Control\SessionManager\Environment
In the case of FlexOS, CONFIG.SYS is a binary configuration file specifying resource managers and device drivers loaded during system initialization.
Example
Below is an example CONFIG.SYS file 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 within CONFIG.SYS to serve as jump destinations for , , , and commands.
- Functions similarly to , but additionally permits in-line comments following other CONFIG.SYS instructions. Refer to .
- Used to initiate in-line comments alongside the ; command.
- Presents a Yes/No prompt requesting user confirmation before proceeding with subsequent CONFIG.SYS instructions.[1] (FreeDOS enables optional conditions via boot menus configured through and .) Starting with DOS 6.0, a comparable feature exists by appending after the directive, for example .
- Executes the next CONFIG.SYS instruction without any conditions.
ATemplate:NbndC
- Determines whether programs may be interrupted upon encountering errors.
- Configures which drives record file access timestamps within FAT file systems.
- Executes conditionally on AT-compatible hardware exclusively.
- Provides boot management functionality.
- Adjusts the level of detail shown in error messages.
- Alters the default internal serial device driver (COM1: through COM4:) associated with the AUX device.
- Prevents character devices from being accessible outside the phantom \DEV directory.
- Loads fundamental device drivers into memory.
- Produces a brief beep sound even if audible alerts are disabled via switches.
- Specifies the operating system to load next during boot.
- Enables or disables extended Ctrl+C handling.
- Defines the quantity of disk buffers to allocate.
- Similar to BUFFERS but loads buffers into High Memory Area (HMA) or Upper Memory Blocks (UMB).
- Sets the maximum number of cache blocks dynamically allocated from the system pool.
- Defines the maximum duration before unused cache blocks are returned to the system pool.
- Specifies the maximum time before dirty cache blocks are flushed to disk.
- Loads programs within CONFIG.SYS akin to INSTALL under DOS, running them in the foreground and pausing processing until completion.
- Sets Caps Lock keyboard status to either on or off.
- Names the CD-ROM hardware driver.
- Indicates number of buffers allocated for CD-ROM access.
- Continues processing of CONFIG.SYS from a new file and optionally at a specified label since DR-DOS 7.02.
- Defines the type of system clock used.
- Clears the screen display.
- Specifies one or more OEM codepages.
- { { nobold | ( PTS - DOS only ) } }
- Indicates CMOS RAM address location.
- { { mono | 1 = COLOR } } { { nobold | ( PTS - DOS only ) } }
- Sets color schemes for boot menus.
- { { mono | 1 = COMx } } { { nobold | ( DR - DOS 7 . 02 + ) } }
- Configures count, logical sequence, I/O address, and timeout values for COM ports COM1 through COM4 .
- { { mono | 1 = COMAREA } } { { nobold | ( PTS - DOS only ) } }
- Designates buffer area for DMA operations .
- { { mono | 1 = COMMENT } } { { nobold | ( DOS 4 .0 + , RxDOS ; disregarded under DR - DOS 7 .02 + , Embedded DOS , PTS - DOS ) } }
- Changes lead-in characters for inline comments or causes subsequent line to be ignored .
- { { mono | 1 = COUNTRY } } { { nobold | ( DOS 3 .0 , DOS Plus 2 . 1 with FIDDLOAD , DR - DOS 3 .31 + , OS /2 , PTS - DOS ) } }
- Activates and configures internationalization support .
- { { mono | 1 = CPOS } } { { nobold | ( DR - DOS 6 .0 + ) } }
- Defines cursor position on configuration menu displays .
- { { mono | 1 = CPSW } } { { nobold | ( MS - DOS 4 .00 -4 .01 ; ignored under DR - DOS 7 .02 + ) } }
- Supports codepage switching functionality .
- { { mono | 1 = CPU } } { { nobold | ( PTS - DOS only ) } }
- Sets RAM refresh rate parameters .
- Conditional execution directives specify CPU models (such as CPU88, CPU286, CPU386) supported by PTS-DOS and DR-DOS versions, allowing tailored CONFIG.SYS processing accordingly.
DTemplate:NbndF
- Manages the relocation process of drive descriptor tables.
- Defines the memory segment address used for multi-sector disk data reassembly.
- Activates support for the internal debugger.
- 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 configurations for keyboard, screen, and printer devices.
- Configures sizes of cache memory.
- Determines floppy disk compatibility mode.
- Specifies the display font used.
- Controls whether DOS loads into high memory and manages upper memory usage.
- Loads DOS internal tables (BUFFERS, FCBS, FILES, LASTDRIVE, STACKS) into upper memory.
- Defines an alternative directory path for DOS files.
- Establishes the search path for data files.
- Defines physical parameters of disk drives.
- Sets parameters for unidentified drives.
- Refer to .
- Enables error logging with PDUMP.nnn files and designates the drive for storage.
- Outputs a message on the screen.
- Displays messages using ANSI escape sequences.
- Specifies additional verification steps when launching programs.
- Assigns an assumed error or return code for subsequent commands.
- Controls the A20 gate state during program startup.
- Terminates CONFIG.SYS processing prematurely, except for specific directives.
- Configures hash table size to optimize file opening speed, differing from MS-DOS FASTOPEN driver behavior.
- Sets the number of cached File Control Blocks that can be open simultaneously (shares buffer space with FILES in DR-DOS).
- Similar to FCBS but loads into upper memory instead.
- Boot manager configuration option.
- Determines the maximum number of files that can be open simultaneously.
- Equivalent to FILES but loads file handles into upper memory.
- Includes execution of designated CONFIG.SYS subsections (refer to IGNORE).
GTemplate:NbndI
- Waits for a key press or timeout and sets the error level to the ASCII code of the key pressed (or 1024 if timed out).
- Resumes CONFIG.SYS processing at a specified label.
- Continues nested CONFIG.SYS processing at a given label, allowing return to the previous point afterward.
- Refer to , , or .
- Refer to .
- Refer to .
- Refer to or .
- Refer to or .
- Refer to .
- Installs a Terminate and Stay Resident (TSR) program into memory similarly to , but after relocating DOS data segments. Compare with INSTCDEX.
- Refer to , , or .
- Refer to .
- Refer to or .
- Enables console and command line history buffers with advanced pattern searching capabilities.
- Specifies the address of the High Memory Area (HMA) segment.
- Configures CPU halt (HLT) energy-saving mode settings.
- Activates boot sector virus scanning functionality.
- Loads installable file system drivers.
- Excludes execution of specified CONFIG.SYS subsections from processing.
- Grants certain programs permission to execute at ring 2, allowing direct hardware I/O access.
- Includes directives from another menu block (can be emulated via GOSUB/RETURN in DR-DOS).
- Sets the keyboard Insert mode state.
- Installs a TSR program into conventional memory.
- Installs a TSR program into upper memory (identical to HIINSTALL in DR DOS 5.0).
- Installs a TSR program after relocating DOS data segments (see also INSTCDEX).
- Adjusts PIC interrupt controller priorities by rotating IRQ levels to prioritize a specified IRQ number.
KTemplate:NbndM
- Defines the keyboard layout configuration.
- Indicates the location of the relocated keyboard buffer.
- Determines the highest number of accessible drives.
- Similar to LASTDRIVE but loads the Current Directory Structure (CDS) into upper memory.
- Specifies paths for searching DLL files.
- Controls execution parameters for legacy applications.
- Sets the quantity of file locks allowed.
- Configures the display of the boot logo when using the PTS-DOS boot manager.
- Establishes the count, sequence, I/O port address, and timeout settings for the LPT1 device.
- Applies similar device settings to LPT2.
- Applies similar device settings to LPT3.
- Activates and configures LPT4 device parameters.
- Sets delay duration before increasing process priority.
- Manages strategies for memory allocation.
- Specifies the standard DOS memory allocation method.
- Defines options available in menus.
- Determines menu color schemes (emulatable in DR-DOS).
- Sets the default menu block (emulatable in DR-DOS).
- Defines various menu blocks (emulatable in DR-DOS).
- Enables disk operations involving multiple tracks.
- Continues processing CONFIG.SYS from a new file, optionally following device driver loading and setting %NEWFILE% environment variable.
NTemplate:NbndQ
- Specifies default 'No' character used in Yes/No/Resume prompts.
- Controls the status of the keyboard [[Num Lock|Template:Keypress]] key.
- Enables conditional execution based on the preceding error code, e.g., .
- Displays a message and waits for a keypress, functioning similarly to and in DR-DOS.
- Requires user confirmation for errors encountered in CONFIG.SYS processing.
- Sets buffer sizes for LPT port operations.
- Enables conditional execution on PC-compatible hardware.
- Configures scheduler priority levels.
- Adjusts priority settings related to disk input/output tasks.
- Changes default printer driver assignment (e.g., switching from LPT1 to LPT3 or LPT4).
- Determines whether DOS applications are permitted to execute.
- 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 directed to STDOUT.
RTemplate:NbndT
- Activates automatic system reboot upon encountering errors.
- Permits inclusion of comments within CONFIG.SYS files.
- Reserves a drive letter for local block device drivers.
- Defines default 'Resume' character used in Yes/No/Resume prompts.
- Returns nested CONFIG.SYS processing flow to previous GOSUB or SWITCH location, optionally passing a return code.
- Specifies size of real mode memory available.
- Allows concurrent program loading within CONFIG.SYS, similar to CALL or INSTALL commands.
- Controls whether the first character of deleted files is stored in FAT reserved space.
- Sets video mode or screen access methods depending on operating system variant.
- Configures keyboard Scroll Lock key status.
- Defines environment variables within the system context.
- Loads the command interpreter shell program.
- Similar to SHELL but supports pre-allocating COMMAND.COM size in high memory to minimize fragmentation and improve shell efficiency.
- Sets states for keyboard modifiers such as Shift Lock, Num Lock, Scroll Lock, and Insert mode.
- Determines if files close automatically upon Ctrl+Alt+Del key sequence.
- Skips power-on self-test (POST) during reboot cycles.
- , STACKSIZE, STACKSHIGH
- Configure hardware interrupt stack sizes and buffer placement strategies across DOS versions, influencing system stability and memory management efficiency.
- , SYSBOOT, SYSGEN, SYSLOAD
- PTS-DOS-specific commands managing boot options, system memory handling, and alternative system loading methods for increased flexibility.
- , SWITCH
- Enables conditional branching within CONFIG.SYS processing for advanced configuration management (DOS 6.0+).
- , SWAPPATH
- OS/2 directives that control error log locations and swap file paths to enhance system reliability and performance tuning.
- , SWITCHES
- Define default command-line switch characters and special options across DOS variants to customize command interpreter behavior effectively.
- , TRACE, TRACEBUF
- Manage timeout intervals and enable or disable single-step execution tracing useful for debugging CONFIG.SYS processing (DR-DOS 6.0+, PTS-DOS, OS/2).
- , TRAPDUMP
- Configures temporary file extensions (PTS-DOS) and activates detailed error logging capabilities (OS/2) supporting comprehensive system diagnostics.
UTemplate:NbndZ
- Directs DOS to allocate a particular memory segment as Upper Memory Block (UMB).
- Defines which UMB server is utilized.
- Identifies the memory address ranges designated for UMB RAM.
- Toggles verification of disk write operations.
- Determines the DOS version presented to applications.
- Manages VGA display settings.
- Sets the active video mode, comparable to FreeDOS's SCREEN command.
- Indicates whether virtual DMA functionality is permitted.
- Activates or deactivates the CPU's Virtual Mode Extensions (VME).
- Configures the Windows VxD driver.
- Sets up system-level support for Windows environments.
- Controls relocation of the Extended BIOS Data Area (XBDA).
- Enables conditional execution on XT-compatible hardware.
- Implements built-in Year 2000 compliance features.
- Defines the default affirmative response character for prompts.
- Manages tracking of file deletions.
Issues
Although the system can initialize without CONFIG.SYS or AUTOEXEC.BAT, these configuration files are crucial for comprehensive DOS customization and meeting software prerequisites. Corruption or loss of either file requires diagnostic intervention.
If CONFIG.SYS does not include a SHELL directive or is missing/corrupted, DOS attempts to locate COMMAND.COM in the root directory. Versions prior to 6.0 will fail to boot if COMMAND.COM is absent, whereas MS-DOS 6.0, PC DOS 6.1, and Novell DOS 7 and later prompt users to specify a command interpreter path. This prompt also appears if the main command processor terminates unexpectedly or exits intentionally, providing a limited shell alternative without rebooting.
COMMAND.COM from MS-DOS 7.0 onward is incompatible with DR-DOS, which commonly resides in C:\ within dual-boot configurations. Starting with DR-DOS 7.02, skipping or tracing CONFIG.SYS lines (using Ctrl+F5/F7/F8) no longer bypasses SHELL directives, although some releases restored skip functionality via Ctrl+F6 to recover from invalid shell arguments. When skipping CONFIG.SYS and no SHELL directive is found, users are prompted to enter a valid shell filename before COMMAND.COM loads.
The maximum size of CONFIG.SYS varies by DOS version: MS-DOS and PC DOS impose limits of several kilobytes (recently up to 64 KB), while DR-DOS imposes no fixed limit aside from file system constraints. MS-DOS processes CONFIG.SYS by tokenizing it into memory before executing directives sequentially—loading device drivers prior to TSRs—whereas DR-DOS parses CONFIG.SYS line-by-line. This allows precise control over the order in which drivers and TSRs load using DEVICE and INSTALL, aiding in conflict resolution and debugging.
Additionally, DR-DOS offers conditional statements and dynamic flow control based on factors such as CPU type, key input, error conditions, or return codes. It also supports incorporating temporary external programs within CONFIG.SYS through INSTALL, enhancing customization and troubleshooting capabilities.
In early MS-DOS releases (versions 2.0 through 4.01), the SHELL directive was limited to a maximum length of 31 characters; later versions expanded this limit to 128 characters, while DR-DOS permits up to 255 characters. None of these CONFIG.SYS directives accommodate long filenames.
Dual booting DOS and Windows 9x
When Windows 95 is installed over an existing DOS/Windows environment, the system renames CONFIG.SYS and AUTOEXEC.BAT to CONFIG.DOS and AUTOEXEC.DOS respectively to support dual-boot functionality. During a DOS boot session, these files are temporarily restored to their original names. The Windows 95 versions are backed up as CONFIG.W40 and AUTOEXEC.W40.
In contrast, installing Caldera DR-DOS versions 7.02 or 7.03 alongside Windows 95 preserves the Windows CONFIG.SYS and AUTOEXEC.BAT filenames, while DR-DOS uses DCONFIG.SYS and AUTODOS7.BAT for its startup configuration files.
OS/2 / Windows NT
OS/2 relies heavily on CONFIG.SYS to set up drivers and environment variables prior to the launch of its graphical user interface.
Within the OS/2 subsystem on Windows NT, CONFIG.SYS is presented to OS/2 applications as a conventional file, though it is actually maintained within the system registry.
Numerous CONFIG.SYS commands utilized by OS/2 remain without official documentation.
CONFIG.SYS remains in use by 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
- Detailed AUTOEXEC.BAT and CONFIG.SYS guidance 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 options
- FreeDOS CONFIG.SYS command descriptions
- Partial PTS-DOS 2000 Pro User Manual covering CONFIG.SYS directives
- Unofficial German PTS-DOS FAQ with extended CONFIG.SYS command list (archived)
- ↑ Cite error: Invalid
<ref>tag; no text was provided for refs namedPaul_2000_CONFIG