Jump to content

ECHO (CONFIG.SYS directive)

From Alfawiki
Adapted from the English Wikipedia article ECHO (CONFIG.SYS directive), available under CC BY-SA 4.0Updated 9 August 20253 sources
CONFIG.SYS
Company typeConfiguration file
IndustryComputer software
Founded1983
ProductsSystem configuration for DOS and OS/2

CONFIG.SYS serves as the main configuration file for DOS and OS/2 operating systems. This plain text file contains setup commands accessible to users, which are interpreted by the operating system's DOS BIOS (commonly found in IBMBIO.COM or IO.SYS) during the boot process. CONFIG.SYS was first introduced with DOS version 2.0.

Usage

The directives within CONFIG.SYS configure DOS for hardware devices, software applications, and memory allocation. Once CONFIG.SYS has been processed, DOS initiates the command interpreter specified by the SHELL directive or defaults to COMMAND.COM, which subsequently executes AUTOEXEC.BAT.

Primarily, the file contains name=value pairs that define adjustable parameters or load components such as device drivers and terminate-and-stay-resident programs (TSRs) into 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 firm VEB Robotron.

Certain DOS variants check for alternative configuration files that take precedence over CONFIG.SYS:

Advanced editions like Concurrent DOS 386, Concurrent DOS XM, Multiuser DOS, System Manager, and REAL/32 use CCONFIG.SYS (denoting "Concurrent") instead of CONFIG.SYS. Some Multiuser DOS releases employ CCONFIG.INI, while REAL/32 looks for MCONFIG.SYS. These platforms support extended configuration options stored in binary files such as CCONFIG.BIN, typically managed through CONFIG.EXE.

In DR DOS 3.31, PalmDOS 1.0, Novell DOS 7, and DR-DOS versions 7.02 and later, DCONFIG.SYS (short for "DR DOS") overrides CONFIG.SYS. This filename originated with disk compression utilities but is also used to facilitate multi-boot setups. OpenDOS 7.01 and DR-OpenDOS 7.02 look for ODCONFIG.SYS, while some DR-DOS 7.02+ versions check for DRCONFIG.SYS.

Beginning with DR DOS 6.0, the command SYS /DR:ext allows users to modify default file extensions, enabling multiple boot configurations within a single root directory that can be selected via boot loaders like LOADER included with Multiuser DOS and DR-DOS 7.x. The SHELL command supports specifying alternate AUTOEXEC.BAT files using /P[:filename.ext], and COMMAND.COM accepts extensions other than ".BAT" in this context (a feature also supported by 4DOS). The CHAIN=filespec directive permits loading additional configuration files located outside the root directory; DR-DOS 7.02 and newer versions allow jumping directly to specific labels within these files.

Starting with DR-DOS 7.03, the SYS /A option copies matching CONFIG.SYS and AUTOEXEC.BAT files alongside system files during setup.

FreeDOS employs FDCONFIG.SYS in a similar fashion; RxDOS version 7.24 and later use RXCONFIG.SYS, while PTS-DOS utilizes CONFIG.PTS.

Both CONFIG.SYS and AUTOEXEC.BAT are present in the root directories of Windows 95 and Windows 98 boot drives but are generally left empty.

Windows Me does not process CONFIG.SYS at startup; instead, it loads environment variables directly from the Windows Registry at:

HKLM\System\CurrentControlSet\Control\SessionManager\Environment

In contrast, under FlexOS, CONFIG.SYS is a binary file that specifies resource managers and device drivers loaded during system initialization.

Example

Here is 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 points for , , , and commands.
Functions similarly to , but allows inline comments following other CONFIG.SYS instructions. (Inline comments enclosed in double quotes are not ignored in MS-DOS/PC DOS.)
Used as a prefix in inline comments alongside the ; directive.
Prompts a Yes/No confirmation before executing subsequent CONFIG.SYS commands.[1] (FreeDOS adds optional conditions with boot menu support via and .) DOS version 6.0 and later include a comparable feature by appending after the directive, such as or , also supported by DR DOS.
Forces unconditional execution of the following CONFIG.SYS command.

ATemplate:NbndC

Determines whether programs can be aborted upon encountering errors.
Sets which drives maintain file date stamps within FAT filesystems.
Enables conditional execution on AT-compatible hardware.
Boot manager functionality.
Adjusts the detail level of error message output.
Alters the default internal serial driver used for the AUX device.
Prevents access to character devices outside the phantom \DEV directory.
Loads core device drivers into system memory.
Produces a brief beep even if audible alerts are disabled.
Specifies the operating system to boot next.
Enables or disables extended Ctrl+C handling.
Defines the number of disk buffers allocated.
Similar to BUFFERS but loads buffers into HMA or UMB memory areas.
, CACHETTL, CACHEFLUSH (Embedded DOS 6-XL only)
Controls cache block timing and flushing intervals.
Loads and executes programs within CONFIG.SYS, pausing further processing until completion.
(DR-DOS 7.02+)
Indicates keyboard Caps Lock state at startup.
, CDDBUFFERS (PTS-DOS only)
Configures CD-ROM driver buffer settings.
(DR DOS 5.0+, Embedded DOS)
Continues CONFIG.SYS processing from another file or label.
, CLS, CODEPAGE (various OS-specific)
Defines clock type, clears screen, sets OEM codepages.
, COM2, COM3, COM4 (DR-DOS 7.02+)
Manages serial port count, sequence, I/O addresses, and timeouts.
, COMMENT(S), COUNTRY (various DOS versions)
Configures DMA buffers, inline comments, and internationalization support.
, CPSW (MS-DOS/DR-DOS versions)
Sets cursor position on display and supports codepage switching.
, CPU88, CPU86, CPU286, CPU386, CPU486 variants (PTS-DOS/DR-DOS)
Conditional execution based on CPU model or speed.

DTemplate:NbndF

Controls relocation of drive descriptor tables in memory.
Defines memory segment address for multi-sector disk data deblocking operations.
Activates internal debugger support features.
Boot manager capabilities.
Loads device drivers into conventional memory.
Loads device drivers into upper memory blocks (equivalent to in DRDOS 5.0).
Sets country and codepage parameters for keyboard, screen, and printer devices.
Configures cache memory allocation sizes.
Specifies floppy disk compatibility modes.
Defines display font settings.
Loads DOS into high or upper memory regions (similar to in DRDOS 5.0).
Loads DOS system tables such as BUFFERS, FCBS, FILES, LASTDRIVE, STACKS into upper memory areas.
Specifies alternative paths for DOS system files.
Sets search paths for data files used by DOS commands.
Defines physical disk drive parameters for proper operation.
Provides parameters for drives that are not otherwise recognized by the system.
Refer to .
Enables creation of PDUMP.nnn error log files and specifies target drive location.
Controls display of messages on screen during boot or processing.
Displays messages including ANSI escape sequences for formatting.
Adds additional verification checks when launching programs.
Sets assumed error or return codes for subsequent commands executed by DOS.
Controls A20 gate state when starting applications to manage memory access above 1MB.
Terminates CONFIG.SYS processing early except for certain directives that must still run.
Sets hash table size used for accelerating file open operations (differs from MS-DOS/PC DOS FASTOPEN driver).
Defines number of cached File Control Blocks opened simultaneously (shares buffer space with FILES under DR-DOS).
Similar to FCBS but loads File Control Blocks into upper memory areas.
Boot manager functionality within CONFIG.SYS processing.
Specifies maximum number of files that can be opened concurrently by DOS.
Same as FILES but loads file handles into upper memory blocks for efficiency.
Incorporates execution of designated CONFIG.SYS subsections using 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 the indicated label.
Resumes nested CONFIG.SYS processing at a given label, then returns to the prior location.[2]
Refer to , , or for additional details.
See also .
Consult .
Refer to or for more information.
See or as applicable.
Consult .
Loads a TSR program into memory following DOS data segment relocation. Compare with INSTCDEX.
Refer to , , or for related commands.
Consult .[2]
See or for further reference.
Activates console and command line history buffers along with enhanced pattern searching capabilities.
Defines the HMA segment address.
Sets up HLT energy-saving mode.
Enables system checks for boot sector viruses.
Loads installable file system drivers.
Prevents execution of specified CONFIG.SYS subsections. See .
Permits designated programs to execute at ring 2, granting direct hardware I/O access.
Includes directives from an alternate menu block (simulated via GOSUB/RETURN in DR-DOS).
Sets keyboard Insert mode status.[2]
Installs a TSR program into memory.[3]
Loads TSR program into upper memory (equivalent to HIINSTALL in DR DOS 5.0).
Installs TSR after DOS data relocation. Compare with INSTCDEX.
(Exclusive to Embedded DOS 6-XL)
Adjusts PIC interrupt priorities to assign highest priority to a specified number.

KTemplate:NbndM

Defines the keyboard layout configuration.
Specifies the relocated keyboard buffer address.
Sets maximum number of accessible drives.
Similar to LASTDRIVE but loads Current Directory Structure (CDS) into upper memory.
Lists paths for DLL searches.
Manages legacy program compatibility settings.
Determines the quantity of file locks permitted.
Configures support for boot logos.
Sets count, order, I/O address, and timeout parameters for LPT1 device.
Configures LPT2 device with similar options.
Applies similar configurations to LPT3 device.
Enables and configures LPT4 device parameters.
Defines wait time before increasing process priority.
Configures strategy for memory allocation.
Establishes default DOS memory allocation method.
Defines menu option entries.
Specifies menu color schemes (emulatable in DR-DOS).
Sets default menu block (emulatable in DR-DOS).
Defines individual menu blocks (emulatable in DR-DOS).
Enables or disables multitrack disk operations functionality.
Continues CONFIG.SYS processing in a new file after loading a device driver and setting the %NEWFILE% environment variable.

NTemplate:NbndQ

Sets the default No () response character in Yes/No/Resume prompts.
Controls keyboard [[Num Lock|Template:Keypress]] status, enabling or disabling it.
Executes conditionally based on the last error code, such as .
Displays text and waits for a key press, akin to and commands in DR-DOS.
Requires user confirmation of errors during CONFIG.SYS processing.
Configures buffer sizes for LPT ports.
Executes conditionally on PC-compatible machines only.
Adjusts scheduler priority settings.
Sets priority levels for disk I/O programs.
Changes default printer driver assignment among LPT1 through LPT4 devices.
Specifies whether DOS programs are allowed to run.
Loads the user interface shell environment.
Executes conditionally on IBM PS/1-compatible systems only.
Executes conditionally on IBM PS/2-compatible systems only.
Suppresses output sent to STDOUT.

RTemplate:NbndT

Activates automatic reboot upon encountering errors.
Permits inclusion of comments within CONFIG.SYS.
Reserves a drive letter to prevent allocation by block device drivers.
Defines the default Resume () response character for Yes/No/Resume prompts.
Returns nested CONFIG.SYS processing control to the prior GOSUB or SWITCH point, optionally with a return code.
Specifies the size of real mode memory available.
Allows programs to load concurrently in the background while processing CONFIG.SYS.
Saves the initial character of deleted files in the reserved FAT area.
Determines video mode settings (FreeDOS) or screen access methods (PTS-DOS).
Configures the keyboard Scroll Lock state as on or off.
Sets environment variables within the system.
Loads the command interpreter shell.
Similar to SHELL but includes a size parameter to relocate COMMAND.COM into HMA or UMBs for improved memory efficiency.
Specifies keyboard modifier key states such as Shift Lock, Num Lock, Scroll Lock, and Insert mode.
Defines file closure procedures triggered by Ctrl+Alt+Del.
Indicates whether POST should be bypassed during reboot.
, STACKSIZE, STACKSHIGH
Configure hardware interrupt stack sizes and buffer locations across various DOS editions and derivatives.
, SYSBOOT, SYSGEN, SYSLOAD, SYSTOUMB
PTS-DOS commands managing boot processes, system loading addresses, and memory optimization strategies.
, SWITCH, SWITCHES
Control submenu structures and conditional execution within CONFIG.SYS using key-based branching (unsupported in some DOS variants).
, SWAPPATH
OS/2-specific settings for defining error log locations and swap file directories.
, THREADS, TIMESLICE
OS/2-exclusive configurations addressing hardware fixes, multitasking concurrency, and scheduling parameters.
, TRACE, TRACEBUF
Manage CONFIG.SYS operation timeouts and enable debugging features such as single-stepping across DR-DOS, PTS-DOS, OS/2, and FreeDOS environments.
, TRAPDUMP
Configure temporary file extensions for PTS-DOS and error logging options for OS/2.

UTemplate:NbndZ

Assigns a specific segment for use as an Upper Memory Block (UMB) in DOS.
Defines the UMB server configuration.
Sets address ranges designated as Upper Memory Block RAM.
Enables or disables verification of disk writes.
Specifies the DOS version reported to applications.
Configures VGA display status parameters.
Determines the active video mode setting.
Enables virtual Direct Memory Access (DMA) functionality.
Controls processor Virtual Mode Extensions (VME).
Configures Virtual Device Driver (VxD) settings for Windows environments.
Manages Windows system support configurations.
Handles relocation of the Extended BIOS Data Area (XBDA).
Executes conditionally on XT-compatible hardware platforms.
Activates built-in Year 2000 compliance support.
Sets the default affirmative character used in prompts.
Monitors file deletion operations.

Issues

While it is possible for the system to start without CONFIG.SYS or AUTOEXEC.BAT files, these are crucial for comprehensive customization and meeting software requirements. If either file becomes damaged or corrupted, troubleshooting is required.

In cases where CONFIG.SYS lacks a SHELL directive or is missing/corrupt, DOS attempts to locate COMMAND.COM in the root directory of the boot drive. Versions prior to 6.0 will fail to boot if this file is absent. MS-DOS 6.0, PC DOS 6.1, and later versions prompt users to specify the command interpreter's path. This prompt also appears if the primary shell terminates unexpectedly or exits intentionally, enabling limited shell replacement at runtime without rebooting.

COMMAND.COM from MS-DOS 7.0 and later is incompatible with DR-DOS, which often resides on C:\ in dual-boot configurations. From DR-DOS version 7.02 onward, skipping or tracing SHELL directives is disallowed unless a valid shell file is specified before loading COMMAND.COM from root. Some releases restore skip functionality to recover from invalid SHELL parameters.

The maximum size of CONFIG.SYS varies by operating system: MS-DOS and PC DOS impose a limit (up to 64 KB), whereas DR-DOS only restricts size based on file system constraints. MS-DOS compiles CONFIG.SYS into tokenized memory sorted by directive type, while DR-DOS processes directives sequentially line-by-line. This approach grants finer control over driver and TSR load order through DEVICE and INSTALL, facilitating conflict resolution and debugging by dynamically adjusting loading sequences and incorporating temporary external utilities.

In MS-DOS/PC DOS versions 2.0 through 4.01, SHELL lines are limited to 31 characters. Later versions extend this limit up to 128 characters, whereas DR-DOS supports lines up to 255 characters. None of these directives support long filenames within CONFIG.SYS.

Dual Booting DOS with 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 boot, these files are temporarily reverted to their original filenames. Backup copies of Windows 95 configuration files are saved as CONFIG.W40 and AUTOEXEC.W40.

For installations involving Caldera DR-DOS versions 7.02 or 7.03 alongside Windows 95, the Windows CONFIG.SYS and AUTOEXEC.BAT filenames remain unchanged, while DR-DOS employs DCONFIG.SYS and AUTODOS7.BAT for its startup sequence.

OS/2 and Windows NT

OS/2 extensively utilizes CONFIG.SYS for managing system setup, loading device drivers, and establishing the environment prior to launching its graphical user interface.

Within the OS/2 subsystem of Windows NT, the CONFIG.SYS perceived by OS/2 applications is actually maintained in the system registry. OS/2 makes use of numerous undocumented CONFIG.SYS commands.

CONFIG.SYS continues to be employed by OS/2-based operating 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
  • Guide to FreeDOS CONFIG.SYS directives
  • PTS-DOS 2000 Pro User Manual – includes details on CONFIG.SYS directives (archived)
  • Unofficial German-language PTS-DOS FAQ (PTS/FAQD) covering CONFIG.SYS directives
  1. ↑ Cite error: Invalid <ref> tag; no text was provided for refs named Paul_2000_CONFIG
  2. ↑ 2.0 2.1 2.2 Cite error: Invalid <ref> tag; no text was provided for refs named Paul_1997_OD-A3
  3. ↑ Cite error: Invalid <ref> tag; no text was provided for refs named Paul_1997_NWDOSTIP