Jump to content

CPU386+ (CONFIG.SYS directive)

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

CONFIG.SYS serves as the principal configuration file for the DOS and OS/2 operating system families. This plain text file, written in ASCII, 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 made its debut with DOS version 2.0.

Usage

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

CONFIG.SYS predominantly consists of name=value pairs that set adjustable parameters or load essential files such as device drivers and terminate-and-stay-resident programs (TSRs). This file is located in the root directory of the bootable drive.

The filename CONFIG.SYS is also utilized by (DCP), a version of MS-DOS developed by East-German manufacturer VEB Robotron.

Some DOS variants search for alternative configuration filenames that override CONFIG.SYS:

- Advanced versions of Concurrent DOS 386, Concurrent DOS XM, Multiuser DOS, and REAL/32 prioritize CCONFIG.SYS (derived from "Concurrent") instead of CONFIG.SYS. Certain Multiuser DOS editions employ CCONFIG.INI, while REAL/32 looks for MCONFIG.SYS. These platforms support extended configuration options stored in binary files like CCONFIG.BIN, which are generally edited using CONFIG.EXE.

- In DR DOS 3.31, PalmDOS 1.0, Novell DOS 7, and DR-DOS 7.x, the DCONFIG.SYS file (originating from "DR DOS") supersedes CONFIG.SYS. Initially designed for disk compression setups, it also facilitates multi-boot environments. OpenDOS 7.01 and DR-OpenDOS 7.02 use ODCONFIG.SYS, whereas some DR-DOS 7.02+ releases check for DRCONFIG.SYS.

- Starting with DR DOS 6.0, the command SYS /DR:ext enables customization of default extensions for system and configuration files, allowing multiple concurrent configurations managed by boot loaders such as LOADER in Multiuser DOS and DR-DOS 7.x.

- The SHELL directive permits specifying alternative AUTOEXEC.BAT files via /P[:filename.ext], and COMMAND.COM supports non-.BAT extensions in these cases; this functionality is also available in 4DOS.

- From DR DOS 6.0 onward, a CHAIN=filespec command allows continuation of configuration processing with files located outside the root directory; DR-DOS 7.02+ enhances this feature by adding an optional label parameter for targeted jumps within chained configurations.

- DR-DOS 7.03+ introduced the SYS /A option to copy matching CONFIG.SYS and AUTOEXEC.BAT files alongside system files during setup.

Other DOS variants offer comparable capabilities: FreeDOS utilizes FDCONFIG.SYS, RxDOS employs RXCONFIG.SYS, and PTS-DOS uses CONFIG.PTS.

In both Windows 95 and Windows 98, CONFIG.SYS and AUTOEXEC.BAT exist within the boot drive’s root directory but are generally left empty. In contrast, Windows Me does not process CONFIG.SYS at startup; instead, it retrieves environment variables from the Windows Registry at:

HKLM\System\CurrentControlSet\Control\SessionManager\Environment

Within the context of FlexOS, CONFIG.SYS is a binary file that specifies resource managers and device drivers 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>

:;*?!

Marks labels within CONFIG.SYS to serve as jump destinations for , , , , and directives.
Functions like , but also allows in-line comments following other commands. (Note that MS-DOS/PC DOS handles inline comments differently when enclosed in quotes.)
Used at the beginning of inline comments alongside the ; directive.
Prompts a Yes/No confirmation before executing subsequent CONFIG.SYS commands. (FreeDOS supports optional conditions via boot menus.)
Forces execution of the next CONFIG.SYS command without conditions.

ATemplate:NbndC

Determines whether programs can be terminated upon encountering errors.
Configures drives that maintain file access date stamps within FAT file systems.
Executes conditionally on AT-compatible hardware.
Manages boot loading processes.
Adjusts verbosity level of error messages.
Alters the default internal serial device driver assigned to the AUX port.
Restricts availability of character devices outside the virtual \DEV directory.
Loads fundamental device drivers into memory.
Produces a brief beep sound even if audible alerts are disabled.
Specifies which operating system to boot next.
Enables or disables extended Ctrl+C interrupt checking.
Defines the number of disk buffers to allocate.
Explicitly loads buffers into High Memory Area or Upper Memory Blocks.
Sets the maximum count of cache blocks allocated from the system pool.
Defines the maximum idle time before unused cache blocks are returned to the system pool.
Specifies maximum duration before dirty cache blocks are flushed to disk.
Loads programs during CONFIG.SYS processing and runs them in the foreground, pausing further processing until completion.
Sets keyboard Caps Lock status on or off.
Identifies the name of the CD-ROM hardware driver.
Determines the number of buffers used for CD-ROM access.
Continues processing CONFIG.SYS from a new file or label reference.
Defines the type of system clock used.
Clears the display screen.
Specifies one or more OEM codepages.
Sets CMOS RAM address values.
{ { nobold |(PTS-DOS only) }}
Configures colors used in the boot menu interface.
{ { mono | COM[1-4] }} { { nobold |(DR-DOS 7.02+) }}
Sets quantity, sequence, I/O addresses, and timeout values for COM ports.
{ { mono | COMAREA }} { { nobold |(PTS-DOS only) }}
Specifies DMA buffer settings.
{ { mono | COMMENT }} { { nobold |(DOS 4.0+, RxDOS, ignored by DR-DOS 7.02+, Embedded DOS, PTS-DOS) }}
Redefines characters initiating inline comments or causes subsequent lines to be ignored.
{ { mono | 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 | CPOS }} { { nobold |(DR DOS 6.0+) }}
Establishes cursor position for configuration menus on screen.
{ { mono | CPSW }} { { nobold |(MS-DOS 4.00-4.01, ignored in DR-DOS 7.02+) }}
Provides support for codepage switching functionality.
Executes conditionally based on specific CPU types (applicable to PTS-DOS and DR-DOS variants).

DTemplate:NbndF

Adjusts relocation settings for drive descriptor tables.
Defines memory segment address used for multi-sector disk data deblocking processes.
Enables support for an internal debugger environment.
Controls boot management functions.
Loads device drivers into conventional memory space.
Loads device drivers into upper memory areas (equivalent to in DRDOS 5.0).
Sets country and codepage parameters for keyboard, screen, and printer devices (KBD, SCR, LPT).
Configures sizes allocated for cache memory usage.
Sets compatibility mode parameters for floppy disks.
Selects display font settings.
Manages loading DOS into high memory and/or utilizing upper memory blocks.
Loads DOS system tables such as BUFFERS, FCBS, FILES, LASTDRIVE, STACKS into upper memory area.
Specifies alternate search paths for DOS files during operation.
Defines search paths used for data files.
Provides parameters describing physical disk drive characteristics.
Establishes settings for unrecognized or unknown drives.
See .
Enables PDUMP.nnn error logging and assigns drive location for logs storage.
Outputs messages directly to the display screen.
Displays messages including ANSI escape sequences for formatting purposes.
Activates additional verification checks when launching programs.
Assigns assumed error or return codes to subsequent commands executed.
Controls A20 line gate state when initiating a program execution cycle.
Terminates CONFIG.SYS processing prematurely (except under certain conditions involving SWITCHES and SHELL directives).
Sets hash table size used to accelerate file opening operations, differing from MS-DOS/PC DOS FASTOPEN driver behavior.
Defines number of cached File Control Blocks (FCBs) allowed open simultaneously (shares buffer with FILES under DR-DOS).
Similar to FCBS but loads these into upper memory segments instead of conventional memory.
Boot management control directive.
Specifies maximum number of files that can be opened concurrently by the system.
Equivalent to FILES but loads file handles into upper memory areas rather than conventional memory space.
Includes execution of designated subsections within CONFIG.SYS (refer to IGNORE directive).

GTemplate:NbndI

Waits for a key press or timeout, setting 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 specified label, returning afterward to the previous point.
Refer to , , or for additional details.
Consult for further information.
See for related commands.
Refer to or for more context.
See or for related functions.
Consult for additional guidance.
Loads a TSR program into memory following DOS data segment relocation. Compare with INSTCDEX.
See , , or for further reference.
Refer to for related instructions.
See or for additional commands.
Activates console and command line history buffers, including extended pattern searching capabilities.
Defines the address of the High Memory Area (HMA) segment.
Sets the HLT instruction energy-saving mode configuration.
Performs boot sector virus detection.
Loads installable file system drivers.
Prevents execution of specific subsections within CONFIG.SYS.
Grants selected programs permission to operate at ring 2, allowing direct hardware input/output access.
Includes directives from another menu block, emulated through GOSUB/RETURN in DR-DOS environments.
Sets the status of the keyboard Insert mode.
Loads a TSR program into memory.
Installs a TSR into upper memory, equivalent to HIINSTALL in DR DOS version 5.0.
Loads TSR after relocating the DOS data segment. Compare with INSTCDEX.
Rotates Programmable Interrupt Controller (PIC) interrupt priorities to prioritize a specified IRQ number.

KTemplate:NbndM

Defines the keyboard layout configuration.
Specifies the location of the relocated keyboard buffer in memory.
Sets the maximum number of accessible drive letters.
Similar to LASTDRIVE but additionally loads the Current Directory Structure into upper memory.
Specifies search paths for Dynamic Link Libraries (DLLs).
Manages backward compatibility for legacy software applications.
Configures the permitted number of file locks.
Controls boot logo display and startup message settings.
Defines parameters such as count, order, I/O port address, and timeout values for the LPT1 printer device.
Configures LPT2 device settings similarly to LPT1.
Applies similar configuration parameters to LPT3 device.
Enables and sets up LPT4 printer device support.
Determines wait time before boosting priority for processes in wait state.
Sets memory allocation policies and strategies used by DOS.
Establishes default DOS memory allocation behavior.
Defines available menu options within CONFIG.SYS menus.
Specifies menu color schemes, with emulation support under DR-DOS systems.
Sets the default active menu block, emulatable under DR-DOS environments.
Defines various menu blocks, also emulated by DR-DOS systems.
Enables multitrack disk drive operations support.
Continues processing CONFIG.SYS from an external file, optionally loading a device driver and setting %NEWFILE% environment variable.

NTemplate:NbndQ

Specifies the default character representing "No" in Yes/No/Resume prompts (No () character).
Controls keyboard Num Lock status, enabling or disabling it at startup.
Enables conditional command execution based on the last error code, such as .
Displays a message and waits for a key press, similar in behavior to and commands in DR-DOS systems.
Requires user confirmation when errors occur during CONFIG.SYS processing.
Sets buffer sizes used by LPT (parallel) ports.
Allows conditional command execution specifically on PC-compatible hardware platforms.
Configures scheduler priority settings for processes and tasks.
Assigns priority levels specifically for disk I/O-related programs.
Changes default printer device driver assignment among LPT1 through LPT4 ports.
Determines whether DOS programs are permitted to execute in the current environment.
Loads a user interface shell program during startup sequences.
Enables conditional execution exclusively on IBM PS/1-compatible machines.
Allows conditional execution only on IBM PS/2-compatible systems.
Suppresses output sent to standard output (STDOUT).

RTemplate:NbndT

Activates automatic system reboot upon encountering errors.
Inserts annotations within CONFIG.SYS file.
Allocates drive letters for local block device drivers.
Defines the default character for Resume () prompts in Yes/No/Resume dialogs.
Returns control from nested CONFIG.SYS processing to the previous GOSUB or SWITCH point, optionally passing a return code.
Sets the size of real mode memory.
Allows simultaneous loading of programs in CONFIG.SYS, akin to CALL or INSTALL commands in DOS.
Determines whether the first character of deleted files is stored in the FAT reserved area.
Specifies video mode settings under FreeDOS or screen access methods for PTS-DOS.
Controls the Scroll Lock key status on the keyboard (on/off).
Establishes environment variables.
Loads the command interpreter shell.
Similar to SHELL but includes a size parameter to allocate COMMAND.COM in HMA or UMBs, enhancing memory efficiency with third-party shells.
Sets keyboard modifier states such as Shift Lock, Num Lock, Scroll Lock, and Insert mode.
Configures whether files are closed upon pressing Ctrl+Alt+Del.
Determines if POST is bypassed during reboot sequences.
Acts as a compatibility placeholder due to reentrant design modifications in DR DOS versions.
Specifies the count of hardware interrupt stacks.
Defines the default stack size for newly created threads.
Functions like STACKS but allocates buffers within upper memory areas.
Configures boot manager settings.
Reserved for internal system use.
Manages behavior of the XMS A20 gate.
Defines submenu blocks emulated via CLS, ECHO, and SWITCH commands under DR-DOS.
Redirects error information logging to a specified drive instead of displaying popups.
Sets the location path for swap files.
Enables conditional continuation of nested CONFIG.SYS processing based on key input, with RETURN returning control to the prior point.
Establishes the default switch character used by the system (either '/' or '-').
Specifies special options influencing system operation.
Enables a fix addressing FPU rounding errors.
Indicates an alternative DOS system file for booting purposes.
Configures memory addresses for DOS components.
Loads the system from an alternate disk area.
Defines the size of dynamic system memory pool allocation areas.
Loads DOS data and code into upper memory blocks (UMBs).
Specifies how many threads can run concurrently as managed by the OS scheduler.
Sets timeout intervals for CONFIG.SYS commands such as SWITCH and GETKEY, along with default responses to prompts.
Adjusts minimum and maximum time slices for the scheduler’s operation.
Defines file extensions used for temporary files created by the operating system.
Enables or disables single-step execution tracing during CONFIG.SYS and AUTOEXEC.BAT processing, with behavior varying across OS versions.
Determines the size of the TRACE log buffer utilized during debugging and tracing activities.
Records detailed error data related to system trap events.

UTemplate:NbndZ

Directs DOS management to utilize a specified segment as Upper Memory Block (UMB) space.
Sets which UMB server is employed by the system.
Identifies address ranges designated as UMB RAM areas.
Toggles disk write verification on or off.
Specifies the DOS version number reported to applications.
Controls VGA display status settings.
Defines current video mode similarly to FreeDOS’s SCREEN command.
Enables or disables virtual DMA usage capability.
Determines whether processor Virtual Mode Extensions (VME) are deactivated or enabled.
Configures VxD driver settings for Windows environments.
Manages overall Windows system support configurations.
Adjusts relocation parameters for the Extended BIOS Data Area (XBDA).
Enables conditional execution specifically on XT-compatible machines.
Configures built-in Year 2000 (Y2K) support features.
Sets default affirmative character used in Yes/No prompts.
Manages deletion tracking features.

Issues

The system is capable of booting even if CONFIG.SYS is absent or corrupted; however, this file, together with AUTOEXEC.BAT, is crucial for a full DOS initialization, allowing customization of the operating system and loading necessary software components. If either file is damaged, troubleshooting becomes essential.

When CONFIG.SYS does not contain a SHELL directive or is missing/corrupted, DOS attempts to locate COMMAND.COM in the root directory of the boot drive. Earlier DOS versions (prior to 6.0) will fail to boot if COMMAND.COM is not found. In contrast, MS-DOS 6.0/PC DOS 6.1 and Novell DOS 7 and later display a prompt requesting the path to a command processor. This recovery prompt also appears if COMMAND.COM terminates unexpectedly or exits early, offering a limited shell replacement without requiring a reboot.

COMMAND.COM from MS-DOS 7.0 and above is not compatible with DR-DOS but often resides in the C:\ directory within dual-boot configurations. Starting with DR-DOS 7.02, skipping or tracing through SHELL directives using Ctrl+F5/F7/F8 is disabled to improve system stability. Subsequent DR-DOS releases reintroduced Ctrl+F6 to restore skip functionality, aiding recovery from invalid shell parameters. If no valid SHELL directive is found during these modes, users are prompted to enter an appropriate shell filename before COMMAND.COM loads from the root.

CONFIG.SYS size restrictions differ: MS-DOS and PC DOS limit the file size to a few kilobytes (up to 64 KB in later versions), whereas DR-DOS imposes no specific size limitation aside from filesystem constraints. MS-DOS processes CONFIG.SYS by tokenizing it into memory and then executing directives in a fixed sequence—device drivers first, followed by TSRs. Conversely, DR-DOS interprets directives sequentially line-by-line, enabling precise management of driver and TSR loading order through DEVICE and INSTALL commands. This approach allows resolution of load conflicts and supports conditional execution based on hardware presence, key presses, error states, or software return codes. Furthermore, INSTALL facilitates launching non-resident programs integrated within the CONFIG.SYS processing flow.

The maximum length for SHELL lines was limited to 31 characters in MS-DOS/PC DOS versions 2.0 through 4.01 but expanded to 128 characters in later releases; DR-DOS supports up to 255 characters. CONFIG.SYS directives do not accommodate long filenames.

Dual booting DOS and Windows 9x

When Windows 95 is installed over an existing DOS or Windows environment, it renames CONFIG.SYS and AUTOEXEC.BAT as CONFIG.DOS and AUTOEXEC.DOS, enabling dual-boot functionality between Windows 9x and DOS. Upon booting into DOS mode, these files are temporarily restored under their original names. Backup copies of Windows 95 configuration files are saved as CONFIG.W40 and AUTOEXEC.W40.

In systems where Caldera DR-DOS versions 7.02 or 7.03 coexist with Windows 95, Windows’ CONFIG.SYS and AUTOEXEC.BAT remain unaltered. Instead, DR-DOS utilizes DCONFIG.SYS and AUTODOS7.BAT for its startup configuration.

OS/2 / Windows NT

OS/2 extensively depends on CONFIG.SYS for setting up drivers and environment variables prior to launching its graphical user interface.

Within the OS/2 subsystem embedded in Windows NT, CONFIG.SYS exists as a file accessible by OS/2 applications but is actually stored within the system registry.

There are several undocumented CONFIG.SYS directives specific to OS/2, which continues employing CONFIG.SYS in its successor systems such as eComStation and ArcaOS.

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
  • Details on FreeDOS CONFIG.SYS directives (archived)
  • PTS-DOS 2000 Pro User Guide featuring CONFIG.SYS directives (archived)
  • German-language unofficial PTS-DOS FAQ (PTS/FAQD) with extra CONFIG.SYS directives (archived)