Jump to content

COM3 (CONFIG.SYS directive)

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

CONFIG.SYS serves as the chief configuration file for DOS and OS/2 operating systems. This plain text file, encoded in ASCII, holds configuration commands that the DOS BIOS—commonly found in IBMBIO.COM or IO.SYS—interprets during system startup. CONFIG.SYS was first introduced with DOS version 2.0.

Usage

The directives within CONFIG.SYS are responsible for setting up DOS to manage hardware devices, software applications, and memory allocation. Once CONFIG.SYS has been processed, DOS initiates the command interpreter specified on the SHELL line; if this is missing, it defaults to COMMAND.COM, which subsequently runs AUTOEXEC.BAT.

Typically, the file consists of name=value pairs that either configure system parameters or load device drivers and terminate-and-stay-resident (TSR) utilities into memory. CONFIG.SYS is located in the root directory of the bootable drive.

Certain DOS variants prioritize alternative filenames over CONFIG.SYS:

- Advanced iterations of Concurrent DOS 386, Concurrent DOS XM, Multiuser DOS, System Manager, and REAL/32 look for CCONFIG.SYS or CCONFIG.INI, with additional configurations stored in a binary file named CCONFIG.BIN. These are generally managed through CONFIG.EXE.

- In DR DOS versions 3.31 onward, including PalmDOS 1.0 and Novell DOS 7, DCONFIG.SYS takes precedence. This supports scenarios such as multi-boot environments and disk compression where drive letters may be reassigned after loading compression drivers.

- OpenDOS 7.01 and DR-DOS 7.02 and later also recognize ODCONFIG.SYS or DRCONFIG.SYS. The SYS /DR:ext command enables customization of default configuration file extensions, allowing multiple system file sets to coexist in a single root directory and be selected via boot loaders like those provided with Multiuser DOS and DR-DOS.

- Enhanced options such as SHELL /P[:filename.ext] allow specifying alternate AUTOEXEC.BAT files. Additionally, the CHAIN=filespec[,label] directive facilitates continued processing of subsequent configuration files, enabling more versatile system configurations.

FreeDOS utilizes FDCONFIG.SYS, whereas RxDOS employs RXCONFIG.SYS. The PTS-DOS system uses CONFIG.PTS.

Although Windows 95 and 98 include CONFIG.SYS and AUTOEXEC.BAT on their boot drives due to their DOS heritage, these files are generally left blank. Windows Me does not process CONFIG.SYS during startup; instead, it retrieves environment variables directly from the Windows Registry.

In the case of FlexOS, CONFIG.SYS is a binary format file that specifies resource managers and device drivers that load during boot.

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 commands.
Functions similarly to , allowing inline comments following other directives. (Note that under MS-DOS/PC DOS, inline comments inside double quotes are not ignored.)
Also used to introduce inline comments alongside the ; directive.
Prompts the user with a Yes/No confirmation before executing the next directive(s). (FreeDOS does not support optional messages but offers conditional execution via boot menus.) Starting with DOS 6.0, similar functionality can be achieved by appending after directives.
Forces unconditional execution of the subsequent CONFIG.SYS instruction.

ATemplate:NbndC

Determines whether programs can be terminated upon encountering errors.
Sets drives to record file access timestamps within FAT file systems.
Enables conditional execution on AT-compatible hardware.
Boot management utility.
Adjusts the level of detail in error message reporting.
Changes the default serial port driver (COM1 through COM4) used by the AUX device.
Prevents character devices from being accessible outside the phantom \DEV directory.
Loads a fundamental device driver into system memory.
Produces a beep sound even if audible alerts are turned off.
Defines the operating system to boot next.
Enables or disables extended Ctrl+C interrupt checking.
Specifies the number of disk buffers to allocate for file operations.
Similar to BUFFERS but allocates buffers in HMA or UMB memory areas.
Maximum quantity of cache blocks dynamically allocated.
Maximum duration before idle cache blocks are returned to the system pool.
Maximum interval before dirty cache blocks are flushed to disk storage.
Executes programs listed in CONFIG.SYS, runs in the foreground, and pauses processing until completion.
Sets Caps Lock status on the keyboard either on or off.
Declares the name of the CD-ROM hardware driver.
Defines buffer quantity for CD-ROM data access.
Continues processing CONFIG.SYS commands from a new file and optionally from a specified label since DR-DOS 7.02.
Specifies the type of system clock used.
Clears the display screen.
Defines OEM codepage(s) used by the system.
Specifies CMOS RAM address location.
Sets color scheme for the boot menu interface.
Defines count, logical sequence, I/O port address, and timeout values for COM ports (introduced in DR-DOS 7.02+).
Buffer configuration for DMA operations (PTS-DOS).
Redefines characters initiating inline comments or causes subsequent lines to be ignored (behavior varies by OS).
Enables and configures internationalization support (implementation varies across operating systems).
, CPSW, CPU, CPU88+, CPU386+, CPU486+ Conditional directives based on CPU architecture or status (varies by OS).

DTemplate:NbndF

Controls relocation settings for drive descriptor tables in memory.
Specifies memory segment address for multi-sector disk data deblocking operations.
Activates support for an internal debugger utility.
Boot management tool.
Loads device drivers into conventional memory space.
Loads device drivers into upper memory blocks (equivalent to in DRDOS 5.0).
Configures country and codepage information for keyboard, screen, and printer devices.
Sets sizes for cache memory allocations.
Defines floppy disk compatibility mode settings.
Specifies font used for display output.
Controls loading of DOS into high or upper memory areas (similar to in DRDOS 5.0).
Loads DOS tables such as BUFFERS, FCBS, FILES, LASTDRIVE, and STACKS into upper memory regions.
Sets an alternate search path for DOS files.
Defines path for data file searches.
Specifies parameters for physical disk drives configuration.
Sets parameters applicable to unrecognized drive types.
Refer to .
Enables error logging with PDUMP.nnn files and assigns target drive location.
Displays a text message on screen output.
Displays messages incorporating ANSI escape sequences for formatting.
Adds extra verification steps when launching programs.
Defines an assumed error or return code for subsequent command executions.
Manages A20 line gating state during program startup routines.
Terminates CONFIG.SYS processing prematurely with certain exceptions applied.
Sets hash table size to optimize fast file open operations, differing from MS-DOS/PC DOS FASTOPEN driver implementation.
Specifies maximum cached File Control Blocks open concurrently (shares buffer space with FILES under DR-DOS).
Similar to FCBS but loads into upper memory areas instead of conventional memory.
Boot management utility function.
Sets maximum number of files that can be open simultaneously by the system.
Like FILES but loads file handles into upper memory segments rather than conventional memory.
Executes specific subsections within CONFIG.SYS files (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 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.
Consult for further information.
See for related commands.
Refer to or as needed.
See or for supplementary guidance.
Consult for more information.
Loads a TSR program into memory following relocation of the DOS data segment.
Refer to , , or for relevant instructions.
See for related usage.
Consult or for additional context.
Activates console and command line history buffer with enhanced pattern search capabilities.
Defines the address of the High Memory Area (HMA) segment.
Configures HLT instruction power-saving features.
Specifies whether to perform a virus check on the system boot sector.
Loads installable file system drivers.
Prevents execution of designated CONFIG.SYS subsections.
Grants certain programs direct hardware I/O access by modifying CPU privilege levels.
Incorporates directives from another menu block, emulated via GOSUB/RETURN in DR-DOS environments.
Sets the keyboard Insert mode status.
Loads a TSR program into memory.
Installs a TSR program into upper memory, equivalent to HIINSTALL in DR DOS 5.0.
Installs TSR after relocating the DOS data segment.
Adjusts PIC interrupt priorities to raise the priority of a specific IRQ.

KTemplate:NbndM

Defines the keyboard layout configuration.
Sets the address for the relocated keyboard buffer.
Determines the maximum number of accessible drives.
Functions like LASTDRIVE but loads Current Directory Structure (CDS) into upper memory.
Specifies paths for DLL searches.
Manages compatibility with legacy software applications.
Configures the number of file locks permitted.
Sets parameters for displaying the boot logo screen.
Defines count, sequence, I/O address, and timeout settings for LPT1 device operations.
Applies LPT1 settings similarly to LPT2 device configuration.
Mirrors LPT1 settings for LPT3 device use.
Enables and configures LPT4 printer port functionality.
Sets delay time before elevating process priority levels.
Controls memory allocation methods and strategies.
Specifies default memory allocation behavior in DOS environments.
Defines available menu options within CONFIG.SYS menus.
Sets color schemes for menus (emulation possible under DR-DOS).
Establishes default menu block settings (DR-DOS emulatable).
Defines individual menu blocks (emulatable in DR-DOS).
Enables support for multitrack disk operations during boot or runtime.
Continues CONFIG.SYS processing from an external file, optionally loading a driver and setting %NEWFILE% environment variable.

NTemplate:NbndQ

Sets default response character for No () in Yes/No/Resume prompts.
Controls keyboard [[Num Lock|Template:Keypress]] status—enabled or disabled at startup.
Enables conditional execution based on previous error codes, such as .
Displays a message and waits for user key press, similar to and commands in DR-DOS systems.
Requires user acknowledgment upon encountering errors within CONFIG.SYS processing.
Configures buffer sizes specifically for LPT1 through LPT3 printer ports.
Executes commands conditionally on PC-compatible hardware platforms.
Sets process scheduler priority levels within DOS environment.
Assigns priority levels to disk I/O intensive programs or processes.
Changes the default printer device driver from LPT1 through LPT4 as specified.
Controls whether DOS applications are permitted to run under current system settings.
Loads an alternative user interface shell during system initialization.
Executes commands conditionally on IBM PS/1-compatible machines only.
Executes commands conditionally on IBM PS/2-compatible systems exclusively.
Suppresses standard output display on STDOUT streams.

RTemplate:NbndT

Activates automatic system reboot upon encountering errors.
Permits inclusion of comments within CONFIG.SYS files.
Allocates drive letters for local block device drivers.
Defines the default Resume () character for Yes/No/Resume prompts.
Returns nested CONFIG.SYS processing to the previous GOSUB or SWITCH point, optionally with a return code.
Sets the size of real mode memory.
Executes multiple programs in CONFIG.SYS simultaneously, akin to CALL or INSTALL commands in DOS and OS/2.
Saves the initial character of deleted files within the FAT reserved section.
Determines video mode (FreeDOS) or screen access methods (PTS-DOS).
Controls the keyboard Scroll Lock state, enabling it on or off.
Establishes environment variables.
Loads the command interpreter shell.
Functions similarly to SHELL but includes a size parameter for relocating COMMAND.COM into HMA or UMBs to optimize memory utilization.
Specifies keyboard modifier key states such as Shift Lock, Num Lock, Scroll Lock, and Insert mode.
Defines whether files are closed during Ctrl+Alt+Del initiated reboot.
Skips POST during system reboot.
, STACKSIZE, STACKSHIGH
Manage hardware interrupt stack sizes and buffer allocation across various DOS versions, enhancing system efficiency and memory management.
, SYSBOOT, SYSGEN, SYSLOAD, SYSTOUMB
PTS-DOS commands that handle boot procedures, system loading addresses, and memory management for streamlined startup and operation.
, SWITCH, SWITCHES
Facilitate conditional processing within CONFIG.SYS and support submenu structures primarily in DOS 6.0+ and Novell DOS environments to allow adaptable system setups.
, SWAPPATH, THREADS, TIMESLICE
OS/2-specific directives managing error logs, swap file locations, concurrent thread execution, and scheduler time slices to improve multitasking and system reliability.
, TRACE, TRACEBUF
Control timeout intervals for CONFIG.SYS processing and enable single-step debugging features across DR-DOS, PTS-DOS, FreeDOS, and OS/2 platforms to enhance diagnostics and error resolution.
, TRAPDUMP
Defines temporary file extensions (PTS-DOS) and detailed error logging (OS/2) to assist with system maintenance and troubleshooting.

UTemplate:NbndZ

Assigns a particular segment for use as Upper Memory Block (UMB) memory by DOS.
Configures the UMB server settings.
Defines address ranges designated as UMB RAM.
Enables or disables verification of disk writes.
Specifies the DOS version reported to applications.
Adjusts VGA display status parameters.
Sets the current video mode configuration.
Determines whether virtual DMA is permitted.
Enables or disables processor Virtual Mode Extensions (VME).
Configures VxD drivers for Windows environments.
Sets system support options for Windows platforms.
Manages relocation settings for the Extended BIOS Data Area (XBDA).
Enables conditional execution on XT-compatible hardware.
Configures built-in support for Year 2000 compliance.
Defines the default affirmative response character in prompts.
Controls deletion tracking features.

Issues

Although the system can initiate booting without a CONFIG.SYS file or if it is corrupted, this file along with AUTOEXEC.BAT is crucial for comprehensive customization and software requirements during startup. When CONFIG.SYS lacks a SHELL directive or is compromised, DOS attempts to locate COMMAND.COM in the root directory. Versions prior to DOS 6.0 will fail to boot without it, whereas MS-DOS 6.0/PC DOS 6.1 and Novell DOS 7 and later will prompt users to specify a command processor path. This allows limited runtime replacement of the shell without restarting.

COMMAND.COM from MS-DOS version 7.0 onward is incompatible with DR-DOS systems. To avoid conflicts in dual-boot scenarios, DR-DOS version 7.02 and later prevent bypassing SHELL directives when operating in skip, trace, or step modes. Recovery options require users to enter valid shell filenames before loading COMMAND.COM.

The maximum size of CONFIG.SYS is restricted to a few kilobytes in MS-DOS/PC DOS (up to 64 KB in newer editions), but DR-DOS imposes no such limit due to its line-by-line interpretation instead of tokenized compilation. This enables precise control over the sequence of driver and TSR loading, resolving conflicts effectively while allowing conditional execution based on hardware detection or user input. The INSTALL directive in DR-DOS can execute non-resident programs integrated within the CONFIG.SYS processing flow.

Limitations on SHELL command line length vary from as little as 31 characters in early MS-DOS releases up to 128 characters in later versions. DR-DOS accepts lines up to 255 characters long. It is important to note that CONFIG.SYS directives do not support long filenames.

Dual Booting with DOS and Windows 9x

When Windows 95 is installed over a pre-existing DOS or Windows environment, the system renames CONFIG.SYS and AUTOEXEC.BAT to CONFIG.DOS and AUTOEXEC.DOS to enable dual boot functionality between Windows 9x and DOS. During a DOS startup, these files are temporarily reverted to their original filenames. Additionally, backup copies of Windows 95 configuration files are saved as CONFIG.W40 and AUTOEXEC.W40.

In setups where Caldera DR-DOS versions 7.02 or 7.03 coexist with Windows 95, the Windows CONFIG.SYS and AUTOEXEC.BAT remain intact. DR-DOS utilizes its own initialization files named DCONFIG.SYS and AUTODOS7.BAT.

OS/2 and Windows NT

OS/2 depends extensively on CONFIG.SYS for driver loading and environment configuration prior to launching its graphical user interface.

Within the OS/2 subsystem on Windows NT, CONFIG.SYS configurations are presented to OS/2 applications but are actually maintained within the system registry.

A considerable number of CONFIG.SYS commands in OS/2 lack formal documentation.

The use of CONFIG.SYS persists in OS/2 successors such as eComStation and ArcaOS.

See also

External links

  • AUTOEXEC.BAT and CONFIG.SYS overview – Computer Hope (2017)
  • Explanation of Windows 98 / MS-DOS 7.10 CONFIG.SYS options – Microsoft Support (archived)
  • Reference for CONFIG.SYS commands – Caldera (1998) (partial DR-DOS 7 directives)
  • Guide to FreeDOS CONFIG.SYS commands – FreeDOS Help
  • PTS-DOS 2000 Pro manual including CONFIG.SYS options (partial)
  • German-language unofficial PTS-DOS FAQ (PTS/FAQD) with additional CONFIG.SYS directives (2004)