Jump to content

CPU286+ (CONFIG.SYS directive)

From Alfawiki
Adapted from the English Wikipedia article CPU286+ (CONFIG.SYS directive), available under CC BY-SA 4.0Updated 9 August 20254 sources
CONFIG.SYS
Company typeConfiguration file
IndustryComputer software
Founded1983 (with DOS version 2.0)
ProductsSystem configuration for DOS and OS/2

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

Usage

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

Primarily, this file includes name=value instructions that either define system parameters or load components such as 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.

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

Certain DOS derivatives check for alternative configuration filenames that take precedence over CONFIG.SYS:

Concurrent DOS 386, Concurrent DOS XM, Multiuser DOS, and REAL/32 utilize CCONFIG.SYS or CCONFIG.INI (the latter in Multiuser DOS) instead of CONFIG.SYS. REAL/32 also scans for MCONFIG.SYS. These platforms accommodate supplementary configuration data stored in binary files such as CCONFIG.BIN, which can be modified using CONFIG.EXE.

In versions like DR DOS 3.31, PalmDOS 1.0, Novell DOS 7, OpenDOS 7.01, and DR-DOS 7.02 and later, DCONFIG.SYS overrides CONFIG.SYS. This naming convention facilitates compatibility with disk compression utilities and multi-boot configurations. OpenDOS 7.01 and DR-OpenDOS 7.02 additionally recognize ODCONFIG.SYS, while some DR-DOS releases look for DRCONFIG.SYS.

Starting with DR DOS 6.0, the SYS /DR:ext command allows customization of default file extensions, enabling multiple distinct sets of system files to coexist within a single root directory; these can be selected via boot loaders such as LOADER (used alongside Multiuser DOS and DR-DOS 7.x). The SHELL directive supports specifying alternative AUTOEXEC.BAT files using /P[:filename.ext], and COMMAND.COM can handle extensions other than .BAT in these instances.

From DR-DOS 6.0 onward, the CHAIN=filespec directive permits continuation of processing another configuration file that does not have to reside in the root directory; versions 7.02 and above introduce optional label parameters for jumping to specific locations within these files. DR-DOS 7.03 and later also provide a SYS /A option to copy both CONFIG.SYS and AUTOEXEC.BAT along with system files.

FreeDOS provides a comparable feature through the use of FDCONFIG.SYS. Similarly, RxDOS version 7.24 and newer utilizes RXCONFIG.SYS, while PTS-DOS employs CONFIG.PTS.

Within Windows 95 and Windows 98 boot drives, both CONFIG.SYS and AUTOEXEC.BAT are present but usually contain no commands. Windows Me does not process CONFIG.SYS during startup; instead, it loads environment variables from the Windows Registry at:

HKLM\System\CurrentControlSet\Control\SessionManager\Environment

In the case of FlexOS, CONFIG.SYS is a binary configuration file defining resource managers and device drivers that are loaded during system initialization.

Example

Below is a sample CONFIG.SYS file for MS-DOS version 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 , also utilized for inline comments following directives. (In MS-DOS/PC DOS, inline comments enclosed in quotes are not ignored.)
Introduces inline comments alongside the ; directive.
Presents a Yes/No prompt to confirm execution of subsequent CONFIG.SYS commands.[1] (FreeDOS does not support optional messages but allows conditional operations with boot menus.) DOS versions 6.0 and later support a comparable feature by appending after directives (e.g., ).
Executes the following CONFIG.SYS directive without condition.

ATemplate:NbndC

Determines whether programs can be interrupted upon encountering errors.
Defines which drives maintain file access date stamps within FAT directory entries.
Enables conditional execution on AT-compatible systems.
Acts as a boot manager.
Adjusts verbosity level of error messages.
Changes the default serial device driver associated with the AUX device.
Prevents character devices from being accessible outside the phantom \DEV directory.
Loads the core device driver into memory.
Produces a beep sound even when notification sounds are disabled.
Specifies the operating system to load during next boot.
Enables or disables extended Ctrl+C checking functionality.
Sets the number of disk buffers to allocate.
Similar to BUFFERS but allocates buffers in HMA or UMB areas.
, , (Embedded DOS 6-XL exclusive)
Controls cache block allocation and flushing intervals.
Loads executable programs during CONFIG.SYS processing, pausing until they return control.
Sets the Caps Lock state on the keyboard.
, (PTS-DOS only)
Configures CD-ROM hardware drivers and buffer sizes.
Continues processing CONFIG.SYS from another file or label.
, , and other PTS-DOS-specific directives adjust system clock, screen clearing, and device-specific parameters.
(OS/2 only)
Defines OEM code pages used by the system.
, ..., (DR-DOS 7.02 and later)
Configures serial COM ports including count, order, I/O address, and timeout settings.
, used for inline commentary varies between DOS versions and is ignored in DR-DOS 7.02+ and Embedded DOS environments.
, activates internationalization support across various DOS versions and OS/2.

Additional CPU-specific conditional directives such as CPU88 or CPU386 enable tailoring CONFIG.SYS behavior based on processor type, optimizing configuration for particular hardware architectures.

DTemplate:NbndF

Adjusts relocation settings for drive descriptor tables.
Sets memory segment address used for multi-sector disk data deblocking operations.
Activates internal debugger capabilities.
Functions as a boot manager.
Loads a device driver into conventional memory.
Loads a device driver into upper memory blocks (similar to in DRDOS 5.0).
Configures country and codepage information for keyboard, screen, and printer devices.
Sets cache memory size parameters.
Defines compatibility mode for floppy disk drives.
Specifies display font settings.
Controls loading of DOS into high memory and/or utilization of upper memory areas.
Loads DOS tables such as BUFFERS, FCBS, FILES, LASTDRIVE, and STACKS into upper memory regions.
Specifies an alternative directory path for DOS system files.
Defines search paths for data files used by the system.
Establishes physical parameters for recognized disk drives.
Sets parameters for unrecognized or unknown drives.
See also .
Enables PDUMP.nnn error logging and specifies which drive to use for logs.
Outputs a message directly to the display screen.
Displays messages incorporating ANSI escape sequences for formatting.
Enables additional runtime checks when launching programs.
Sets an assumed error or return code for subsequent operations or commands.
Controls A20 line gating state upon program start-up.
Terminates CONFIG.SYS processing early except for certain allowed directives.
Configures hash table size used to accelerate file open operations, differing from MS-DOS/PC DOS FASTOPEN driver behavior.
Specifies number of cached File Control Blocks (FCBs); under DR-DOS, FCBS and FILES buffers are shared dynamically.
Similar to FCBS but explicitly loads FCBs into upper memory segments.
Acts as a boot manager component.
Sets maximum number of simultaneously open files allowed by the system.
Equivalent to FILES but explicitly loads file handles into upper memory areas.
Includes execution of specified CONFIG.SYS subsections (refer to IGNORE).

GTemplate:NbndI

Waits for a key press or timeout, assigning the error level to the ASCII value of the key or 1024 if timed out.
Resumes processing of CONFIG.SYS at a designated label.
Continues nested CONFIG.SYS processing at a given label, then returns to the previous location.
Refer to , , or for additional details.
See related commands , , and .
Consult for further information.
Reference or for more context.
Review or as needed.
Consult for additional insights.
Loads a TSR program into memory after relocating the DOS data segment. Compare with INSTCDEX.
See also , , and .
Refer to for further clarification.
See or for related functions.
Activates console and command line history buffer with enhanced pattern search capabilities.
Defines the HMA segment address.
Configures energy-saving mode using HLT instruction.
Enables checks for boot sector viruses.
Loads installable file system drivers.
Prevents execution of specified CONFIG.SYS subsections.
Permits certain programs to execute at ring 2, allowing direct hardware I/O access.
Includes directives from another menu block (simulated by GOSUB/RETURN in DR-DOS).
Sets the keyboard Insert mode status.
Loads a TSR program into memory.
Installs a TSR program in upper memory (equivalent to HIINSTALL in DR DOS 5.0).
Installs a TSR post DOS data segment relocation. Compare with INSTCDEX.
Adjusts PIC interrupt priorities to assign highest priority to a specified IRQ.

KTemplate:NbndM

Defines the keyboard layout configuration.
Specifies the address of the relocated keyboard buffer area.
Sets the maximum number of accessible drives.
Similar to LASTDRIVE but loads the Current Directory Structure into upper memory.
Lists DLL search paths.
Handles compatibility settings for legacy programs.
Specifies the number of file locks allowed.
Configures boot logo display when using PTS-DOS boot manager.
Sets parameters including count, logical order, I/O address, and timeout for LPT1 device.
Configures LPT2 device with similar parameters.
Applies similar configuration to LPT3 device.
Enables and configures LPT4 device functionality.
Determines wait time before elevating process priority.
Defines memory allocation policy settings.
Sets default DOS memory allocation strategy.
Defines available menu options.
Specifies menu color schemes (emulatable under DR-DOS).
Sets default menu block (emulatable under DR-DOS).
Defines individual menu blocks (emulatable under DR-DOS).
Enables multitrack disk operations support.
Continues CONFIG.SYS processing from a new file, optionally loading a driver and setting %NEWFILE% environment variable.

NTemplate:NbndQ

Sets default No () character used in Yes/No/Resume prompts.
Specifies status of keyboard [[Num Lock|Template:Keypress]] key at startup.
Enables conditional execution based on last error code (e.g., ).
Similar to and , displays text and waits for user key press.
Requires user confirmation to acknowledge errors during CONFIG.SYS processing.
Configures buffer sizes for LPT ports.
Enables conditional execution on PC-compatible systems.
Adjusts scheduler priority settings.
Sets priority levels for disk I/O programs.
Changes default printer driver (e.g., switching from LPT1 to LPT3 or LPT4).
Specifies whether DOS programs are allowed to run.
Loads the user interface shell program.
Enables conditional execution on IBM PS/1-compatible systems.
Enables conditional execution on IBM PS/2-compatible systems.
Suppresses output display sent to STDOUT.

RTemplate:NbndT

Activates automatic system reboot upon encountering errors.
Permits inclusion of comments within CONFIG.SYS (ignored by PTS-DOS).
Reserves a drive letter to prevent allocation by local block device drivers.
Sets the default character used for Resume () prompts in Yes/No/Resume queries.
Returns control from nested CONFIG.SYS processing to the prior GOSUB or SWITCH command, optionally passing a return code.
Specifies the size of real mode memory available.
Executes programs listed in CONFIG.SYS simultaneously in the background, similar to CALL or INSTALL commands in other DOS variants.
Stores the initial character of deleted files within a reserved FAT area.
Defines video mode for FreeDOS or screen access methods under PTS-DOS.
Configures keyboard Scroll Lock status.
Establishes environment variables.
Loads the command interpreter shell.
Functions like SHELL but includes a size parameter for preloading COMMAND.COM into HMA or UMBs, enhancing memory management with third-party shells.
Sets keyboard modifier states such as Shift Lock, Num Lock, Scroll Lock, and Insert mode.
Determines whether files close during a Ctrl+Alt+Del reboot sequence.
Bypasses POST during reboot operations.
, STACKSIZE, STACKSHIGH
Configure hardware interrupt stack sizes and buffer locations across various DOS systems, with some compatibility differences noted.
, SYSBOOT, SYSGEN, SYSLOAD, SYSTOUMB
PTS-DOS-specific commands controlling boot procedures, DOS memory layout, system loading into UMBs, and alternative boot methods.
, SWITCHES
Define submenu blocks or special options available in DOS 6.0 and later (some unsupported in DR-DOS or FreeDOS).
, SWAPPATH, THREADS, TIMESLICE
OS/2-specific settings managing error log suppression, swap file paths, thread concurrency levels, and scheduler time slice durations respectively.
, SWITCHAR
Manages nested CONFIG.SYS processing flow conditionally based on pressed keys and sets the default system switch character ('/' or '-').
, TRAPDUMP
OS/2 Warp fixes addressing FPU bugs and providing detailed error logging capabilities.
, TRACE
Sets timeouts for CONFIG.SYS commands including single-step execution control across different DOS versions with noted behavioral differences under OS/2.

UTemplate:NbndZ

Assigns a specific segment to be used as an Upper Memory Block (UMB) by DOS.
Defines the UMB server configuration.
Sets address ranges allocated for UMB RAM usage.
Enables or disables verification of disk writes.
Specifies the DOS version reported to applications.
Configures VGA display status parameters.
Indicates the current video mode similarly to FreeDOS's SCREEN directive.
Activates virtual DMA functionality.
Controls processor Virtual Mode Extensions (VME) settings.
Configures Windows VxD driver parameters.
Manages Windows system support features.
Relocates the Extended BIOS Data Area (XBDA).
Executes conditionally on XT-compatible hardware platforms.
Configures built-in Year 2000 compliance support.
Sets the default character used for Yes responses in prompts.
Controls deletion tracking mechanisms.

Issues

Although the system can initiate booting without CONFIG.SYS or AUTOEXEC.BAT files present, these files remain critical for comprehensive operating system customization and meeting software dependencies. Any corruption or damage to these files necessitates troubleshooting.

If CONFIG.SYS lacks a SHELL directive or is absent/corrupted, DOS attempts to locate COMMAND.COM in the root directory of the boot drive. Versions prior to 6.0 fail to boot if COMMAND.COM is missing. Starting with MS-DOS 6.0/PC DOS 6.1, Novell DOS 7, and subsequent versions prompt users to specify a command interpreter path when COMMAND.COM is unavailable or aborted. This mechanism also facilitates runtime replacement of the shell without requiring a reboot.

COMMAND.COM from MS-DOS 7.0 and later is incompatible with DR-DOS systems—common in dual-boot environments. DR-DOS version 7.02 and newer enforce SHELL directives during skip/trace/step modes to prevent conflicts. Later updates introduced recovery options for invalid shell arguments. When skipping CONFIG.SYS processing without a valid SHELL, users are prompted to provide a shell path before COMMAND.COM loads.

CONFIG.SYS file size restrictions vary by system: MS-DOS/PC DOS limit the file size to 64 KB, whereas DR-DOS imposes no explicit limit beyond file system constraints. MS-DOS processes CONFIG.SYS by compiling it into a tokenized format that enforces an order prioritizing device drivers before TSRs. In contrast, DR-DOS interprets directives sequentially line-by-line, allowing precise control over loading order using DEVICE and INSTALL commands—facilitating conflict resolution or debugger integration. It supports conditional execution flows based on hardware detection, key presses, error states, or return codes. The INSTALL directive also enables execution of non-resident programs within CONFIG.SYS processing.

The maximum length of the SHELL command line was restricted to 31 characters in MS-DOS/PC DOS versions 2.0 through 4.01 but expanded up to 128 characters in later releases. DR-DOS supports command lines up to 255 characters in length. Notably, CONFIG.SYS directives do not accommodate long filenames.

Dual Booting with DOS and Windows 9x

During the installation of Windows 95 on a system already running DOS or Windows, the files CONFIG.SYS and AUTOEXEC.BAT are renamed to CONFIG.DOS and AUTOEXEC.DOS to enable dual boot functionality between Windows 9x and DOS. When switching to DOS mode, these files are temporarily reverted to their original filenames. Meanwhile, the Windows 95 versions are backed up under the names CONFIG.W40 and AUTOEXEC.W40.

In configurations where Caldera DR-DOS 7.02/7.03 coexists with Windows 95, the Windows CONFIG.SYS and AUTOEXEC.BAT files remain untouched. Instead, DR-DOS relies on DCONFIG.SYS and AUTODOS7.BAT as its boot configuration files.

OS/2 and Windows NT

OS/2 makes extensive use of CONFIG.SYS to set up drivers and environment variables prior to launching its graphical user interface.

Within the OS/2 subsystem incorporated in Windows NT, the CONFIG.SYS file accessible to OS/2 applications is actually maintained within the system registry.

OS/2 includes a variety of undocumented CONFIG.SYS commands.[2]

CONFIG.SYS continues to play a vital role in OS/2-based systems like eComStation[3] and ArcaOS.[4]

See also

External links

  • Information on AUTOEXEC.BAT and CONFIG.SYS 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 directives
  • Guide to FreeDOS CONFIG.SYS directives
  • PTS-DOS 2000 Pro User Manual including CONFIG.SYS directives (archived)
  • German-language unofficial PTS-DOS FAQ (archived) – additional CONFIG.SYS commands
  1. ↑ Cite error: Invalid <ref> tag; no text was provided for refs named Paul_2000_CONFIG
  2. ↑ Cite error: Invalid <ref> tag; no text was provided for refs named Childs_1995_OS2
  3. ↑ Cite error: Invalid <ref> tag; no text was provided for refs named ecom_2001
  4. ↑ Cite error: Invalid <ref> tag; no text was provided for refs named ArcaOS_2020