Jump to content

THREADS (CONFIG.SYS directive)

From Alfawiki
Adapted from the English Wikipedia article THREADS (CONFIG.SYS directive), available under CC BY-SA 4.0Updated 9 August 2025
CONFIG.SYS
Company typeConfiguration file
IndustryComputer software
Founded1983
ProductsOperating system configuration

CONFIG.SYS serves as the main configuration file for DOS and OS/2 operating system families. This plain text file, written in ASCII, includes setup commands that the operating system's DOS BIOS—commonly found in IBMBIO.COM or IO.SYS—interprets during the startup sequence. CONFIG.SYS was first introduced with DOS version 2.0.

Usage

The directives within CONFIG.SYS are responsible for configuring DOS to support hardware devices, software applications, and memory management utilities. Once CONFIG.SYS has been processed, DOS launches the command interpreter specified on the SHELL line; if none is specified, it defaults to COMMAND.COM, which then executes the AUTOEXEC.BAT script.

CONFIG.SYS mainly comprises name=value pairs that define settings or load components, predominantly device drivers and terminate-and-stay-resident programs (TSRs), into system memory. This file is located in the root directory of the bootable drive.

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

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

- Advanced releases of Concurrent DOS 386, Concurrent DOS XM, Multiuser DOS, System Manager, and REAL/32 seek CCONFIG.SYS first, which supports extended configuration options stored in binary CCONFIG.BIN files managed through CONFIG.EXE. - Versions of DR DOS from 3.31 onward—including variants such as PalmDOS, Novell DOS, and DR-DOS 7.02+—prefer DCONFIG.SYS, facilitating setups involving disk compression or multiple boot environments. - OpenDOS 7.01 and DR-OpenDOS 7.02 additionally check for ODCONFIG.SYS; some DR-DOS 7.02+ editions also recognize DRCONFIG.SYS. - Starting with DR-DOS 6.0, the command SYS /DR:ext allows renaming of system files, enabling simultaneous boot configurations controlled by boot managers like LOADER. - The SHELL directive has been enhanced to allow specification of alternative AUTOEXEC files and support extensions beyond .BAT, features implemented by shells such as 4DOS. - DR-DOS introduces CHAIN=filespec, which permits continuation of processing additional configuration files, optionally targeting designated labels. - From DR-DOS 7.03 onward, the command SYS /A enables copying CONFIG.SYS and AUTOEXEC.BAT along with other system files.

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

In Windows 95 and 98 environments, CONFIG.SYS and AUTOEXEC.BAT exist in the root directory of the boot drive but generally remain empty. Windows Me does not execute CONFIG.SYS during startup; instead, it retrieves environment variables directly from the Windows Registry.

For FlexOS, CONFIG.SYS is a binary file utilized to specify resource managers and device drivers.

Example

An example CONFIG.SYS configuration suitable 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>

:;*?!

Defines jump labels within CONFIG.SYS that serve as targets for , , , and commands.
Functions similarly to , but allows inline comments following other directives in CONFIG.SYS. (In MS-DOS/PC DOS, inline comments enclosed in double quotes are not ignored.)
Introduces inline comments alongside the ; directive.
Prompts a Yes/No confirmation before executing subsequent CONFIG.SYS commands. (FreeDOS lacks customizable messages but supports conditional execution through boot menus.) Starting with DOS 6.0, similar functionality is available by appending after directives (e.g., ).
Executes the following CONFIG.SYS instruction without condition.

ATemplate:NbndC

Determines whether programs may be terminated upon encountering errors.
Defines which drives record file access timestamps in FAT file systems.
Enables conditional execution on AT-compatible hardware.
Boot management utility.
Adjusts the level of detail shown in error messages.
Alters the default internal serial driver assigned to the AUX device.
Prevents character devices from being accessible outside the phantom \DEV directory.
Loads the fundamental device driver into memory.
Produces a brief beep sound even if audible alerts are disabled.
Indicates the operating system designated for the next boot sequence.
Enables or disables extended Ctrl+C detection.
Defines the quantity of disk buffers to allocate.
Functions like BUFFERS but allocates buffers within HMA or UMB memory areas.
, , (Embedded DOS 6-XL exclusive)
Sets cache block allocation, time-to-live, and flushing parameters.
Executes programs listed in CONFIG.SYS, running in the foreground and pausing CONFIG.SYS processing until completion.
Specifies whether Caps Lock is on or off for the keyboard.
, (PTS-DOS specific)
Defines CD-ROM driver name and buffer settings.
Continues processing of CONFIG.SYS from a new file or label.
, , and additional PTS-DOS-only commands configure system clock types, clear screen commands, boot menu color schemes, and related options.
(OS/2 exclusive)
Sets OEM codepage(s).
, ..., (DR-DOS 7.02 and later)
Configures number, sequence, I/O addresses, and timeout values for COM ports.
, (DOS 4.0+), reassigns lead-in characters for inline comments or causes subsequent lines to be disregarded under certain environments.
, (DOS 3.0+, DR DOS 3.31+, OS/2)
Activates and configures internationalization support.
CPU-specific directives such as CPU88 or CPU386 provide conditional execution based on processor type, mainly applicable to PTS-DOS and DR-DOS variants.

This concise overview emphasizes essential CONFIG.SYS directives pertinent to configuring business systems and legacy DOS platforms supporting enterprise-level software.

DTemplate:NbndF

Adjusts relocation settings for drive descriptor tables.
Specifies the memory segment address used for multi-sector disk data deblocking operations.
Activates internal debugger functionality.
Boot management utility.
Loads a device driver into system memory.
Loads a device driver into upper memory blocks (equivalent to in DRDOS 5.0).
Sets country and codepage information for keyboard, screen, and printer devices.
Configures sizes for cache memory pools.
Determines compatibility mode for floppy disk drives.
Selects display font configuration.
Controls whether DOS loads into high memory and/or utilizes upper memory areas.
Specifies loading of DOS tables (BUFFERS, FCBS, FILES, LASTDRIVE, STACKS) into upper memory segments.
Provides an alternative search path for DOS system files.
Defines search paths for data files used by applications or drivers.
Details physical parameters of disk drives.
Sets parameters for unrecognized or unknown drives.
Refer to .
Enables drive access for PDUMP.nnn error log files.
Displays a standard message on screen output.
Displays messages incorporating ANSI escape codes for formatting.
Specifies additional validation checks when launching programs.
Assigns an assumed error or return code following program execution.
Configures A20 line gate status during program startup sequences.
Terminates processing of CONFIG.SYS early except for SWITCHES and SHELL directives which continue to be processed.
Defines hash table size to accelerate file open operations (distinct from MS-DOS FASTOPEN driver).
Sets maximum number of cached File Control Blocks open concurrently (shares buffer space with FILES under DR-DOS).
Similar to FCBS but explicitly loads these into upper memory segments.
Boot management utility.
Establishes the maximum number of simultaneously open files supported by the system.
Functions like FILES but loads file handles explicitly into upper memory areas.
Includes execution of specified subsections within CONFIG.SYS (see IGNORE).

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 CONFIG.SYS processing at a specified label.
Continues nested CONFIG.SYS processing at a given 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 applicable.
See or for more context.
Consult for relevant information.
Loads a TSR program into memory following DOS data segment relocation. Compare with INSTCDEX.
See , , or for related instructions.
Refer to for further guidance.
See or for additional options.
Activates console and command line history buffer with enhanced pattern search capabilities.
Defines the address of the HMA segment.
Configures energy-saving behavior using the HLT instruction.
Specifies whether to perform a virus check on the system boot sector.
Loads installable file system drivers.
Prevents execution of designated CONFIG.SYS subsections.
Permits certain applications to operate at ring 2, enabling direct hardware I/O access.
Incorporates directives from another menu block, emulated via GOSUB/RETURN in DR-DOS.
Sets the status of keyboard Insert mode.
Installs a TSR program into memory.
Installs a TSR program into upper memory, equivalent to HIINSTALL in DR DOS 5.0.
Loads a TSR program after relocating the DOS data segment. Compare with INSTCDEX.
Adjusts PIC interrupt priorities, assigning highest priority to a specified IRQ number.

KTemplate:NbndM

Defines the keyboard layout to be used.
Specifies the address of the relocated keyboard buffer.
Sets the maximum number of accessible drives.
Functions similarly to LASTDRIVE but also loads Current Directory Structure into upper memory.
Lists paths for DLL searches.
Manages compatibility and handling of legacy applications.
Defines the number of file locks allowed.
Controls display of boot logo when using PTS-DOS boot manager.
Specifies count, order, I/O address, and timeout parameters for the LPT1 device.
Applies same configuration as LPT1 for LPT2 device.
Mirrors LPT1 settings for LPT3 device.
Enables and configures LPT4 device similarly to others.
Sets delay before elevating process priority.
Determines memory allocation strategy used by DOS.
Specifies default strategy for DOS memory allocation.
Defines available menu options in CONFIG.SYS menus.
Sets color scheme for menus (can be emulated using ECHO in DR-DOS).
Establishes default menu block (emulatable via TIMEOUT and SWITCH in DR-DOS).
Defines multiple menu blocks (can be emulated with ECHO and SWITCH commands in DR-DOS).
Enables or disables 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 () response character in Yes/No/Resume prompts.
Configures keyboard Num Lock state (on or off).
Executes conditionally based on last error code, e.g., .
Displays text and waits for key press, similar to and in DR-DOS environments.
Requires user confirmation of errors detected during CONFIG.SYS processing.
Adjusts buffer size settings for LPT devices.
Executes conditionally on PC-compatible systems only.
Configures scheduler priority levels for processes.
Sets priority specifically for disk I/O programs.
Changes default printer device driver among LPT1 through LPT4 options.
Controls whether DOS programs are permitted to run.
Loads the user interface shell environment.
Executes conditionally on IBM PS/1-compatible hardware platforms.
Executes conditionally on IBM PS/2-compatible systems only.
Suppresses output directed to STDOUT.

RTemplate:NbndT

Activates automatic system reboot upon encountering errors.
Permits inclusion of comments within CONFIG.SYS files.
Allocates a drive letter for local block device drivers.
Defines default Resume () character displayed in prompts.
Returns control from nested CONFIG.SYS processing to the previous GOSUB or SWITCH point, optionally with a return code.
Sets the size of real mode memory.
Executes programs listed in CONFIG.SYS simultaneously in the background, functioning similarly to CALL or INSTALL commands in DOS.
Saves the initial character of deleted files within the reserved FAT area.
Determines video mode (FreeDOS) or methods for screen access (PTS-DOS).
Configures the keyboard Scroll Lock state (enabled or disabled).
Assigns environment variables.
Loads the command interpreter shell.
Similar to SHELL but supports a size parameter to pre-allocate COMMAND.COM in HMA or UMBs, preventing fragmentation.
Specifies keyboard modifier key states such as Shift Lock, Num Lock, Scroll Lock, and Insert mode.
Controls whether files close upon pressing Ctrl+Alt+Del.
Indicates whether POST should be bypassed during reboot.
Sets the number of stacks allocated for hardware interrupts.
Defines default stack size for newly created threads.
Functions like STACKS but loads buffers into upper memory areas.
Configuration settings for the boot manager.
Defines submenu blocks (emulated under DR-DOS).
Redirects error logs to a drive instead of displaying popup screens.
Specifies the location path for swap files.
Allows conditional continuation of nested CONFIG.SYS processing at specified labels based on key input, with RETURN resuming from the previous point.
Sets the default switch character ('/' or '-').
Specifies special configuration options.
Enables a fix addressing the FPU rounding error.
Defines an alternative DOS system file for boot operations.
Configures memory locations for DOS components.
Loads system data from an alternative disk region.
Determines the size of the system memory pool used for dynamic allocation.
Loads DOS code and data into Upper Memory Blocks (UMBs).
Sets the maximum number of concurrent threads permitted.
Configures single-step timeouts and default prompt responses for SWITCH, GETKEY, etc.; PTS-DOS supports only timeout values.
Adjusts minimum and maximum scheduler time slice durations.
Specifies file extensions used for temporary files.
Enables or disables single-step execution of CONFIG.SYS and AUTOEXEC.BAT globally or locally, with different OS behaviors.
Sets the size of the TRACE log buffer area.
Records detailed error information for diagnostic purposes.

UTemplate:NbndZ

Configures DOS to manage a designated segment as Upper Memory Block (UMB) memory.
Specifies which UMB server is utilized by the system.
Defines address ranges allocated as UMB RAM areas.
Enables or disables verification of disk writes.
Sets the DOS version number reported to applications.
Manages VGA display status settings.
Specifies the current video mode, similar to FreeDOS's SCREEN command.
Determines if virtual DMA functionality is permitted.
Controls whether processor Virtual Mode Extensions are disabled.
Configures VxD driver support for Windows environments.
Sets system-level support parameters for Windows operation.
Manages relocation of the Extended BIOS Data Area (EBDA).
Enables conditional execution on XT-compatible hardware platforms.
Configures integrated Year 2000 (Y2K) compliance support features.
Defines default affirmative response character used in prompts.
Manages tracking settings for file deletion operations.

Issues

Although the system can initiate startup without CONFIG.SYS or AUTOEXEC.BAT, these configuration files are crucial for comprehensive customization and meeting software demands. When these files become damaged or corrupted, diagnostic steps are necessary.

In the absence or corruption of the SHELL directive within CONFIG.SYS, DOS attempts to locate COMMAND.COM in the root directory of the boot drive. For versions earlier than 6.0, the system fails to boot if COMMAND.COM is missing. Starting with MS-DOS 6.0, PC DOS 6.1, and Novell DOS 7 and later, users are prompted to specify a command processor path if COMMAND.COM is not found or if it terminates unexpectedly. This mechanism also enables replacing the shell at runtime without requiring a reboot.

COMMAND.COM from MS-DOS 7.0 and beyond is incompatible with DR-DOS, which impacts dual-boot environments where COMMAND.COM typically resides in C:\. To prevent conflicts between command processors, DR-DOS 7.02 and later versions block attempts to bypass SHELL directives during skip, trace, or step modes and prompt users to provide valid shell filenames when necessary.

The allowable size of CONFIG.SYS differs across versions: MS-DOS and PC DOS impose limits (up to 64 KB), whereas DR-DOS only restricts file size based on the underlying file system capabilities. MS-DOS processes CONFIG.SYS by compiling it into tokenized form in memory before executing directives sequentially—loading device drivers first, followed by TSRs. In contrast, DR-DOS parses CONFIG.SYS line-by-line, granting precise control over load order through DEVICE and INSTALL commands, which aids in resolving driver conflicts and debugging.

DR-DOS offers conditional execution within CONFIG.SYS based on factors such as CPU type, key inputs, error states, or return codes. This feature allows dynamic control flow and supports temporary integration of external utilities via INSTALL, enhancing system flexibility for customization and troubleshooting purposes.

Regarding length restrictions, MS-DOS/PC DOS versions 2.0 through 4.01 limit SHELL lines to 31 characters; subsequent releases extend this to 128 characters. DR-DOS permits up to 255 characters for SHELL entries. It should be noted that 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 installation, it renames CONFIG.SYS and AUTOEXEC.BAT to CONFIG.DOS and AUTOEXEC.DOS respectively to support dual-booting between Windows 9x and DOS environments. During a DOS boot session, these files are temporarily restored under their original names. The Windows 95 versions are backed up as CONFIG.W40 and AUTOEXEC.W40.

In configurations where Caldera DR-DOS 7.02 or 7.03 coexists with Windows 95, the latter’s CONFIG.SYS and AUTOEXEC.BAT remain unaltered. Instead, DR-DOS utilizes DCONFIG.SYS and AUTODOS7.BAT as its startup configuration files.

OS/2 / Windows NT

OS/2 relies heavily on CONFIG.SYS for setting up drivers and environment variables prior to loading its graphical user interface.

Within the OS/2 subsystem of Windows NT, CONFIG.SYS appears as expected to OS/2 applications but is actually maintained within the system registry.

There exist numerous undocumented CONFIG.SYS directives specific to OS/2.

CONFIG.SYS continues to be employed by OS/2 derivatives such as eComStation and ArcaOS.

See also

External links