Jump to content

STUBA20 (CONFIG.SYS directive)

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

CONFIG.SYS serves as the chief configuration file for DOS and OS/2 operating systems. This ASCII text document holds setup instructions accessible to users, which are interpreted by the operating system's DOS BIOS—commonly found in IBMBIO.COM or IO.SYS—during the boot sequence. CONFIG.SYS made its debut with DOS version 2.0.

Usage

The directives within this file tailor DOS settings for hardware and software components, including memory management utilities. Once CONFIG.SYS has been processed, DOS initiates the command shell specified by the SHELL directive or defaults to COMMAND.COM, which subsequently executes AUTOEXEC.BAT.

CONFIG.SYS primarily contains name=value pairs that configure adjustable parameters or load files such as device drivers and terminate-and-stay-resident programs (TSRs) into system memory.

In DOS environments, CONFIG.SYS is located in the root directory of the bootable drive.

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

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

- Advanced editions of Concurrent DOS 386, Concurrent DOS XM, Multiuser DOS, System Manager, and REAL/32 employ CCONFIG.SYS (derived from "Concurrent") instead of CONFIG.SYS. Some Multiuser DOS releases utilize CCONFIG.INI, whereas REAL/32 searches for MCONFIG.SYS. These platforms support extended configuration options stored in binary files like CCONFIG.BIN, typically managed through CONFIG.EXE.

- Versions such as DR DOS 3.31, PalmDOS 1.0, Novell DOS 7, and DR-DOS 7.02+ prioritize a file named DCONFIG.SYS (reflecting "DR DOS") over CONFIG.SYS. This facilitates features like disk compression and multi-boot configurations.

- OpenDOS 7.01 and DR-OpenDOS 7.02 also look for ODCONFIG.SYS, while some DR-DOS 7.02+ variants check for DRCONFIG.SYS.

- Starting with DR DOS 6.0, users can alter default file extensions using SYS /DR:ext, allowing multiple concurrent system file sets within a single root directory, selectable via boot loaders such as LOADER.

- The SHELL command supports specifying alternate AUTOEXEC.BAT files through /P[:filename.ext], with COMMAND.COM accepting file extensions beyond ".BAT". Additionally, the CHAIN=filespec directive enables continued processing of another configuration file, optionally jumping to a designated label (CHAIN=filespec,label) in DR-DOS 7.02+.

- DR-DOS version 7.03 and later introduce SYS /A, which copies CONFIG.SYS and AUTOEXEC.BAT alongside system files.

FreeDOS uses FDCONFIG.SYS; RxDOS version 7.24 and above employs RXCONFIG.SYS; while PTS-DOS utilizes CONFIG.PTS.

Although both CONFIG.SYS and AUTOEXEC.BAT reside in the root directory of Windows 95 and Windows 98 boot drives, they generally remain unused.

Windows Me does not process CONFIG.SYS during startup; instead, it retrieves environment variables from the Windows Registry at HKLM\System\CurrentControlSet\Control\SessionManager\Environment.

Within the FlexOS operating system, CONFIG.SYS is a binary configuration 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>

:;*?!

Used to define labels within CONFIG.SYS, serving as jump points for commands like , , , , and .
Functions similarly to , permitting inline comments after directives. (In MS-DOS/PC DOS, inline comments behave differently when enclosed in quotes.)
Introduces inline comments alongside the ; directive.
Presents a Yes/No prompt requesting user approval before executing subsequent CONFIG.SYS commands. (FreeDOS supports conditional prompts via boot menus.) From DOS 6.0 onward, similar confirmation can be enabled by appending after directives.
Forces unconditional execution of the following CONFIG.SYS command.

ATemplate:NbndC

Determines whether applications can be terminated upon encountering errors.
Sets which drives record file access timestamps on FAT filesystems.
Enables conditional execution on AT-compatible hardware.
Boot manager utility.
Controls the verbosity level of error messages.
Alters the default serial device driver assignment (COM1: through COM4:) for the AUX device.
Disables character devices located outside the virtual \DEV directory.
Loads a base device driver into memory.
Produces a brief beep sound even when notifications are disabled.
Specifies the operating system to boot next.
Enables or disables extended Ctrl+C interrupt checking.
Defines the number of disk buffers allocated.
Similar to BUFFERS but allocates buffers in HMA or UMB areas.
, ,
Manage cache block allocation and flush intervals.
Executes programs within CONFIG.SYS and pauses processing until they return control.
Sets the Caps Lock keyboard state on or off.
,
Specifies CD-ROM driver name along with buffer quantity.
Continues processing CONFIG.SYS from another file or label.
, , , etc., configure system clock types, screen clearing, and OEM codepages respectively, varying by OS version.
, ...,
Define COM device parameters such as count, order, I/O address, and timeout settings.
, ;, and other directives manage inline comments, internationalization support, and additional features across various DOS releases.

This segment summarizes essential CONFIG.SYS directives that influence system setup and device handling across MS-DOS variants and compatible platforms, crucial for enhancing system efficiency and compatibility in professional IT settings.

DTemplate:NbndF

Adjusts relocation of drive descriptor tables in memory.
Specifies memory segment address used for multi-sector disk data deblocking operations.
Activates internal debugger support features.
Boot manager component.
Loads device drivers into conventional memory space.
Loads device drivers into upper memory blocks (equivalent to in DRDOS 5.0).
Configures country codes and codepage information for keyboard, screen, and printer devices.
Sets sizes for cache memory allocations.
Defines compatibility mode for floppy disk drives.
Specifies the display font used by the system.
Controls whether DOS loads into high or upper memory areas (similar to in DRDOS 5.0).
Loads DOS-related tables (BUFFERS, FCBS, FILES, LASTDRIVE, STACKS) into upper memory segments.
Defines an alternative directory path for DOS system files.
Sets search paths for data files.
Specifies physical parameters for disk drives.
Defines settings for unrecognized drive types.
See .
Enables drive specification for PDUMP.nnn error log files.
Displays a message on the screen during processing.
Outputs messages including ANSI escape sequences for formatting.
Adds extra validation checks when launching programs.
Assigns an error or return code for subsequent processing steps.
Determines A20 gate status when starting applications.
Terminates CONFIG.SYS processing prematurely (with some exceptions).
Configures hash table size to optimize file open operations (distinct from MS-DOS/PC DOS FASTOPEN driver).
Sets the number of cached File Control Blocks (FCBs) that can be open simultaneously (shares buffer space with FILES under DR-DOS).
Functions like FCBS but loads FCBs into upper memory areas.
Boot manager utility component.
; Defines maximum open files allowed concurrently.
; Same as FILES but loads file handles into upper memory blocks.
; Incorporates 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 specified label, returning control to the previous point afterward.
Refer to , , or for additional details.
Consult for related information.
See for further reference.
Refer to or for more context.
See or for additional guidance.
Consult for related instructions.
Loads a terminate-and-stay-resident (TSR) program into memory following DOS data segment relocation. Compare with INSTCDEX.
See , , or for more details.
Refer to for additional information.
See or for further explanation.
Activates console and command line history buffer featuring advanced pattern searching capabilities.
Defines the segment address of the High Memory Area (HMA).
Configures energy-saving behavior related to the HLT instruction.
Determines whether the system performs boot sector virus checks.
Loads installable file system drivers.
Prevents execution of certain CONFIG.SYS subsections as specified.
Permits designated programs to operate at CPU ring 2, granting direct hardware I/O access.
Incorporates directives from another menu block, emulatable through GOSUB/RETURN commands in DR-DOS.
Sets the status of the keyboard Insert mode.
Loads a TSR program into memory.
Loads a TSR program into upper memory, equivalent to HIINSTALL in DR DOS 5.0.
Installs TSR after relocating DOS data segment, similar in function to INSTALL.
Adjusts PIC interrupt priorities by rotating them to prioritize a specific IRQ number.

KTemplate:NbndM

Defines the keyboard layout configuration.
Specifies the address of the relocated keyboard buffer.
Sets the maximum number of accessible drives.
Functions like LASTDRIVE but additionally loads the Current Directory Structure into upper memory.
Lists directories for DLL search paths.
Manages compatibility with legacy software applications.
Specifies the number of file locks allowed.
Configures boot logo display when using PTS-DOS boot manager.
Defines parameters such as count, order, I/O address, and timeout for LPT1 device.
Same configuration parameters applied to LPT2 device.
Same configuration parameters applied to LPT3 device.
Enables and configures LPT4 device settings.
Sets delay before elevating process priority during wait states.
Configures memory allocation policies and strategies.
Establishes default DOS memory allocation method.
Specifies options available within menus.
Defines menu color schemes (emulated via ECHO command in DR-DOS).
Specifies default menu block (emulated using TIMEOUT and SWITCH commands in DR-DOS).
Defines an individual menu block (emulated with ECHO and SWITCH commands in DR-DOS).
Enables multitrack disk functionality.
Continues CONFIG.SYS processing from a new file, optionally loading device drivers and setting %NEWFILE% environment variable.

NTemplate:NbndQ

Sets the default character representing No () in Yes/No/Resume prompts.
Controls keyboard Num Lock status—enabled or disabled.
Enables conditional execution depending on last error code, such as .
Displays messages and waits for key input, similar to and commands in DR-DOS environments.
Requires user confirmation upon encountering errors within CONFIG.SYS processing.
Configures buffer sizes for LPT port communication.
Enables conditional execution on PC-compatible hardware platforms.
Sets parameters for priority-based scheduling algorithms.
Assigns priority levels specifically for disk I/O operations.
Changes default printer device driver among LPT1 through LPT4 options.
Controls whether DOS applications are permitted to run on the system.
Loads a user interface shell environment.
Enables conditional execution on IBM PS/1-compatible machines only.
Enables conditional execution on IBM PS/2-compatible machines only.
Suppresses output sent to standard output (STDOUT).

RTemplate:NbndT

Activates automatic system reboot upon encountering errors.
Permits inclusion of comments within CONFIG.SYS files.
Allocates a drive letter to prevent usage by local block device drivers.
Defines the default Resume () character displayed in prompts.
Facilitates returning from nested CONFIG.SYS processing to the previous GOSUB or SWITCH point, optionally supplying a return code.
Sets the amount of real mode memory available.
Enables concurrent loading of programs in CONFIG.SYS, operating in the background akin to CALL or INSTALL commands in DOS.
Stores the initial character of deleted files within the FAT reserved area.
Determines video mode settings for FreeDOS or screen access methods under PTS-DOS.
Configures the Scroll Lock key status on the keyboard, toggling it on or off.
Establishes environment variables for system use.
Loads the command interpreter shell.
Similar to SHELL but incorporates a SIZE parameter allowing pre-allocation of COMMAND.COM in HMA or UMBs, enhancing memory efficiency when using third-party shells.
Sets keyboard modifier states such as Shift Lock, Num Lock, Scroll Lock, and Insert mode.
Controls whether files close automatically upon pressing Ctrl+Alt+Del.
Determines if Power-On Self Test (POST) is bypassed during system reboot.
Serves as a compatibility placeholder due to DR DOS reentrant design modifications.
Specifies the count of hardware interrupt stacks available.
Defines default stack size allocated for new threads.
Functions like STACKS but loads buffers into upper memory area (UMA).
Configures boot manager settings.
Reserved for internal system directives.
Manages behavior of the XMS A20 gate.
Defines submenu blocks, which can be emulated using CLS, ECHO, and SWITCH commands in DR-DOS.
Redirects error logging output instead of displaying popup messages.
Specifies path location for swap files.
Enables conditional nested CONFIG.SYS processing triggered by key input, supporting RETURN to previous execution points.
Sets the default switch character used ('/' or '-').
Designates special options influencing overall system behavior.
Activates a correction for floating-point unit (FPU) rounding errors.
Specifies an alternative DOS system file for booting purposes.
Configures memory locations assigned to DOS components.
Loads system data from an alternate disk sector or area.
Defines size parameters for the dynamic system memory pool used in allocations.
Loads DOS code and data into upper memory blocks (UMBs).
Determines the maximum number of concurrent threads handled by the system scheduler.
Sets timeout durations for CONFIG.SYS single-step execution and default responses for prompts and SWITCH commands. Note that PTS-DOS supports only timeout values.
Configures minimum and maximum time slices allocated by the scheduler.
Specifies file extension used for temporary files created by the system.
Globally or locally enables/disables single-step execution of CONFIG.SYS and AUTOEXEC.BAT with varying behavior depending on OS version.
Defines size of TRACE log buffer used for diagnostics.
Records detailed error information to assist in troubleshooting.

UTemplate:NbndZ

Specifies a particular segment for use as an Upper Memory Block (UMB) within DOS memory management.
Sets parameters for the UMB server responsible for managing upper memory allocation.
Defines address ranges designated as UMB RAM segments.
Enables or disables verification during disk write operations to ensure data integrity.
Reports a specific DOS version string to applications querying system information.
Configures VGA display status parameters affecting video output behavior.
Sets current video mode similarly to FreeDOS's SCREEN command functionality.
Activates virtual DMA (Direct Memory Access) support within the system.
Controls processor Virtual Mode Extensions (VME) features on compatible CPUs.
Manages support and configuration of VxD drivers used by Windows environments.
Oversees system-level compatibility and support mechanisms for Windows operating systems.
Controls relocation settings for the Extended BIOS Data Area (XBDA).
Executes conditional commands specifically on XT-compatible hardware platforms.
Configures integrated Year 2000 compliance features within DOS environment.
Sets default character recognized as affirmative response in prompt dialogs (Yes character).
Monitors and tracks deletion events related to device drivers.

Issues

Although the system can start without the presence of CONFIG.SYS or AUTOEXEC.BAT, these files are critical for complete customization and meeting software requirements. When corruption occurs, troubleshooting is necessary.

If the CONFIG.SYS file does not contain a SHELL directive or is missing or damaged, DOS attempts to locate COMMAND.COM in the root directory of the boot drive. 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 prompt the user for the command processor’s location if COMMAND.COM is absent or fails to start, enabling limited shell replacement at runtime without needing a reboot.

Because MS-DOS 7 and later versions’ COMMAND.COM are incompatible with DR-DOS, DR-DOS versions 7.02 and above prevent bypassing SHELL directives during skip or trace modes to maintain system reliability. Recovery procedures require users to specify valid shell filenames before loading COMMAND.COM.

The maximum size allowed for CONFIG.SYS varies by operating system: MS-DOS and PC DOS permit up to 64 KB, whereas DR-DOS imposes no explicit size restriction beyond file system limits. MS-DOS processes CONFIG.SYS by compiling it into a tokenized format in memory to ensure drivers load before TSRs in a fixed sequence. Conversely, DR-DOS parses CONFIG.SYS line-by-line, granting finer control over the order of driver and TSR loading as well as conditional execution based on hardware detection or user input.

This enhanced flexibility supports the integration of temporary utilities via INSTALL, improving customization options and facilitating debugging tasks.

Limits on the length of the SHELL line vary among versions: MS-DOS from 2.0 through 4.01 restricts it to 31 characters; later releases extend this limit to 128 characters; DR-DOS allows up to 255 characters. It is important to note that CONFIG.SYS directives do not support long filenames.

Dual booting DOS and Windows 9x

During installation of Windows 95 over an existing DOS/Windows environment, the original CONFIG.SYS and AUTOEXEC.BAT files are renamed CONFIG.DOS and AUTOEXEC.DOS respectively to enable dual-boot functionality. When booting into DOS mode, these files are temporarily restored under their original names, while Windows 95’s versions are backed up as CONFIG.W40 and AUTOEXEC.W40.

In setups where Caldera DR-DOS 7.02 or 7.03 is installed alongside Windows 95, Windows’ CONFIG.SYS and AUTOEXEC.BAT remain untouched. Instead, DR-DOS uses separate startup files named DCONFIG.SYS and AUTODOS7.BAT.

OS/2 / Windows NT

OS/2 depends extensively on CONFIG.SYS for configuring device drivers and environment settings prior to launching its graphical user interface. Within the OS/2 subsystem of Windows NT, these CONFIG.SYS configurations are represented as registry entries. Many CONFIG.SYS commands in OS/2 remain undocumented.

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

See also

External links

  • AUTOEXEC.BAT and CONFIG.SYS details – Computer Hope (2017)
  • Overview of Windows 98 / MS-DOS 7.10 CONFIG.SYS directives – Microsoft Support (archived)
  • CONFIG.SYS Command Reference – Caldera (1998) (partial list of DR-DOS 7 directives)
  • FreeDOS CONFIG.SYS directive documentation
  • PTS-DOS 2000 Pro User Manual with CONFIG.SYS directives (partial)
  • German unofficial PTS-DOS FAQ (2004) including additional CONFIG.SYS entries