EECHO (CONFIG.SYS directive)
| Company type | Configuration file |
|---|---|
| Industry | Operating systems |
| Founded | 1983 |
| Products | System configuration directives for DOS and OS/2 |
CONFIG.SYS serves as the chief configuration file for the DOS and OS/2 operating system families. This plain text file, written in ASCII, holds configuration instructions that the operating system's DOS BIOS—typically 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 configuring DOS to manage devices, applications, and memory allocation. Once CONFIG.SYS has been processed, DOS launches the command interpreter indicated by the SHELL directive; if none is specified, it defaults to COMMAND.COM, which then executes AUTOEXEC.BAT.
This file primarily contains directives in the form of name=value, which either set system parameters or load device drivers and TSR (terminate-and-stay-resident) programs into memory.
In DOS systems, 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 the former East-German company VEB Robotron.
Certain DOS variants prioritize alternative configuration filenames over CONFIG.SYS:
- Advanced iterations of Concurrent DOS 386, Concurrent DOS XM, Multiuser DOS, System Manager, and REAL/32 use CCONFIG.SYS or CCONFIG.INI instead. These versions maintain extra settings within a binary file named CCONFIG.BIN, typically managed through CONFIG.EXE.
- From DR DOS 3.31 onwards—including versions like Novell DOS 7 and DR-DOS 7.02+—the system gives precedence to DCONFIG.SYS above CONFIG.SYS. This feature supports disk compression utilities and multi-boot environments.
- OpenDOS 7.01 and DR-OpenDOS 7.02 look for ODCONFIG.SYS, while some DR-DOS releases also check for DRCONFIG.SYS.
Starting with DR-DOS 6.0, users can customize default system file extensions using SYS /DR:ext. This allows multiple sets of system files to coexist in a single root directory, selectable through boot loaders such as LOADER included with Multiuser DOS and DR-DOS 7.x versions.
The SHELL command permits specifying alternate AUTOEXEC.BAT files via the /P[:filename.ext] option; in this mode, COMMAND.COM accepts extensions other than .BAT (a feature also supported by 4DOS).
DR-DOS supports a CHAIN=filespec[,label] directive that enables continued processing of another configuration file, even if it resides outside the root directory.
From DR-DOS 7.03 onwards, a SYS /A option was introduced to copy both CONFIG.SYS and AUTOEXEC.BAT alongside other system files.
For other DOS variants: FreeDOS employs FDCONFIG.SYS, RxDOS version 7.24 and above uses RXCONFIG.SYS, while PTS-DOS utilizes CONFIG.PTS.
In systems based on DOS such as Windows 95 and Windows 98, CONFIG.SYS and AUTOEXEC.BAT exist on the boot partition but are frequently left empty. In contrast, Windows Me does not process CONFIG.SYS during startup, instead retrieving environment variables from the Windows Registry.
Under the FlexOS operating system, CONFIG.SYS takes the form of a binary file that specifies resource managers and device drivers.
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>
:;*?!
- Used to define labels within CONFIG.SYS, serving as jump targets for , , , and directives.
- Functions similarly to , but can be utilized for inline comments following other CONFIG.SYS commands. (Note: Under MS-DOS/PC DOS, inline comments within double quotes are not ignored.)
- Acts as a lead character for inline comments alongside the ; directive.
- Prompts a Yes/No confirmation before executing subsequent CONFIG.SYS commands. (FreeDOS allows optional conditions with boot menus using and .) DOS version 6.0 and later supports a comparable feature by appending after the directive, e.g., .
- Forces the immediate execution of the next CONFIG.SYS command without conditions.
ATemplate:NbndC
- Determines whether programs can be terminated upon encountering errors.
- Configures which drives maintain file access timestamps within FAT file systems.
- Enables conditional execution on AT-compatible hardware.
- Boot manager utility.
- Adjusts the verbosity level of error messages.
- Alters the default serial device driver assignment (from COM1: to COM4:) for the AUX: device.
- Restricts access to character devices outside the phantom \DEV directory.
- Loads a fundamental device driver into memory.
- Generates an audible beep even if sound notifications are disabled.
- Specifies the operating system to boot next in sequence.
- Enables or disables extended Ctrl+C signal monitoring.
- Defines the number of disk buffers allocated.
- Similar to BUFFERS but loads buffers into High Memory Area (HMA) or Upper Memory Blocks (UMB).
- Sets the maximum number of cache blocks allocated from the system pool.
- Defines the maximum duration before unused cache blocks return to the system pool.
- Sets the maximum time before dirty cache blocks are written back to disk.
- Loads external programs within CONFIG.SYS and pauses processing until they return control.
- Sets the keyboard's Caps Lock state at startup.
- Specifies the CD-ROM device driver name.
- Defines the number of buffers used for CD-ROM access.
- Continues processing CONFIG.SYS from a new file or label location.
- Specifies the type of system clock in use.
- Clears the screen display.
- Defines OEM codepage(s) for character encoding.
- Specifies CMOS RAM address settings.
- Configures colors used in boot menus.
- , ;, ;, ;
- Defines count, logical order, I/O addresses, and timeout settings for COM ports (available in DR-DOS 7.02 and later).
- (PTS-DOS)
- Specifies DMA buffer allocation.
- Redefines characters that initiate inline comments or causes subsequent lines to be ignored (DOS 4.0+, RxDOS).
- Enables and configures international language support (DOS 3.0+, DR DOS 3.31+, OS/2).
- Sets cursor position on screen for configuration menus (DR DOS 6.0+).
- Supports codepage switching (MS-DOS versions 4.00-4.01, ignored by DR-DOS 7.02+).
- CPU directives (CPU, CPU88, CPU86, CPU286, CPU386, CPU486, etc.)
- Conditional execution based on CPU model or speed across various DOS versions.
DTemplate:NbndF
- Manages 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 a device driver into conventional memory space.
- Loads a device driver into upper memory area (equivalent to in DRDOS 5.0).
- Configures country settings and codepages for keyboard, screen, and printer devices.
- Sets sizes of cache memory buffers.
- Defines floppy disk compatibility mode parameters.
- Selects display font options.
- Controls whether DOS loads into high memory or utilizes upper memory blocks.
- Loads DOS system tables such as BUFFERS, FCBS, FILES, LASTDRIVE, STACKS into upper memory areas.
- Specifies an alternate directory path for DOS system files.
- Defines search paths for data files used by DOS utilities.
- Sets physical parameters for hard disk drives.
- Establishes configurations for unknown or unrecognized drives.
- See .
- Enables error logging with PDUMP.nnn files and specifies target drive for logs.
- Displays messages directly on screen output during boot or configuration phases.
- Shows messages incorporating ANSI escape sequences for enhanced formatting.
- Activates additional verification checks when starting programs.
- Specifies expected error or return codes from programs or drivers.
- Controls A20 gate state when launching applications to manage memory addressing beyond 1MB boundary.
- Terminates CONFIG.SYS processing prematurely with some exceptions allowed.
- Sets hash table size to speed up file opening operations (different implementation than MS-DOS/PC DOS FASTOPEN driver).
- Determines number of cached File Control Blocks (FCBs) allowed open simultaneously (shares buffer with FILES under DR-DOS).
- Similar to FCBS but loads these structures into upper memory area instead of conventional memory.
- Boot manager function for managing multiple operating systems or configurations.
- Sets maximum number of files that can be opened at once by DOS processes.
- Same as FILES but loads file handles into upper memory blocks rather than conventional memory space.
- Includes execution of specified subsections within CONFIG.SYS files (refer to 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 CONFIG.SYS processing from a specified label.
- Continues nested CONFIG.SYS processing at a given label, returning control to the previous location afterward.
- Refer to , , or for additional information.
- Consult for further details.
- See for more context.
- Refer to or as applicable.
- See or for related commands.
- Consult for further instructions.
- Loads a terminate-and-stay-resident (TSR) program into memory following DOS data segment relocation. Compare with INSTCDEX.
- See , , or for related operations.
- Refer to for additional guidance.
- See or for comparable commands.
- Enables extended command line and console history buffer with enhanced pattern searching capabilities.
- Defines the address of the High Memory Area (HMA) segment.
- Configures energy-saving behavior using HLT instructions.
- Sets parameters for system boot sector virus scanning.
- Loads installable file system drivers.
- Excludes specified CONFIG.SYS subsections from execution.
- Grants certain programs permission to run at ring 2, allowing direct hardware I/O access.
- Incorporates directives from another menu block, emulated via GOSUB/RETURN in DR-DOS environments.
- Sets the status of the keyboard Insert mode.
- 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 post-DOS data segment relocation. Compare with INSTCDEX.
- Modifies PIC interrupt priorities by rotating them to give precedence to the specified IRQ number.
KTemplate:NbndM
- Defines the keyboard layout configuration.
- Specifies the address of the relocated keyboard buffer.
- Sets the maximum number of drives accessible by the system.
- Similar to LASTDRIVE but additionally loads the Current Directory Structure into upper memory.
- Lists search paths for dynamic-link libraries (DLLs).
- Configures handling procedures for legacy applications.
- Determines the number of file locks allowed concurrently.
- Manages boot logo display and startup message settings.
- Configures count, order, I/O address, and timeout parameters for the LPT1 port device.
- Sets similar configurations for the LPT2 port device.
- Applies comparable settings to the LPT3 port device.
- Enables and configures parameters for LPT4 device support.
- Defines the wait time before elevating process priority for waiting tasks.
- Specifies strategies for memory allocation management.
- Establishes default DOS memory allocation policies.
- Defines available menu options within CONFIG.SYS menus.
- Specifies menu color schemes, emulated under DR-DOS systems.
- Sets default menu blocks, with emulation support in DR-DOS environments.
- Defines multiple menu blocks, as emulated in DR-DOS implementations.
- Enables multitrack disk drive operations support.
- Continues CONFIG.SYS processing from an external file, optionally loading a device driver and setting %NEWFILE% environment variable.
NTemplate:NbndQ
- Sets the default character interpreted as "No" () in Yes/No/Resume prompts.
- Toggles keyboard [[Num Lock|Template:Keypress]] state on or off at startup.
- Allows conditional execution based on the last error code returned, e.g., .
- Displays a message and waits for a key press, serving a similar function as and in DR-DOS systems.
- Requires user confirmation when errors occur during CONFIG.SYS processing.
- Configures buffer sizes for LPT ports to optimize data transmission.
- Enables conditional execution specifically on PC-compatible machines only.
- Adjusts process scheduler priority levels accordingly.
- Modifies priority settings specifically for disk I/O related programs.
- Changes default printer driver assignment (for example, switching from LPT1 to LPT3 or LPT4).
- Restricts execution permissions for DOS programs under certain conditions.
- Loads a user interface shell environment during startup.
- Enables conditional execution exclusively on IBM PS/1-compatible hardware platforms.
- Allows conditional execution solely on IBM PS/2-compatible systems.
- Suppresses output directed to STDOUT during command execution.
RTemplate:NbndT
- Activates automatic system reboot upon encountering errors.
- Permits inclusion of comments within CONFIG.SYS.
- Prevents local block devices from assigning a specific drive letter.
- Establishes the default Resume () character for Yes/No/Resume prompts.
- Returns nested CONFIG.SYS processing control to the previous GOSUB or SWITCH point, optionally passing a return code.
- Sets the size of real mode memory available.
- Enables simultaneous loading of programs in CONFIG.SYS (background execution), akin to CALL or INSTALL commands in DOS.
- Controls whether the first character of deleted files is stored in the FAT reserved area.
- Defines video mode settings for FreeDOS or screen access methods for PTS-DOS.
- Toggles the keyboard Scroll Lock state on or off.
- Establishes environment variables.
- Loads the command interpreter shell.
- Similar to SHELL but permits pre-allocation size for COMMAND.COM to relocate into HMA or UMBs, optimizing memory usage with third-party shells.
- Specifies keyboard modifier key states (Shift Lock, Num Lock, Scroll Lock, Insert).
- Determines file closure behavior when Ctrl+Alt+Del is pressed.
- Controls whether POST is bypassed during reboot.
- , STACKSIZE, STACKSHIGH
- Configure hardware interrupt stack sizes and buffer locations across various DOS versions and derivatives.
- , SYSBOOT, SYSGEN, SYSLOAD
- PTS-DOS directives managing boot processes and system memory setup.
- , SWITCH
- Handles submenu blocks and nested conditional CONFIG.SYS processing specific to DR DOS.
- , SWAPPATH, THREADS, TIMESLICE
- OS/2 parameters for error logging, swap file paths, multitasking concurrency, and scheduler time slices.
- , SWITCHES
- Define default switch characters and special options across different DOS variants.
- , TRACEBUF
- Enables or disables stepwise execution of CONFIG.SYS with log buffer sizing in OS/2 and DOS variants.
- , SXFAKEHWFPU
- OS/2 options addressing error logging and floating-point unit bug fixes.
This set of CONFIG.SYS commands demonstrates the extensive customization options available across DOS variants—emphasizing strategic adaptability for system tuning, error management, memory allocation, and hardware compatibility essential for enterprise environments maintaining legacy systems.
UTemplate:NbndZ
- Directs DOS to utilize a specified segment as Upper Memory Block (UMB) space.
- Specifies which UMB server is employed.
- Defines address ranges allocated as UMB RAM.
- Enables or disables verification of disk writes.
- Sets the DOS version reported to applications.
- Configures VGA display status parameters.
- Similar to , sets the current video mode configuration.
- Determines whether virtual DMA usage is permitted.
- Specifies if the processor’s Virtual Mode Extensions (VME) should be disabled.
- Configures VxD drivers for Windows environments.
- Sets system support options for Windows operation.
- Manages relocation of the Extended BIOS Data Area (XBDA).
- Executes conditionally on XT-compatible machines only.
- Enables built-in Year 2000 compliance support.
- Defines the default affirmative character (Y) in Yes/No/Resume prompts.
- Controls deletion tracking functionality.
Issues
Although the system can start without a CONFIG.SYS file or if it is corrupted, this file together with AUTOEXEC.BAT is critical for completing a full DOS boot sequence. These files customize operating system behavior and specify software requirements. When either becomes damaged, troubleshooting is necessary.
If CONFIG.SYS lacks a SHELL directive or is corrupted, 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 missing. MS-DOS 6.0, PC DOS 6.1, Novell DOS 7, and later versions prompt users to enter a command processor path instead. This recovery prompt also appears if the main command processor terminates unexpectedly or exits intentionally, offering a limited runtime shell substitute without requiring a reboot.
In dual-boot configurations involving DR-DOS, MS-DOS 7+ COMMAND.COM does not support DR-DOS compatibility. Consequently, DR-DOS versions 7.02 and later prevent bypassing SHELL directives during skip/trace/step operations (triggered by Ctrl+F5/F7/F8). Subsequent releases introduced Ctrl+F6 to restore skip functionality as a recovery measure from invalid SHELL parameters. If no SHELL directive exists when skipping CONFIG.SYS processing, users must input a valid shell filename before COMMAND.COM loads from the root directory.
CONFIG.SYS size limits vary: MS-DOS/PC DOS restrict it to several kilobytes (up to 64 KB in newer editions), whereas DR-DOS imposes no fixed limit beyond file system constraints. MS-DOS compiles CONFIG.SYS into a tokenized form in memory before sorting directives by category. In contrast, DR-DOS interprets directives sequentially line-by-line, enabling fine-grained control over driver and TSR loading order through DEVICE and INSTALL. This approach resolves load order conflicts effectively and supports conditional execution based on processor type, key presses, errors, or software return codes. The INSTALL directive further permits integration of non-resident programs into CONFIG.SYS processing.
In MS-DOS/PC DOS versions 2.0 through 4.01, the SHELL command line was limited to 31 characters. Later versions extended this limit up to 128 characters. DR-DOS supports up to 255 characters. Notably, CONFIG.SYS directives do not accommodate long filenames.
Dual booting DOS and Windows 9x
During the installation of Windows 95 over a pre-existing DOS or Windows environment, the files CONFIG.SYS and AUTOEXEC.BAT are renamed to CONFIG.DOS and AUTOEXEC.DOS respectively. This renaming supports dual boot functionality between Windows 9x and DOS. When booting into DOS, these original filenames are temporarily restored. Meanwhile, backup copies of the Windows 95 versions are retained under the names CONFIG.W40 and AUTOEXEC.W40.
In setups where Caldera DR-DOS 7.02 or 7.03 is installed alongside Windows 95, the Windows CONFIG.SYS and AUTOEXEC.BAT files remain intact. Instead, DR-DOS utilizes DCONFIG.SYS and AUTODOS7.BAT as its configuration files during startup.
OS/2 / Windows NT
OS/2 extensively depends on CONFIG.SYS to set up drivers and environmental parameters before initiating its graphical user interface.
Within the OS/2 subsystem of Windows NT, configuration settings from CONFIG.SYS for OS/2 applications are maintained in the system registry rather than in traditional configuration files.
A significant portion of CONFIG.SYS commands in OS/2 are either undocumented or only sparsely described.
CONFIG.SYS continues to be employed by OS/2-based operating systems such as eComStation and ArcaOS.
See also
- IBMBIO.COM / IO.SYS
- IBMDOS.COM / MSDOS.SYS
- CONFIG (environment variable)
- AUTOEXEC.BAT
- COMMAND.COM
- List of DOS commands
External links
- AUTOEXEC.BAT and CONFIG.SYS details – Computer Hope
- Overview of Windows 98 / MS-DOS 7.10 CONFIG.SYS commands
- CONFIG.SYS command guide – Caldera (partial DR-DOS 7 directives)
- Explanation of FreeDOS CONFIG.SYS commands
- PTS-DOS 2000 Pro manual (partial CONFIG.SYS command list)
- Unofficial German PTS-DOS FAQ (PTS/FAQD), featuring extra CONFIG.SYS commands