Jump to content

DPBS (CONFIG.SYS directive)

From Alfawiki
Adapted from the English Wikipedia article DPBS (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

CONFIG.SYS serves as the central configuration file for DOS and OS/2 operating systems. This plain text file, written in ASCII, includes setup commands that the operating system's DOS BIOS interprets during the boot sequence. CONFIG.SYS was first introduced with DOS version 2.0.

Usage

The directives within CONFIG.SYS tailor DOS settings related to devices, applications, and memory allocation. Once CONFIG.SYS processing is complete, DOS initiates the command interpreter defined on the SHELL line, defaulting to COMMAND.COM if none is specified. Subsequently, AUTOEXEC.BAT is executed.

Typically, the file consists of name=value pairs that specify adjustable parameters or instruct loading of components like device drivers and terminate-and-stay-resident programs (TSRs) into memory.

CONFIG.SYS resides in the root directory of the boot disk and is also utilized by (DCP), an MS-DOS variant developed by East-German VEB Robotron.

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

- Advanced editions of Concurrent DOS 386, Concurrent DOS XM, Multiuser DOS, System Manager, and REAL/32 employ CCONFIG.SYS or CCONFIG.INI instead, with supplementary settings stored in a binary file called CCONFIG.BIN. These configurations are generally managed through a utility named CONFIG.EXE.

- In DR DOS versions 3.31 onward (including PalmDOS 1.0, Novell DOS 7, OpenDOS 7.01, DR-DOS 7.02+), DCONFIG.SYS supersedes CONFIG.SYS. This feature supports disk compression and multi-boot setups by allowing multiple configuration files.

- Additionally, OpenDOS 7.01 and DR-OpenDOS 7.02 recognize ODCONFIG.SYS, while some DR-DOS 7.02+ variants search for DRCONFIG.SYS.

Starting with DR-DOS 6.0, it is possible to customize default system file extensions using the SYS /DR:ext command, enabling multiple system files to coexist and be selected via boot loaders such as LOADER. The SHELL command can specify alternative AUTOEXEC.BAT files using /P[:filename.ext], with COMMAND.COM supporting extensions other than .BAT—functionality also available in 4DOS.

The CHAIN=filespec instruction in DR-DOS permits continuation of configuration from another file, which may be located outside the root directory; from DR-DOS 7.02 onward, it is possible to jump to specific labels within these chained configuration files.

DR-DOS version 7.03 and later introduce a SYS /A option that copies matching CONFIG.SYS and AUTOEXEC.BAT files alongside system files.

Other systems use similar alternate configuration filenames: FDCONFIG.SYS for FreeDOS, RXCONFIG.SYS for RxDOS, and CONFIG.PTS for PTS-DOS.

In Windows 95 and Windows 98, both CONFIG.SYS and AUTOEXEC.BAT exist in the root directory of the boot drive but are usually left blank. Conversely, Windows Me does not process CONFIG.SYS during startup, instead relying on environment variables stored within the Windows Registry.

For FlexOS, CONFIG.SYS is a binary-format file that specifies resource managers and device drivers loaded during system initialization.

Example

Sample CONFIG.SYS content 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>

:;*?!

Establishes labels within CONFIG.SYS to serve as jump points for , , , , and directives.
Functions similarly to , also utilized for inline commentary following other directives. (In MS-DOS/PC DOS, inline comments enclosed in quotes are not disregarded.)
Used to initiate inline comments in conjunction with the ; directive.
Prompts a Yes/No confirmation before executing subsequent CONFIG.SYS commands. (FreeDOS supports conditional options via boot menus.) DOS version 6.0 and later allows similar behavior by appending ? to directives.
Executes the next CONFIG.SYS command unconditionally.

ATemplate:NbndC

Determines whether programs can be aborted upon encountering errors.
Sets which drives record file access timestamps within FAT filesystems.
Enables conditional execution on AT-compatible hardware.
Boot management utility.
Adjusts the verbosity level of error messages.
Changes the default serial port driver (COM1 through COM4) assigned to the AUX device.
Disables character device availability outside of the virtual \DEV directory.
Loads a fundamental device driver into memory.
Produces an audible beep even when sound notifications are disabled.
Specifies the operating system to boot next.
Enables or disables extended Ctrl+C interrupt checking.
Defines how many disk buffers are allocated.
Similar to BUFFERS but loads buffers into High Memory Area or Upper Memory Blocks.
Maximum number of cache blocks allocated from system memory pool.
Maximum duration before unused cache blocks return to the system pool.
Maximum interval before dirty cache blocks flush data to disk.
Loads and runs programs within CONFIG.SYS in the foreground, halting further processing until completion.
Sets the Caps Lock key status (on or off).
Identifies the CD-ROM hardware driver name.
Specifies the number of buffers allocated for CD-ROM operations.
Continues processing CONFIG.SYS from a new file and optionally from a specified label (available since DR-DOS 7.02).
Determines the clock type utilized by the system.
Clears the display screen.
Specifies OEM codepages.

[Additional directives omitted for brevity]

DTemplate:NbndF

Configures relocation settings for drive descriptor tables.
Defines memory segment address used for multi-sector disk data deblocking.
Activates internal debugger support features.
Boot management tool.
Loads device drivers into memory space.
Loads device drivers into upper memory areas (equivalent to in DRDOS 5.0).
Sets country and codepage configurations for keyboard, screen, and printer devices (KBD, SCR, LPT).
Adjusts cache memory size parameters.
Selects floppy disk compatibility mode.
Specifies display font settings.
Controls loading of DOS into high or upper memory regions.
Loads DOS configuration tables (BUFFERS, FCBS, FILES, LASTDRIVE, STACKS) into upper memory space.
Defines alternative search paths for DOS system files.
Specifies search locations for data files.
Sets physical characteristics of disk drives.
Defines parameters for drives that are not recognized automatically.
See .
Enables a drive dedicated to PDUMP.nnn error log files.
Outputs a message on screen display.
Displays messages incorporating ANSI escape codes.
Specifies additional verification checks when launching programs.
Defines assumed error or return codes upon program execution.
Sets A20 line gate state when starting applications.
Terminates CONFIG.SYS processing prematurely (excluding SWITCHES and SHELL directives).
Configures hash table size to accelerate file open operations, differing from MS-DOS FASTOPEN implementation.
Number of cached File Control Blocks (FCBs) allowed open simultaneously (shares buffer space with FILES under DR-DOS).
Similar to FCBS but explicitly loads FCBs into upper memory areas.
Boot management function.
Specifies maximum simultaneously open files count.
Similar to FILES but explicitly loads file handles into upper memory areas.
Executes specified subsections of CONFIG.SYS (refer to 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 processing of CONFIG.SYS at the indicated label.
Continues nested CONFIG.SYS processing at a label, returning afterward.
Refer to , , or for additional context.
See related commands .
Refer to .
Consult or for further details.
See or for more information.
Consult .
Loads a TSR program into memory following DOS data segment relocation. Compare with INSTCDEX.
See , , or for related functions.
Refer to .
See or for extended options.
Activates console and command line history buffer with enhanced pattern search capabilities.
Defines the address of the HMA segment.
Configures HLT instruction for power-saving purposes.
Specifies whether to perform a boot sector virus scan on startup.
Loads installable file system drivers.
Prevents execution of designated CONFIG.SYS subsections.
Permits certain programs to operate at ring 2, allowing direct hardware I/O access.
Incorporates directives from an alternate menu block (can be emulated via GOSUB/RETURN in DR-DOS).
Sets the Insert mode status of the keyboard.
Installs a TSR program into memory.
Loads a TSR program into upper memory (equivalent to HIINSTALL in DR DOS 5.0).
Installs a TSR program after relocating the DOS data segment (see also INSTCDEX).
Rotates PIC interrupt priorities to give precedence to a specified IRQ number.

KTemplate:NbndM

Defines the keyboard layout configuration.
Sets the relocated keyboard buffer's memory address.
Specifies the maximum number of accessible drives.
Similar to LASTDRIVE but loads the Current Directory Structure (CDS) into upper memory.
Defines search paths for DLL files.
Controls handling of legacy applications.
Sets the number of file locks allowed.
Manages boot logo display when using PTS-DOS boot manager.
Configures parameters such as count, order, I/O address, and timeout for LPT1 device.
Applies similar configuration settings to LPT2 device.
Configures LPT3 device with corresponding parameters.
Enables and sets up LPT4 device operation.
Determines wait time before elevating process priority.
Sets strategy for memory allocation management.
Specifies default DOS memory allocation method.
Defines options available in menus.
Sets menu color schemes (emulatable within DR-DOS).
Specifies which menu block is default (emulatable in DR-DOS).
Defines individual menu blocks (emulatable in DR-DOS).
Enables operations involving multitrack disks.
Continues CONFIG.SYS processing from a new file after loading a driver, setting %NEWFILE% environment variable.

NTemplate:NbndQ

Defines the default No () character used in Yes/No/Resume prompts.
Sets the keyboard's [[Num Lock|Template:Keypress]] state on or off at startup.
Executes commands conditionally based on previous return code or error status, e.g., .
Displays text and waits for key input, similar to and commands in DR-DOS.
Requires user confirmation of errors encountered in CONFIG.SYS processing.
Configures buffer sizes for LPT1, LPT2, and LPT3 devices.
Conditional execution tailored for PC-compatible systems.
Adjusts priority scheduler settings.
Assigns priority levels for disk I/O programs.
Changes default printer device driver from LPT1 to LPT3 or LPT4 for PRN device output.
Specifies whether DOS programs are permitted to run.
Loads user interface components.
Conditional execution based on IBM PS/1-compatible hardware detection.
Conditional execution triggered by IBM PS/2-compatible system presence.
Suppresses output display directed to STDOUT.

RTemplate:NbndT

Activates automatic system reboot upon encountering errors.
Permits inclusion of comments within CONFIG.SYS (not recognized by PTS-DOS).
Allocates a drive letter for local block device drivers.
Defines the default character used for Resume () prompts.
Returns nested CONFIG.SYS execution to the preceding GOSUB or SWITCH command, optionally with a return code.
Sets the size of real mode memory.
Allows programs specified in CONFIG.SYS to load simultaneously in the background.
Saves the initial character of deleted files within the FAT reserved area.
Determines video mode for FreeDOS or screen access methods under PTS-DOS.
Controls the Scroll Lock key state on the keyboard.
Establishes environment variables.
Loads the command interpreter shell.
Functions like SHELL but includes support for the SIZE parameter, enabling COMMAND.COM preallocation into HMA or UMBs to minimize fragmentation.
Specifies keyboard modifier key states such as Shift Lock, Num Lock, Scroll Lock, and Insert mode.
Indicates whether files should close upon pressing Ctrl+Alt+Del.
Determines if POST should be bypassed during reboot.
, STACKSIZE, STACKSHIGH
Manage hardware interrupt stack sizes across various DOS versions with noted compatibility considerations.
, SYSBOOT, SYSGEN, SYSLOAD
PTS-DOS commands related to boot procedures and system load locations.
(DOS 6.0+) Defines submenu blocks (unsupported by DR-DOS and FreeDOS).
, SWAPPATH, THREADS, TIMESLICE
OS/2 directives controlling error logging, swap file locations, thread counts, and scheduler time slices respectively.
, SWITCHES
Conditional processing commands primarily utilized by DR DOS and Novell DOS systems, with limited support under PTS-DOS.
, TMPEXT
Sets default switch characters ('/' or '-') and temporary file extensions across different DOS variants.
, TRACEBUF, TRAPDUMP
Enable or configure debugging functionalities on DR-DOS, PTS-DOS, FreeDOS, and OS/2 platforms.

This segment enumerates critical system configuration parameters essential for controlling operating system behavior, environment variables, device driver management, memory allocation, and error handling across multiple DOS derivatives including DR-DOS, PTS-DOS, FreeDOS, Novell DOS, and OS/2. Mastery of these directives is vital for IT specialists maintaining legacy systems or embedded environments.

UTemplate:NbndZ

Assigns a specific memory segment to be used as Upper Memory Block (UMB).
Configures the UMB server settings.
Defines address ranges allocated for UMB RAM usage.
Toggles disk write verification on or off.
Reports the version of DOS in use.
Manages VGA display configuration status.
Sets the current video mode parameters.
Enables use of virtual DMA channels.
Controls Virtual Mode Extensions (VME) functionality.
Configures Windows VxD driver options.
Adjusts Windows system support settings.
Handles relocation of the Extended BIOS Data Area (EBDA).
Executes commands conditionally on XT-compatible machines only.
Sets Year 2000 compliance features.
Defines default affirmative response character in prompts.
Tracks file deletion operations.

Issues

Although the system can initiate startup without CONFIG.SYS or AUTOEXEC.BAT files present, these are indispensable for comprehensive operating system customization and fulfilling software dependencies. File corruption necessitates troubleshooting efforts.

If CONFIG.SYS lacks a SHELL directive or is damaged or missing entirely, DOS attempts to locate COMMAND.COM in the root directory of the boot drive. Versions prior to 6.0 will fail to boot without it. MS-DOS 6.0/PC DOS 6.1 and Novell DOS 7 and later versions will instead prompt users to specify a command processor path. This recovery prompt also appears if COMMAND.COM terminates unexpectedly or is deliberately exited, providing an opportunity to substitute a limited shell at runtime.

COMMAND.COM from MS-DOS version 7.0 onward is incompatible with DR-DOS but frequently remains installed on C: drives in dual-boot configurations. DR-DOS versions 7.02 and above prohibit bypassing SHELL directives in certain debugging modes to avoid conflicts. Subsequent updates reinstated some bypass options to facilitate recovery from invalid shell arguments. When skipping CONFIG.SYS processing without a SHELL line present, users are prompted to input a valid shell path before COMMAND.COM loads.

The size of CONFIG.SYS is constrained to several kilobytes under MS-DOS/PC DOS (with recent versions supporting up to 64 KB), whereas DR-DOS imposes no such limits due to differing parsing methods. MS-DOS compiles CONFIG.SYS into a tokenized format and processes directives sequentially—loading device drivers before TSR programs—while DR-DOS interprets each line individually. This line-by-line approach allows precise control over loading order via DEVICE and INSTALL directives, aiding in resolving conflicts between drivers and TSRs or integrating debugging tools and temporary utilities dynamically.

MS-DOS/PC DOS releases from 2.0 through 4.01 restrict the SHELL command line length to 31 characters. Later versions extend this limit up to 128 characters, while DR-DOS accepts up to 255 characters. 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 preexisting DOS or Windows environment, the system renames CONFIG.SYS and AUTOEXEC.BAT to CONFIG.DOS and AUTOEXEC.DOS, enabling dual boot functionality between Windows 9x and DOS. During a DOS boot, these files are temporarily reverted to their original filenames. Meanwhile, the versions used by Windows 95 are backed up under the names CONFIG.W40 and AUTOEXEC.W40.

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

OS/2 and Windows NT

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

Within the OS/2 environment running under Windows NT, what is presented as CONFIG.SYS to OS/2 applications is actually managed within the system registry.

There are several CONFIG.SYS commands for OS/2 that are not officially documented.

CONFIG.SYS continues to be utilized by OS/2-based systems such as eComStation and ArcaOS.

See also

External links

  • Information on AUTOEXEC.BAT and CONFIG.SYS at Computer Hope
  • Overview of CONFIG.SYS directives for Windows 98 / MS-DOS 7.10 (archived)
  • Caldera’s CONFIG.SYS Command Reference (archived) – summary of DR-DOS 7 directives
  • Details on FreeDOS CONFIG.SYS directives
  • PTS-DOS 2000 Pro User Manual with CONFIG.SYS commands (archived)
  • Unofficial German-language PTS-DOS FAQ (archived) – expanded CONFIG.SYS directive list