Jump to content

DEBUG (CONFIG.SYS directive)

From Alfawiki
Adapted from the English Wikipedia article DEBUG (CONFIG.SYS directive), available under CC BY-SA 4.0Updated 9 August 20251 source
CONFIG.SYS
Company typeConfiguration file
IndustryComputer software
Founded1983
ProductsOperating system configuration

CONFIG.SYS serves as the central configuration file for DOS and OS/2 operating systems. This plain text file, written in ASCII, contains setup instructions accessible to users that are interpreted by the operating system’s DOS BIOS—commonly found in IBMBIO.COM or IO.SYS—during the boot sequence. CONFIG.SYS was introduced starting with DOS version 2.0.

Usage

The directives within CONFIG.SYS configure DOS for hardware devices, software applications, and memory allocation. Once CONFIG.SYS has been processed, DOS proceeds to launch the command interpreter specified by the SHELL command; if none is defined, it defaults to COMMAND.COM, which subsequently executes the AUTOEXEC.BAT script.

This file predominantly contains name=value entries that set adjustable parameters or load specific files—primarily device drivers and terminate-and-stay-resident programs (TSRs)—into memory.

In DOS environments, CONFIG.SYS is located in the boot drive’s root directory.

Several DOS variants employ alternative filenames: - Versions of Concurrent DOS 386, Concurrent DOS XM, Multiuser DOS, and REAL/32 prioritize CCONFIG.SYS instead of CONFIG.SYS. Additionally, Multiuser DOS may utilize CCONFIG.INI, while REAL/32 opts for MCONFIG.SYS. These platforms also support supplementary configuration stored in binary files such as CCONFIG.BIN, which are typically edited through CONFIG.EXE.

- From DR DOS 3.31 onward—including distributions like PalmDOS, Novell DOS, and OpenDOS—the file DCONFIG.SYS overrides CONFIG.SYS. This arrangement facilitates multi-boot environments and setups involving disk compression drivers that alter drive letter assignments upon loading.

- OpenDOS versions 7.01 and DR-OpenDOS 7.02 also detect ODCONFIG.SYS, while certain DR-DOS 7.02+ releases search for DRCONFIG.SYS. The command SYS /DR:ext allows users to define custom default file extensions, enabling multiple system file sets to coexist within a single root directory, managed by boot loaders such as LOADER.

- The SHELL directive can specify alternative AUTOEXEC.BAT files using /P[:filename.ext], with COMMAND.COM permitting extensions other than .BAT in these cases—a capability also supported by 4DOS.

- Starting with DR-DOS 6.0, the CHAIN=filespec command enables continuation of configuration processing from another file, optionally including a label to jump to specific sections (CHAIN=filespec,label). DR-DOS 7.03 and later add a SYS /A option to copy both CONFIG.SYS and AUTOEXEC.BAT alongside system files during setup.

Comparable features exist in other DOS derivatives: - FDCONFIG.SYS is used by FreeDOS, - RXCONFIG.SYS by RxDOS 7.24+, - and CONFIG.PTS by PTS-DOS.

Although based on DOS, Windows 95 and Windows 98 include CONFIG.SYS and AUTOEXEC.BAT in their root directories but generally leave them unpopulated. In contrast, Windows Me does not process CONFIG.SYS during startup; instead, it loads environment variables directly from the Windows Registry key at HKLM\System\CurrentControlSet\Control\SessionManager\Environment.

Within the FlexOS operating system, CONFIG.SYS exists as a binary file that specifies resource managers and device drivers loaded at boot time.

Example

Below is 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 within CONFIG.SYS, serving as jump targets for , , , and commands.
Functions similarly to , but additionally allows in-line comments following other CONFIG.SYS instructions. (Note that in MS-DOS/PC DOS, inline comments inside double quotes are not ignored.)
Introduces in-line comments alongside the ; symbol.
Prompts a Yes/No confirmation before executing subsequent CONFIG.SYS commands.[1] (FreeDOS does not support custom messages but allows conditional execution via boot menus using and .) From DOS 6.0 onward, a similar feature is available by appending after commands, for example .
Executes the next CONFIG.SYS command unconditionally.

ATemplate:NbndC

Determines whether programs can be aborted when errors occur.
Defines which drives record file access date stamps on FAT file systems.
Enables conditional execution on AT-compatible systems.
Boot management utility.
Adjusts the verbosity level of error messages.
Changes the default serial device driver assigned to the AUX: device.
Disables character devices located outside the phantom \DEV directory.
Loads a base device driver into memory.
Produces a brief beep sound even if audible alerts are turned off.
Specifies the next operating system to boot.
Enables or disables extended Ctrl+C checking.
Sets the number of disk buffers.
Explicitly loads buffers into HMA or UMB memory regions.
, ;, ; (Embedded DOS 6-XL only)
Manages cache block allocation and flushing intervals.
Loads programs within CONFIG.SYS, pausing processing until they return control.
(DR-DOS 7.02+)
Controls keyboard Caps Lock state.
, ;, ;, ;, ;, ;, ;, ;, ;, ;, ;, ;, ;, ;, ;, ;, ;, ;, ;CPU88, CPU88+, CPU86, CPU86+, CPU286, CPU286+, CPU386, CPU386+, CPU486, CPU486+ (various DOS versions)
These directives configure hardware-specific parameters including device drivers, buffer sizes, codepages, serial ports and conditional execution based on CPU type. They are crucial for optimizing system performance and ensuring compatibility in professional computing environments.

DTemplate:NbndF

Adjusts relocation settings for drive descriptor tables.
Defines the memory segment limit up to which multi-sector disk data deblocking is permitted.
Activates internal debugger support.
Boot management tool.
Loads a device driver into conventional memory.
Loads a device driver into upper memory blocks (equivalent to in DRDOS 5.0).
Sets country and codepage configurations for keyboard (KBD), screen (SCR), and printer (LPT) devices.
Configures cache memory sizes.
Defines floppy disk compatibility mode settings.
Specifies display font selection.
Controls loading of DOS into high memory area and/or upper memory regions (similar to in DRDOS 5.0).
Loads DOS tables such as BUFFERS, FCBS, FILES, LASTDRIVE, STACKS into upper memory segments.
Designates an alternative directory path for DOS files.
Specifies search paths for data files.
Defines physical parameters for disk drives.
Sets parameters for unrecognized drives.
See .
Enables PDUMP.nnn error logging and specifies target drive.
Displays a message on screen.
Outputs a message including ANSI escape sequences.
Activates additional verification checks when launching programs.
Assigns an assumed error or return code for subsequent commands.
Configures A20 gate state during program startup.
Terminates CONFIG.SYS processing early except for certain directives.
Adjusts hash table size to speed up file open operations differently from MS-DOS/PC DOS FASTOPEN driver behavior.
Sets the number of cached File Control Blocks (FCBs) that can be opened simultaneously (shares buffer with FILES under DR-DOS).
Same as FCBS but loads FCBs into upper memory areas.
Boot management utility.
Specifies maximum number of files that can be open concurrently.
Same as FILES but loads file handles into upper memory blocks.
Includes execution of designated CONFIG.SYS subsections (refer to IGNORE).

GTemplate:NbndI

Waits for a keypress or times out, setting the error level to the corresponding ASCII value (or 1024 if timed out).
Resumes CONFIG.SYS processing at a designated label.
Continues nested CONFIG.SYS processing at a specified label, then returns to the previous point.
Refer to , , or for additional details.
Refer to for further information.
Refer to for more context.
Consult or for related functions.
Consult or for related commands.
See for further explanation.
Loads a terminate-and-stay-resident (TSR) program into memory similarly to , but after relocating the DOS data segment.
Refer to , , or for related TSR installation methods.
Refer to for additional TSR-related commands.
See or for more about TSR handling.
Activates console and command line history buffer with advanced pattern search capabilities.
Sets the High Memory Area (HMA) segment address.
Configures HLT instruction-based power-saving mode.
Enables system verification for boot sector virus detection.
Loads installable file system drivers.
Prevents execution of selected CONFIG.SYS subsections.
Permits specified applications to operate at CPU ring 2, allowing direct hardware I/O access.
Incorporates directives from another menu section (emulated through GOSUB/RETURN in DR-DOS).
Sets the status of the keyboard Insert mode.
Loads a TSR program into memory.
Installs TSR programs into upper memory, analogous to HIINSTALL in DR DOS 5.0.
Loads TSR programs after relocating the DOS data segment.
Adjusts PIC interrupt priority by assigning highest priority to a chosen IRQ number.

KTemplate:NbndM

Defines the keyboard layout configuration.
Specifies the address of the relocated keyboard buffer.
Sets the maximum number of accessible drives.
Functions like LASTDRIVE but also loads Current Directory Structure into upper memory.
Lists paths used for searching DLL files.
Manages compatibility settings for legacy applications.
Determines the number of file locks allowed.
Configures display of boot logo using PTS-DOS boot manager.
Sets parameters such as count, sequence, I/O address, and timeout for LPT1 device.
Provides similar configuration options for LPT2 device.
Offers equivalent setup capabilities for LPT3 device.
Enables and configures the LPT4 device port.
Defines delay before elevating process priority levels.
Controls strategies for memory allocation management.
Specifies default DOS memory allocation approach.
Declares menu options available during boot or configuration.
Assigns color schemes to menus (can be emulated using ECHO in DR-DOS).
Specifies which menu block is default (emulatable via TIMEOUT and SWITCH commands in DR-DOS).
Defines individual menu blocks (emulated using ECHO and SWITCH in DR-DOS).
Enables operations involving multitrack disk functionality.
Continues CONFIG.SYS processing from a separate file, optionally loading a driver and setting %NEWFILE% environment variable.

NTemplate:NbndQ

Sets the default character representing No () in Yes/No/Resume prompts.
Controls keyboard [[Num Lock|Template:Keypress]] activation status on startup.
Enables conditional execution based on the last error code, such as .
Displays text and waits for keypress, similar to and commands in DR-DOS environments.
Requires user acknowledgment of errors encountered during CONFIG.SYS processing.
Defines buffer size allocated for LPT port operations.
Executes commands conditionally on PC-compatible systems only.
Configures scheduler priority levels for processes.
Sets priority values specifically for disk I/O-related programs.
Changes default printer device driver assignment among LPT1 through LPT4 ports.
Controls whether DOS applications are permitted to run under certain conditions.
Loads a user interface shell program during startup or configuration phases.
Executes conditionally on IBM PS/1-compatible hardware platforms.
Executes conditionally on IBM PS/2-compatible hardware platforms.
Silences standard output display during operation.

RTemplate:NbndT

Activates automatic reboot upon encountering errors.
Permits inclusion of comments within CONFIG.SYS.
Allocates drive letters to local block device drivers.
Defines the default Resume () character displayed in prompts.
Enables returning from nested CONFIG.SYS processing to the previous GOSUB or SWITCH location, optionally with a return code.
Specifies the amount of real mode memory available.
Allows programs in CONFIG.SYS to load simultaneously in the background.
Determines where the first character of deleted files is stored within the FAT reserved area.
Sets video mode parameters for FreeDOS or screen access methods for PTS-DOS.
Manages the Scroll Lock state on the keyboard.
Assigns environment variables.
Loads the command interpreter shell.
Similar to SHELL but includes a size parameter to load COMMAND.COM into HMA or UMBs, optimizing memory usage with third-party shells.
Defines keyboard modifier states such as Shift Lock, Num Lock, Scroll Lock, and Insert mode.
Controls whether files close upon pressing Ctrl+Alt+Del.
Skips the Power-On Self Test (POST) during reboot.
, STACKSIZE, STACKSHIGH
Configure interrupt stack sizes and buffer locations across different DOS platforms (implementation varies).
, SYSBOOT, SYSGEN, SYSLOAD, SYSTOUMB
PTS-DOS commands managing boot procedures, system memory allocation, and loading addresses.
, SWITCH
Handles nested CONFIG.SYS processing with conditional branching (behavior differs among DOS versions).
, SWAPPATH, THREADS, TIMESLICE
OS/2-specific directives controlling error handling, swap file directories, threading capabilities, and scheduler time slices.
, TRACE
Sets timeout intervals and enables single-step execution of CONFIG.SYS and AUTOEXEC.BAT scripts under DR-DOS and PTS-DOS for improved system debugging and control.
Additional directives regulate system functions such as swap file paths, logging buffers, FPU bug fixes (SXFAKEHWFPU), temporary file extensions (TMPEXT), and more—providing detailed management options aimed at enhancing DOS performance and stability.

UTemplate:NbndZ

Designates a specific segment for use as Upper Memory Block (UMB) memory by DOS.
Defines which UMB server is utilized.
Specifies address ranges allocated as UMB RAM.
Enables or disables verification of disk writes.
Sets the DOS version reported to software applications.
Configures VGA display status settings.
Indicates the current video mode in use.
Determines whether virtual DMA is permitted.
Controls processor Virtual Mode Extensions (VME).
Configures Virtual Device Drivers (VxD) for Windows environments.
Sets system support parameters for Windows operation.
Manages relocation of the Extended BIOS Data Area (XBDA).
Executes conditionally on XT-compatible hardware only.
Activates built-in Year 2000 compliance features.
Specifies the default affirmative response character in prompts.
Enables tracking of file deletions.

Issues

Although the system can initiate booting without CONFIG.SYS present or if it is damaged, this file—together with AUTOEXEC.BAT—is critical for tailoring the operating system and defining software dependencies. Problems with these files require troubleshooting efforts.

If CONFIG.SYS lacks a SHELL directive or is corrupted or missing, DOS attempts to locate COMMAND.COM in the root directory of the boot drive. Versions prior to 6.0 will not boot without this file, whereas MS-DOS 6.0/PC DOS 6.1, Novell DOS 7, and subsequent releases prompt users to input a command interpreter path. This recovery prompt also appears if the primary shell fails or is intentionally exited, allowing limited shell replacement during runtime without rebooting.

COMMAND.COM from MS-DOS 7.0 and later is incompatible with DR-DOS installations that typically reside in C:'s root in dual-boot configurations. As a result, DR-DOS 7.02 and newer prevent bypassing SHELL directives during skip/trace/step modes activated by (Ctrl+)F5/F7/F8 keys to maintain system stability. Subsequent updates restored certain skip functionalities to recover from invalid SHELL parameters. If skipping CONFIG.SYS processing finds no valid shell specified, users must provide a shell filename before loading COMMAND.COM.

CONFIG.SYS size limitations differ: MS-DOS/PC DOS restrict file size to several kilobytes (up to 64 KB in later versions), whereas DR-DOS imposes virtually no size constraints due to its line-by-line parsing rather than tokenization. This method facilitates precise sequencing of driver and TSR loading via DEVICE and INSTALL, enabling resolution of load order conflicts and integration of non-resident software within CONFIG.SYS execution.

The length of the SHELL directive was restricted to 31 characters in MS-DOS/PC DOS versions 2.0 through 4.01 but expanded up to 128 characters in later editions. DR-DOS supports 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 or Windows environment, the files CONFIG.SYS and AUTOEXEC.BAT are renamed to CONFIG.DOS and AUTOEXEC.DOS respectively. This renaming process enables the system to support dual booting between Windows 9x and DOS. During a DOS boot, these files are temporarily switched back to CONFIG.SYS and AUTOEXEC.BAT. Additionally, backup copies of the Windows 95 versions are saved as CONFIG.W40 and AUTOEXEC.W40.

In configurations where Caldera DR-DOS 7.02 or 7.03 is installed alongside Windows 95, the Windows CONFIG.SYS and AUTOEXEC.BAT retain their original filenames. Meanwhile, DR-DOS utilizes separate startup files named DCONFIG.SYS and AUTODOS7.BAT for its boot process.

OS/2 and Windows NT

OS/2 relies heavily on CONFIG.SYS to set up drivers and environment variables prior to launching its graphical user interface. Within the OS/2 subsystem of Windows NT, the CONFIG.SYS settings are stored within the registry and presented as configuration data accessible to OS/2 applications.

Numerous CONFIG.SYS commands in OS/2 remain without official documentation. This configuration file continues to be employed by OS/2-based systems such as eComStation and ArcaOS.

See also

External links

  • AUTOEXEC.BAT and CONFIG.SYS details at Computer Hope
  • Overview of Windows 98 / MS-DOS 7.10 CONFIG.SYS directives (archived)
  • Caldera's CONFIG.SYS Command Reference (archived) – summary of DR-DOS 7 commands
  • FreeDOS CONFIG.SYS directives explained
  • PTS-DOS 2000 Pro User Manual – summary of CONFIG.SYS commands
  • Unofficial German PTS-DOS FAQ (archived) – comprehensive list of CONFIG.SYS directives
  1. ↑ Cite error: Invalid <ref> tag; no text was provided for refs named Paul_2000_CONFIG