Jump to content

MEMORY (CONFIG.SYS directive)

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

CONFIG.SYS serves as the chief configuration file for DOS and OS/2 operating systems. This file, formatted in ASCII text, contains setup instructions that the operating system's DOS BIOS—commonly found in IBMBIO.COM or IO.SYS—interprets during the boot sequence. CONFIG.SYS was first introduced with DOS version 2.0.

Usage

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

Typically, this file consists of name=value pairs that either establish system parameters or load files such as device drivers and terminate-and-stay-resident programs (TSRs). CONFIG.SYS is located in the boot drive's root directory.

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

Certain DOS variants prioritize alternative configuration filenames over CONFIG.SYS:

Concurrent DOS 386, Concurrent DOS XM, Multiuser DOS, System Manager, and REAL/32 search for CCONFIG.SYS (derived from "Concurrent") instead of CONFIG.SYS. Multiuser DOS may alternatively use CCONFIG.INI, while REAL/32 looks for MCONFIG.SYS. These platforms support additional configuration data stored in binary files like CCONFIG.BIN, which are generally modified through CONFIG.EXE.

In versions such as DR DOS 3.31, PalmDOS 1.0, Novell DOS 7, OpenDOS 7.01, and DR-DOS 7.02 and later, DCONFIG.SYS (with "D" standing for DR DOS) takes precedence over CONFIG.SYS. Originally associated with disk compression utilities, it also enables multiple configuration profiles within multi-boot environments. OpenDOS 7.01 and DR-OpenDOS 7.02 also check for ODCONFIG.SYS, while some DR-DOS 7.02+ editions recognize DRCONFIG.SYS.

Starting with DR DOS 6.0, the SYS /DR:ext command permits altering default system file extensions to maintain parallel sets of system files in a single root directory, selectable via boot loaders like LOADER included with Multiuser DOS and DR-DOS versions 7.02/7.03. The SHELL instruction supports specifying alternate AUTOEXEC.BAT files through /P[:filename.ext], with COMMAND.COM accepting extensions beyond ".BAT" (a capability also offered by 4DOS). Additionally, the CHAIN=filespec directive enables continuation of processing within another file that need not reside in the root directory; DR-DOS 7.02+ extends this functionality by allowing a label parameter for targeted jumps inside configuration files.

From version 7.03 onward, DR-DOS introduces a SYS /A option to copy associated CONFIG.SYS and AUTOEXEC.BAT files alongside system files.

FreeDOS includes a comparable configuration file named FDCONFIG.SYS, whereas RxDOS utilizes RXCONFIG.SYS, and PTS-DOS employs CONFIG.PTS.

In Windows 95 and Windows 98, both CONFIG.SYS and AUTOEXEC.BAT exist in the boot drive’s root directory but typically remain unpopulated. Windows Me does not process CONFIG.SYS during startup; instead, it loads environment variables directly from the Windows Registry at:

HKLM\System\CurrentControlSet\Control\SessionManager\Environment

Within FlexOS, CONFIG.SYS is a binary configuration file that specifies resource managers and device drivers to be loaded at 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>

:;*?!

Marks labels within CONFIG.SYS to serve as jump targets for , , , , and commands.
Functions similarly to , but also allows inline comments following other CONFIG.SYS directives. (Note: MS-DOS/PC DOS does not ignore inline comments enclosed in double quotes.)
Used at the beginning of inline comments alongside the ; directive.
Prompts a Yes/No confirmation with an optional message before executing subsequent CONFIG.SYS commands. (FreeDOS supports conditional boot menus but lacks optional message capability.) DOS version 6.0 and later provide a comparable feature by appending after the directive (e.g., ).
Forces unconditional execution of the next CONFIG.SYS command.

ATemplate:NbndC

Determines whether programs can be aborted upon encountering errors.
Specifies which drives record file access timestamps in FAT file systems.
Enables conditional execution on AT-compatible hardware.
Acts as a boot manager.
Adjusts the verbosity level of error messages.
Changes the default serial port driver (COM1 through COM4) assigned to the AUX device.
Prevents character devices from being accessible outside the phantom \DEV directory.
Loads a base device driver into memory.
Produces a beep sound even if notification switches are disabled.
Defines the operating system to boot next.
Enables or disables extended Ctrl+C checking.
Sets the number of disk buffers allocated.
Similar to BUFFERS but loads buffers into High Memory Area or Upper Memory Blocks.
, ,
Configure cache block allocation, time-to-live, and flushing intervals.
Runs programs within CONFIG.SYS in the foreground, halting further processing until completion.
Sets keyboard Caps Lock state to on or off.
,
Defines CD-ROM driver name and buffer quantity.
Continues processing of CONFIG.SYS from another file or label.
, , , etc., configure system clock type, screen clearing behavior, and OEM codepages respectively (varies by OS).
, ...,
Specify count, order, I/O address, and timeout settings for COM ports.
, etc., redefine comment characters or cause lines to be ignored depending on OS variations.
Activates and configures international language support.
CPU-specific directives such as CPU88, CPU386, CPU486 enable conditional execution based on processor type (applicable in PTS-DOS and DR-DOS).

DTemplate:NbndF

Controls relocation of drive descriptor tables in memory.
Sets memory segment address used for multi-sector disk data deblocking.
Enables support for an internal debugger.
Functions as a boot manager.
Loads device drivers into conventional memory.
Loads device drivers into upper memory blocks (equivalent to in DR-DOS 5.0).
Configures country code and codepage settings for keyboard, screen, and printer devices.
Defines cache memory sizes for improved performance.
Specifies floppy disk compatibility mode settings.
Selects display font used by DOS.
Controls loading of DOS components into high or upper memory areas (similar to in DR-DOS 5.0).
Loads DOS tables such as BUFFERS, FCBS, FILES, LASTDRIVE, STACKS into upper memory blocks.
Specifies an alternate directory path for DOS system files.
Sets search paths for data files used by DOS applications.
Defines physical parameters for disk drives.
Configures parameters for unrecognized drives.
See .
Enables error log creation and selects drive location for PDUMP.nnn files.
Displays messages on the screen during processing.
Displays messages with ANSI escape sequences enabled.
Determines whether additional checks occur when launching programs.
Sets assumed error or return codes for subsequent commands.
Configures A20 gate state when starting programs to control memory access above 1MB.
Terminates processing of CONFIG.SYS early except for SWITCHES and SHELL directives under certain conditions.
Adjusts hash table size used for accelerating file open operations, differing from MS-DOS FASTOPEN driver behavior.
Sets maximum number of cached File Control Blocks open simultaneously (shares buffer with FILES under DR-DOS).
Similar to FCBS but explicitly loads these into upper memory blocks.
Functions as a boot manager utility.
Defines maximum number of files that can be open concurrently.
Similar to FILES but explicitly 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 code of the key or 1024 if timed out.
Resumes processing of CONFIG.SYS at a designated label.
Continues nested CONFIG.SYS execution at a specified label, then returns to the previous point.
Refer to , , or for additional details.
See also .
Consult for further information.
Refer to or as needed.
See or for related commands.
Refer to .
Loads a terminate-and-stay-resident (TSR) program into memory following DOS data segment relocation. Compare with INSTCDEX.
See , , or for more options.
Consult for further reference.
Refer to or as applicable.
Activates console and command line history buffer with advanced pattern search capabilities.
Defines the address of the High Memory Area (HMA) segment.
Configures power-saving settings for the HLT instruction.
Specifies system checks for boot sector virus detection.
Loads installable file system drivers.
Prevents execution of selected CONFIG.SYS subsections.
Permits programs to execute at ring 2, enabling direct hardware I/O access.
Includes directives from an alternate menu section (simulated by GOSUB/RETURN in DR-DOS).
Sets the keyboard Insert mode status.
Installs a TSR program into memory.
Loads TSR programs into upper memory, equivalent to HIINSTALL in DR DOS 5.0.
Installs TSR after relocating the DOS data segment. Compare with INSTCDEX.
Adjusts PIC interrupt priorities to assign highest priority to a specified IRQ.

KTemplate:NbndM

Defines the keyboard layout configuration.
Specifies an alternate location for the relocated keyboard buffer.
Sets the maximum number of accessible drive letters.
Similar to LASTDRIVE but loads Current Directory Structure into upper memory area.
Lists paths for DLL file searches.
Manages loading of legacy applications.
Determines the number of allowable file locks.
Enables boot logo support when using PTS-DOS boot manager.
Configures parameters such as count, sequence, I/O address, and timeout for LPT1 port.
Applies similar configuration settings to LPT2 port.
Configures LPT3 port in a comparable manner.
Enables and sets parameters for LPT4 port operation.
Sets delay before elevating process priority during wait states.
Defines strategy for memory allocation management.
Specifies default DOS memory allocation method.
Establishes menu option definitions.
Sets menu color schemes (can be emulated under DR-DOS).
Assigns default menu block (emulatable under DR-DOS).
Defines individual menu blocks (emulatable under DR-DOS).
Enables support for multitrack disk operations.
Continues CONFIG.SYS processing from another file, optionally loading a driver and setting %NEWFILE% environment variable.

NTemplate:NbndQ

Sets default response character for No () in Yes/No/Resume prompts.
Toggles keyboard [[Num Lock|Template:Keypress]] state on or off at startup.
Enables conditional execution based on previous error code, e.g., .
Displays a message and waits for key input, similar to DR-DOS commands and .
Requires user confirmation when errors occur in CONFIG.SYS processing.
Configures buffer size settings for LPT ports.
Enables conditional execution on PC-compatible hardware platforms.
Sets scheduler priority levels.
Assigns priority to disk I/O related programs.
Changes default printer device driver assignment (for example, switching from LPT1 to LPT3 or LPT4).
Controls whether DOS applications are permitted to run.
Loads a user interface shell environment.
Conditional execution on IBM PS/1 compatible systems.
Conditional execution on IBM PS/2 compatible systems.
Suppresses output display sent to standard output (STDOUT).

RTemplate:NbndT

Activates automatic system reboot upon encountering errors.
Permits inclusion of comments within CONFIG.SYS.
Allocates drive letters reserved by local block device drivers.
Defines the default character used for Resume () prompts in Yes/No/Resume queries.
Returns nested CONFIG.SYS processing control to the previous GOSUB or SWITCH statement, optionally passing a return code.
Sets the size of real mode memory available.
Executes programs in CONFIG.SYS simultaneously in the background, similar to DOS's INSTALL command.
Saves the initial character of deleted files within the FAT reserved area.
Determines video mode settings under FreeDOS or screen access methods under PTS-DOS.
Controls the keyboard’s Scroll Lock key status, enabling it on or off.
Establishes environment variables for the system.
Loads the command interpreter shell.
Functions like SHELL but supports a SIZE parameter to pre-allocate COMMAND.COM in HMA or UMBs, reducing fragmentation.
Specifies keyboard modifier states such as Shift Lock, Num Lock, Scroll Lock, and Insert mode.
Defines whether files are closed upon pressing Ctrl+Alt+Del.
Skips Power-On Self-Test (POST) during reboot sequences.
, STACKSIZE, STACKSHIGH
Configure stack size parameters across multiple DOS versions with some compatibility nuances.
, SYSBOOT, SYSGEN, SYSLOAD, SYSTOUMB
PTS-DOS-specific commands managing boot options, system memory locations, and loading into upper memory blocks (UMBs).
, SUPPRESSPOPUPS, SWAPPATH
Directives specific to certain operating systems controlling menu block behavior, error popup suppression, and swap file path settings.
, SWITCHES, SWITCHAR
Govern conditional processing flow in CONFIG.SYS and define the default switch characters ('/' or '-') across different DOS variants.
, THREADS, TIMESLICE
OS/2-specific directives managing floating-point unit bug fixes, thread concurrency limits, and scheduler time slices respectively.
, TRACE, TRACEBUF
Handle CONFIG.SYS execution timeout settings, enable single-step debugging, and configure trace buffer sizes primarily in DR-DOS, PTS-DOS, and OS/2 environments.
, TRAPDUMP
PTS-DOS and OS/2 directives specifying temporary file extensions and detailed error logging options.

UTemplate:NbndZ

Assigns a specific segment to be used as an Upper Memory Block (UMB) by DOS.
Selects which UMB server will be utilized.
Defines address ranges designated as UMB RAM areas.
Enables or disables verification of disk writes.
Sets the DOS version number reported to applications.
Configures VGA display status parameters.
Specifies current video mode settings similar to FreeDOS’s SCREEN directive.
Determines whether virtual DMA is permitted for use.
Enables or disables the processor’s Virtual Mode Extensions (VME).
Configures VxD drivers for Windows environments.
Sets system support options for Windows compatibility.
Manages relocation of the Extended BIOS Data Area (XBDA).
Allows conditional execution on XT-compatible machines only.
Enables built-in Year 2000 compliance support features.
Sets the default character used for Yes responses in prompts.
Configures file deletion tracking functionality.

Issues

Although the system can initiate booting without CONFIG.SYS or AUTOEXEC.BAT files present, these files are crucial for comprehensive customization and satisfying software prerequisites during startup. If these files become damaged or corrupted, troubleshooting is necessary.

In cases where CONFIG.SYS lacks a SHELL directive or if this file is missing or 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. However, MS-DOS 6.0/PC DOS 6.1 and Novell DOS 7 and later versions prompt users to specify an alternative command processor path. This prompt also appears if the primary command interpreter terminates unexpectedly or exits voluntarily, offering a limited runtime shell replacement without requiring a reboot.

COMMAND.COM from MS-DOS version 7.0 onward is incompatible with DR-DOS but is commonly found in drive C:'s root directory within dual-boot configurations. Starting with DR-DOS 7.02+, SHELL directives are enforced during skip/trace/step modes to prevent bypassing them. This enforcement improves stability when invalid shell arguments are encountered. If no valid SHELL directive is detected during skip modes, users must manually enter a shell filename before COMMAND.COM loads.

The maximum size of CONFIG.SYS is restricted to several kilobytes—up to 64 KB—in MS-DOS/PC DOS environments but remains unrestricted under DR-DOS due to differing processing approaches: MS-DOS compiles directives into tokenized form and processes device drivers prior to TSRs. Conversely, DR-DOS interprets each directive line sequentially, allowing precise control over load order and conditional execution based on hardware detection or error conditions. This approach facilitates integration of temporary external utilities via INSTALL, enhancing system configurability.

MS-DOS/PC DOS versions from 2.0 through 4.01 limit SHELL command lines to a maximum of 31 characters. Later releases permit up to 128 characters, whereas DR-DOS allows 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 on a system already running DOS or an earlier Windows version, the files CONFIG.SYS and AUTOEXEC.BAT are renamed to CONFIG.DOS and AUTOEXEC.DOS respectively. This renaming supports dual boot functionality, allowing users to switch between Windows 9x and DOS environments. During a DOS boot, these renamed files are temporarily reverted to their original filenames. Additionally, backup copies of the Windows 95 configuration files are saved as CONFIG.W40 and AUTOEXEC.W40.

In configurations where Caldera DR-DOS 7.02 or 7.03 coexists with Windows 95, the Windows CONFIG.SYS and AUTOEXEC.BAT remain intact. Instead, DR-DOS utilizes alternative startup scripts named DCONFIG.SYS and AUTODOS7.BAT.

OS/2 / Windows NT

The OS/2 operating system extensively uses CONFIG.SYS for setting up system parameters, loading device drivers, and defining the environment prior to launching its graphical user interface.

Within the OS/2 subsystem found in Windows NT, the file that OS/2 applications recognize as CONFIG.SYS is actually controlled through the system registry rather than a physical file.

There are several CONFIG.SYS commands for OS/2 that have not been officially documented but continue to be supported by its successors, including eComStation and ArcaOS.

See also

External links

  • AUTOEXEC.BAT and CONFIG.SYS details at Computer Hope
  • Explanation of Windows 98 / MS-DOS 7.10 CONFIG.SYS directives (archived)
  • Caldera's CONFIG.SYS Command Reference (archived) – overview of DR-DOS 7 directives
  • Overview of FreeDOS CONFIG.SYS directives
  • PTS-DOS 2000 Pro User Manual with CONFIG.SYS directives summary
  • German-language unofficial PTS-DOS FAQ (2004) including additional CONFIG.SYS directives