Jump to content

VERSION (CONFIG.SYS directive)

From Alfawiki
Adapted from the English Wikipedia article VERSION (CONFIG.SYS directive), available under CC BY-SA 4.0Updated 9 August 2025
CONFIG.SYS
Company typeConfiguration file
IndustryComputer software
Founded1983
ProductsConfiguration file for DOS and OS/2

CONFIG.SYS serves as the chief configuration file for the DOS and OS/2 operating system families. This plain text file, written in ASCII, contains setup instructions accessible to users that are interpreted by the system's DOS BIOS—commonly located in IBMBIO.COM or IO.SYS—during the boot process. CONFIG.SYS made its debut with DOS version 2.0.

Usage

The directives within CONFIG.SYS tailor DOS to support hardware devices and software applications, including memory management utilities. Once CONFIG.SYS has been processed, DOS initiates the command interpreter defined by the SHELL directive; if none is specified, it defaults to COMMAND.COM, which then executes commands from AUTOEXEC.BAT.

CONFIG.SYS mainly comprises name=value pairs that set configurable options or load components such as device drivers and terminate-and-stay-resident programs (TSRs). This file is located in the root directory of the active boot disk.

The same filename is utilized by (DCP), a variant of MS-DOS developed by East-German manufacturer VEB Robotron.

Certain DOS variants check for alternative configuration files that override CONFIG.SYS:

Early releases of Concurrent DOS versions 3.2 through 4.1 lacked support for CONFIG.SYS; however, subsequent editions like Concurrent DOS 386, Concurrent DOS XM, Multiuser DOS, and REAL/32 instead seek CCONFIG.SYS (reflecting "Concurrent"). Some Multiuser DOS editions use CCONFIG.INI, while REAL/32 employs MCONFIG.SYS. These platforms accommodate extra configuration options (such as INIT_INSTALL) stored in a binary file named CCONFIG.BIN, typically edited using CONFIG.EXE.

In environments like DR DOS 3.31, PalmDOS 1.0, Novell DOS 7, and DR-DOS versions 7.02 and later, a file called DCONFIG.SYS ("DR DOS") takes precedence over CONFIG.SYS. Initially associated with disk compression utilities, this file also supports multiple boot configurations. OpenDOS 7.01 and DR-OpenDOS 7.02 look for ODCONFIG.SYS, while select DR-DOS 7.02+ builds check for DRCONFIG.SYS.

Starting with DR DOS 6.0, the SYS /DR:ext command enables modification of default configuration file extensions, allowing several system files to coexist in one root directory and be selected by boot managers like LOADER included with Multiuser DOS and DR-DOS 7.02/7.03. The SHELL command supports specifying alternate AUTOEXEC.BAT filenames via /P[:filename.ext], and COMMAND.COM accepts extensions other than ".BAT" for this purpose—a feature also supported by 4DOS. The CHAIN=filespec directive permits continuation of processing another configuration file, even if it is outside the root directory; from DR-DOS 7.02 onward, CHAIN=filespec,label allows jumping to designated labels within that file. Additionally, DR-DOS 7.03+ introduces SYS /A, which copies CONFIG.SYS and AUTOEXEC.BAT alongside system files.

FreeDOS provides a comparable mechanism through FDCONFIG.SYS; RxDOS version 7.24 and above use RXCONFIG.SYS; while PTS-DOS employs CONFIG.PTS.

Both CONFIG.SYS and AUTOEXEC.BAT reside in the root directory of boot drives on Windows 95 and Windows 98, although they are generally left empty.

With Windows Me, CONFIG.SYS is no longer parsed during startup; instead, environment variables are loaded directly from the Windows Registry at:

HKLM\System\CurrentControlSet\Control\SessionManager\Environment

In the case of FlexOS, at least from version 1.13 onward, CONFIG.SYS is a binary configuration file that specifies resource managers and device drivers to be 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 within CONFIG.SYS, serving as jump targets for , , , , and commands.
Functions similarly to , also employed for inline comments following other commands. (Note that MS-DOS/PC DOS does not ignore inline comments enclosed in quotes.)
Initiates inline comments along with the ; directive.
Prompts a Yes/No confirmation before executing subsequent CONFIG.SYS commands. (FreeDOS includes optional conditions compatible with boot menus.) DOS versions 6.0 and later allow a similar feature by appending after directives.
Forces unconditional execution of the next CONFIG.SYS command.

ATemplate:NbndC

Determines whether programs can be aborted upon encountering errors.
Sets which drives record file access date stamps on FAT file systems.
Executes conditionally on AT-compatible hardware.
Boot manager configuration.
Adjusts verbosity level of error messages.
Changes the default serial device driver assigned to the AUX device.
Prevents access to character devices outside the phantom \DEV directory.
Loads a base device driver into memory.
Produces a brief beep even if notification sounds are disabled.
Specifies which operating system should boot next.
Enables or disables extended Ctrl+C checking.
Defines the quantity of disk buffers allocated.
Similar to BUFFERS but loads buffers into HMA or UMB areas.
, CACHETTL, CACHEFLUSH (Embedded DOS 6-XL only)
Manage cache block timing and flushing.
Runs programs specified in CONFIG.SYS in the foreground, halting further processing until completion.
Sets the keyboard Caps Lock state.
, CDDBUFFERS (PTS-DOS only)
Configures CD-ROM driver buffers.
Continues processing CONFIG.SYS from a new file or label, supported since DR-DOS 7.02.
, CLS, CODEPAGE, CMOSADDR, COLOR (various systems)
Configure system clock, screen display codepages, CMOS RAM address, and boot menu colors respectively.
, COM2, COM3, COM4 (DR-DOS 7.02+)
Define count, sequence, I/O port addresses, and timeouts for serial COM ports.
, COMMENT(S) (various DOS versions)
Specify DMA buffer settings and redefine inline comment characters or ignore lines entirely.
, CPOS, CPSW (various systems)
Enable internationalization support, set cursor position in menus, and support codepage switching.
Conditional execution based on CPU type or speed (e.g., CPU386+ for Intel 386 and newer processors).

DTemplate:NbndF

Configures relocation of drive descriptor tables in memory.
Sets the memory segment limit for multi-sector disk data deblocking operations.
Enables internal debugger functionality.
Boot manager settings.
Loads device drivers into conventional memory.
Loads device drivers into upper memory blocks (equivalent to in DRDOS 5.0).
Sets country and codepage parameters for keyboard, screen, and printer devices.
Configures sizes of cache memory areas.
Specifies compatibility mode for floppy disk drives.
Defines display font settings.
Controls loading of DOS into high memory or upper memory blocks usage.
Loads DOS internal tables (BUFFERS, FCBS, FILES, LASTDRIVE, STACKS) into upper memory areas.
Specifies an alternative directory path for DOS files.
Defines search paths for data files used by DOS components.
Describes physical disk drive parameters such as geometry and characteristics.
Provides configuration for unrecognized or non-standard drives.
Refer to for additional details.
Enables error logging with PDUMP.nnn files on specified drives.
Displays messages on the screen during processing.
Displays messages including ANSI escape sequences for enhanced formatting.
Adds extra verification steps when launching programs.
Sets error or return codes for subsequent commands or operations.
Controls A20 gate status when starting programs to manage memory access above 1MB.
Terminates CONFIG.SYS processing before reaching the end of the file (with some exceptions).
Defines hash table size used by FASTOPEN for quicker file access, differing from MS-DOS/PC DOS implementation.
Specifies how many File Control Blocks can be cached simultaneously (shares buffer space with FILES under DR-DOS).
Same as FCBS but explicitly loads these structures into upper memory blocks.
Boot manager related configuration parameter.
Sets maximum number of simultaneously open files allowed by DOS.
; Same as FILES but explicitly loads file handles into upper memory blocks for optimization purposes.
; Includes execution of specific CONFIG.SYS subsections (see IGNORE directive).

GTemplate:NbndI

Waits for a key press or timeout, setting the error level to the ASCII value or 1024 if timed out.
Resumes processing of CONFIG.SYS at a designated label.
Continues nested CONFIG.SYS execution at a given label and then returns to the previous point.
Refer to , , or for further details.
See additional information in .
Consult for more context.
Refer to or as applicable.
See or for related commands.
Additional information available in .
Loads a TSR program into memory following relocation of the DOS data segment; compare with INSTCDEX.
See also , , or for related topics.
Further details found in .
Refer to or for related functions.
Activates console and command line history buffers with advanced pattern searching capabilities.
Defines the address of the High Memory Area (HMA) segment.
Configures energy-saving settings related to the HLT instruction.
Enables scanning for boot sector viruses during startup.
Loads installable file system drivers.
Excludes specific CONFIG.SYS sections from execution; see also .
Permits selected applications 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's Insert mode.
Installs a TSR program into memory.
Installs TSR programs into upper memory areas, equivalent to HIINSTALL in DR DOS 5.0.
Loads TSR after relocating the DOS data segment, comparable to INSTCDEX.
Adjusts PIC interrupt priorities to prioritize a specified IRQ.

KTemplate:NbndM

Defines the keyboard layout configuration.
Specifies the memory address of the relocated keyboard buffer.
Determines the maximum number of accessible drives.
Similar to LASTDRIVE but loads Current Directory Structure (CDS) into upper memory regions.
Sets search paths for dynamic link libraries (DLLs).
Controls handling of legacy applications.
Configures the number of file locks allowed.
Manages boot logo display and startup messages via PTS-DOS boot manager.
Specifies count, order, I/O port address, and timeout settings for the LPT1 printer port.
Applies similar settings as LPT1 for the LPT2 port.
Mirrors LPT1 configuration for LPT3 device.
Enables and configures LPT4 with similar parameters.
Sets delay before increasing priority of waiting processes in scheduling.
Defines memory allocation methods and strategies.
Determines default DOS memory allocation behavior.
Establishes menu options configuration.
Specifies color schemes for menus, emulatable under DR-DOS systems.
Sets default menu block, compatible with DR-DOS emulation.
Defines individual menu blocks, emulatable within DR-DOS environments.
Enables or disables multitrack disk operations functionality.
Continues processing CONFIG.SYS commands from another file, optionally loading device drivers and setting %NEWFILE% environment variable.

NTemplate:NbndQ

Sets default response character for No () in Yes/No/Resume prompts.
Determines initial status of keyboard Num Lock key.
Executes commands conditionally based on previous error code results.
Displays messages and waits for key input, similar to and .
Requires user confirmation on errors encountered during CONFIG.SYS processing.
Configures buffer sizes allocated to LPT ports.
Conditional command execution on PC-compatible systems only.
Adjusts scheduler priority settings for processes.
Sets priority levels for disk I/O operations programs.
Changes default printer driver assignments (e.g., from LPT1 to LPT3 or LPT4).
Specifies whether DOS applications are permitted to run.
Loads a user interface shell environment.
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.

RTemplate:NbndT

Activates automatic system reboot upon encountering errors.
Permits inclusion of comments within CONFIG.SYS files.
Allocates a drive letter for local block device drivers.
Defines the default character used for Resume () prompts.
Enables returning from nested CONFIG.SYS processing to the prior GOSUB or SWITCH point, optionally with a return code.
Specifies the size of real mode memory available.
Allows simultaneous loading of programs in the background during CONFIG.SYS execution.
Saves the initial character of deleted files in the reserved FAT area.
Sets the video mode under FreeDOS or selects screen access methods under PTS-DOS.
Controls the Scroll Lock key status on the keyboard.
Establishes environment variables for the session.
Loads the command interpreter shell program.
Similar to SHELL but permits pre-allocating space to relocate COMMAND.COM into HMA or UMBs, preventing fragmentation.
Defines keyboard modifier key states such as Shift Lock, Num Lock, Scroll Lock, and Insert.
Determines if files are closed automatically when Ctrl+Alt+Del is pressed.
Skips Power-On Self Test (POST) during reboot sequences.
, STACKSIZE, STACKSHIGH, STACK
Various stack configuration parameters across DOS versions, generally obsolete or with limited compatibility today.
, SYSBOOT, SYSGEN, SYSLOAD, SYSTOUMB
Boot management and memory loading options specific to PTS-DOS.
, SWITCH
Enables conditional processing within CONFIG.SYS scripting for select DOS variants.
, SWAPPATH, THREADS, TIMESLICE
OS/2-specific system settings that impact error handling, memory swapping, threading behavior, and CPU scheduling.
(DR DOS 6.0+, PTS-DOS)
Configurations for command timeouts in CONFIG.SYS and default prompt responses.
, TRACE, TRACEBUF, TRAPDUMP
Extensions for temporary files and debugging/logging controls across various DOS systems and OS/2.

UTemplate:NbndZ

Assigns a particular memory segment as an Upper Memory Block (UMB) for DOS usage.
Sets up the UMB server service.
Defines address ranges allocated for UMB RAM areas.
Enables or disables verification of disk writes.
Specifies which DOS version is reported to software applications.
Configures VGA display status settings.
Indicates current video mode similar to FreeDOS’s SCREEN directive.
Enables use of virtual DMA channels.
Controls processor Virtual Mode Extensions (VME).
Configures Windows Virtual Device Driver (VxD) settings.
Manages system support features related to Windows environments.
Adjusts relocation parameters for the Extended BIOS Data Area (EBDA).
Enables conditional execution on XT-compatible hardware platforms.
Activates built-in Year 2000 (Y2K) compliance support.
Sets the default 'Yes' character used in prompt responses.
Monitors deletion events of device drivers.

Issues

Although booting is possible without CONFIG.SYS or AUTOEXEC.BAT files, these are crucial for comprehensive DOS customization and meeting software prerequisites. If either file becomes damaged or corrupted, troubleshooting is required.

When CONFIG.SYS lacks 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 not found. In contrast, MS-DOS 6.0/PC DOS 6.1 and Novell DOS 7 and later versions prompt users to specify a path for the command interpreter. This prompt also appears if the main shell terminates unexpectedly or is exited intentionally, allowing users to temporarily replace the shell without restarting.

Due to incompatibilities between MS-DOS 7.0+ COMMAND.COM and DR-DOS systems, DR-DOS 7.02 and above enforce SHELL directives during skip, trace, and step modes to prevent conflicts in dual-boot environments. If a valid shell filename is absent, users are prompted before COMMAND.COM loads from the root directory.

Under MS-DOS/PC DOS, CONFIG.SYS size is restricted to several kilobytes (up to 64 KB in recent releases), whereas DR-DOS imposes virtually no size limitation aside from filesystem constraints. MS-DOS compiles CONFIG.SYS into a tokenized format before sequentially loading device drivers and TSR programs. Conversely, DR-DOS processes directives line-by-line, granting precise control over load order through DEVICE and INSTALL commands. This approach facilitates resolving driver conflicts and integrating temporary external utilities during startup.

Early MS-DOS versions (2.0–4.01) limited SHELL command line length to 31 characters, expanding up to 128 characters in later releases. DR-DOS supports up to 255 characters for this directive. Notably, CONFIG.SYS commands do not accommodate long filenames.

Dual Booting DOS and Windows 9x

When Windows 95 is installed over a preexisting DOS or Windows environment, the system renames CONFIG.SYS and AUTOEXEC.BAT to CONFIG.DOS and AUTOEXEC.DOS, enabling dual boot functionality between Windows 9x and DOS. Selecting to boot into DOS temporarily reverts these filenames, while the Windows 95 versions are preserved under CONFIG.W40 and AUTOEXEC.W40.

In setups where Caldera DR-DOS 7.02 or 7.03 coexists with Windows 95, the original CONFIG.SYS and AUTOEXEC.BAT files used by Windows remain intact. Instead, DR-DOS employs DCONFIG.SYS and AUTODOS7.BAT as its configuration files during startup.

OS/2 and Windows NT

OS/2 relies heavily on CONFIG.SYS for loading drivers and setting environment variables prior to launching its graphical user interface.

Within the OS/2 subsystem of Windows NT, the file recognized as CONFIG.SYS by OS/2 applications is actually managed within the system registry.

A number of CONFIG.SYS commands utilized by OS/2 are either undocumented or have limited documentation available.

CONFIG.SYS continues to be utilized by OS/2 successors such as eComStation and ArcaOS.

See also

External links

  • Information on AUTOEXEC.BAT and CONFIG.SYS at Computer Hope
  • Overview of CONFIG.SYS directives in Windows 98 / MS-DOS 7.10 (archived)
  • Caldera's CONFIG.SYS Command Reference (archived) – summary of DR-DOS 7 directives
  • FreeDOS CONFIG.SYS directives description (archived)
  • User Manual for PTS-DOS 2000 Pro including CONFIG.SYS commands (archived)
  • Unofficial German PTS-DOS FAQ (archived) covering CONFIG.SYS directives