DOS (CONFIG.SYS directive)
| Company type | Configuration file |
|---|---|
| Industry | Computer software |
| Founded | 1983 |
| Products | System configuration for DOS and OS/2 |
CONFIG.SYS serves as the main configuration file for DOS and OS/2 operating systems. This ASCII text file contains setup instructions accessible to users, which are interpreted by the 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 are used to set up DOS for hardware devices, software applications, and memory management utilities. Once CONFIG.SYS has been processed, DOS initiates the command interpreter specified by the SHELL directive; if none is specified, it defaults to COMMAND.COM, which then executes commands from AUTOEXEC.BAT.
This configuration file primarily contains name=value entries that define adjustable parameters or load components such as device drivers and terminate-and-stay-resident programs (TSRs) into system memory.
In DOS environments, CONFIG.SYS is located in the boot drive's root directory.
The same filename is also used by (DCP), an MS-DOS variant developed by East-German manufacturer VEB Robotron.
Certain DOS variants prioritize alternative filenames over CONFIG.SYS:
Earlier releases of Concurrent DOS versions 3.2 through 4.1 did not support CONFIG.SYS; however, later editions including Concurrent DOS 386, Concurrent DOS XM, Multiuser DOS, System Manager, and REAL/32 look for CCONFIG.SYS instead—the "C" representing "Concurrent". Some Multiuser DOS distributions utilize CCONFIG.INI, while REAL/32 seeks MCONFIG.SYS. These platforms offer extended configuration options (such as INIT_INSTALL) stored in binary CCONFIG.BIN files, usually managed through CONFIG.EXE.
In the case of DR DOS 3.31, PalmDOS 1.0, Novell DOS 7, OpenDOS 7.01, and DR-DOS versions 7.02 and later, DCONFIG.SYS takes precedence over CONFIG.SYS. Originally introduced alongside disk compression utilities to manage drive letter reassignment, it also supports multiple configuration files in multi-boot environments. Additionally, OpenDOS 7.01 and DR-OpenDOS 7.02 check for ODCONFIG.SYS, while some DR-DOS 7.02+ editions look for DRCONFIG.SYS.
Starting with DR DOS 6.0, the command SYS /DR:ext allows customization of default file extensions to maintain parallel sets of system files (for example, IBMBIO.703, IBMDOS.703, DCONFIG.703). This enables coexistence within a single root directory and selection via boot loaders such as LOADER included with Multiuser DOS and DR-DOS 7.x releases. The SHELL directive can specify alternate AUTOEXEC.BAT files using /P[:filename.ext], and COMMAND.COM supports extensions beyond ".BAT"—a feature also supported by 4DOS. The CHAIN=filespec command permits continuation of configuration processing in additional files located outside the root directory; from DR-DOS 7.02 onward, an optional label parameter allows targeted jumps within these chained files.
With DR-DOS 7.03 and later versions, the SYS /A option copies corresponding CONFIG.SYS and AUTOEXEC.BAT files alongside system files.
FreeDOS employs a similar configuration file named FDCONFIG.SYS, while RxDOS version 7.24 and above uses RXCONFIG.SYS. The operating system PTS-DOS utilizes CONFIG.PTS.
Both CONFIG.SYS and AUTOEXEC.BAT exist in the root directories of Windows 95 and Windows 98 boot drives but are generally empty.
Unlike its predecessors, Windows Me does not parse CONFIG.SYS during startup; instead, it loads environment variables directly from the Windows Registry at:
- HKLM\System\CurrentControlSet\Control\SessionManager\Environment
In contrast, under the FlexOS operating system, CONFIG.SYS is a binary 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>
:;*?!
- Marks labels within CONFIG.SYS to serve as jump destinations for , , , , and commands.
- Functions similarly to , also allowing inline comments following other commands. (Note: In MS-DOS/PC DOS, inline comments enclosed in double quotes are not ignored.)
- Used to initiate inline comments, serving as an alternative to the ; directive.
- Prompts a Yes/No confirmation before executing subsequent CONFIG.SYS commands. (FreeDOS supports boot menu conditions but lacks customizable messages.) From DOS 6.0 onward, a comparable feature is available by appending to relevant directives.
- Forces the execution of the next CONFIG.SYS command without condition.
ATemplate:NbndC
- Determines whether programs can be terminated upon encountering errors.
- Sets drives to record file access timestamps within FAT directory entries.
- Enables conditional execution specifically on AT-compatible hardware.
- Implements a boot manager.
- Adjusts the level of detail shown in error messages.
- Alters the default serial device driver assignment (COM1: through COM4:) for the AUX device.
- Prevents access to character devices outside the virtual \DEV directory.
- Loads fundamental device drivers into memory.
- Produces a brief beep sound even if audible alerts are disabled.
- Specifies which operating system should be loaded next during boot.
- Enables or disables extended Ctrl+C checking functionality.
- Defines the quantity of disk buffers to allocate.
- Similar to BUFFERS but explicitly loads buffers into High Memory Area or Upper Memory Blocks.
- , , (Embedded DOS 6-XL)
- Controls allocation and flushing timing of cache blocks.
- Executes programs specified in CONFIG.SYS, running them in the foreground and pausing processing until they return control.
- (DR-DOS 7.02+)
- Sets the keyboard Caps Lock state.
- , (PTS-DOS)
- Configures CD-ROM driver and associated buffer settings.
- (DR DOS 5.0+, Embedded DOS)
- Continues processing CONFIG.SYS from a new file or label location.
- , , , etc., adjust system display and device parameters tailored to specific OS versions.
COM Ports
Under DR-DOS 7.02 and later, defines the number, sequence, I/O addresses, and timeout values for COM ports (COM1 through COM4).
COMMENT
Reassigns characters used to initiate inline comments or causes entire lines to be ignored depending on DOS version.
COUNTRY
Activates and sets up internationalization support across different DOS distributions.
CPU Conditions
Allows conditional command execution based on CPU type (8088, 8086, 286, 386, 486), primarily supported by PTS-DOS and DR-DOS variants.
This segment outlines essential CONFIG.SYS directives crucial for configuring and optimizing systems across various DOS platforms, influencing device drivers, memory handling, and boot procedures vital in business IT infrastructures.
DTemplate:NbndF
- Manages relocation of drive descriptor tables.
- Indicates memory segment address used for multi-sector disk data deblocking.
- Activates internal debugger features.
- Implements a boot manager function.
- Loads device drivers into conventional memory.
- Loads device drivers into upper memory area (equivalent to in DRDOS 5.0).
- Sets country and codepage parameters for keyboard, screen, and printer devices.
- Configures sizes for cache memory allocation.
- Defines floppy disk compatibility mode settings.
- Specifies display font characteristics.
- Controls loading of DOS into high memory and utilization of upper memory blocks (similar to in DRDOS 5.0).
- Loads DOS resource tables (BUFFERS, FCBS, FILES, LASTDRIVE, STACKS) into upper memory area.
- Specifies alternate directory path for DOS system files.
- Defines search paths for data files.
- Sets physical parameters for disk drives.
- Assigns parameters for unrecognized drives.
- See .
- Enables error log creation on specified drive using PDUMP.nnn files.
- Controls display of messages on screen output devices.
- Displays messages including ANSI escape sequences support.
- Manages additional program startup verification checks.
- Defines expected error or return codes from programs.
- Adjusts A20 gate state when launching applications.
- Terminates CONFIG.SYS processing prematurely except for SWITCHES and SHELL directives under certain conditions.
- Sets hash table size to accelerate file opening operations (distinct from MS-DOS/PC DOS FASTOPEN driver implementation).
- Specifies number of cached File Control Blocks (FCBs) allowed open simultaneously (in DR-DOS, FCBS share buffer space with FILES).
- Similar to FCBS but loads FCBs into upper memory region.
- Boot manager functionality incorporated here as well.
- Defines maximum number of open files permitted concurrently.
- Like FILES but loads file handles into upper memory area.
- Includes execution of specified subsections within CONFIG.SYS (see IGNORE).
GTemplate:NbndI
- Waits for a key press or timeout, then assigns the error level to the ASCII value of the key or 1024 if timed out.
- Resumes processing of CONFIG.SYS at the indicated label.
- Continues nested CONFIG.SYS processing at a given label and returns to the previous point afterward.
- Refer to , , or for additional details.
- See also .
- Refer to .
- See or for related information.
- Consult or for further reference.
- See .
- Loads a terminate-and-stay-resident (TSR) program into memory following DOS data segment relocation. Compare with INSTCDEX.
- Refer to , , or for more information.
- See .
- Consult or for related commands.
- Activates console and command line history buffers, allowing enhanced pattern searching.
- Defines the segment address of the High Memory Area (HMA).
- Sets HLT (halt) mode for power-saving purposes.
- Performs boot sector virus detection during startup.
- Loads installable file system drivers.
- Prevents execution of specified CONFIG.SYS subsections.
- Permits certain programs to operate at ring 2, granting direct hardware I/O access.
- Incorporates directives from another menu block, emulated via GOSUB/RETURN in DR-DOS environments.
- Configures the Insert key mode status on the keyboard.
- Installs 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 so that a specified IRQ number receives the highest priority.
KTemplate:NbndM
- Defines the keyboard layout configuration.
- Sets the address for the relocated keyboard buffer.
- Specifies the maximum number of drives accessible by the system.
- Similar to LASTDRIVE but additionally loads the Current Directory Structure (CDS) into upper memory.
- Determines search paths for Dynamic Link Libraries (DLLs).
- Controls handling of legacy applications.
- Specifies the quantity of file locks allowed.
- Configures display settings for the boot logo.
- Sets parameters for LPT1 device including count, sequence, I/O address, and timeout values.
- Applies equivalent configuration settings to LPT2 device.
- Applies equivalent configuration settings to LPT3 device.
- Enables and configures LPT4 device parameters.
- Establishes wait duration before elevating process priority levels.
- Determines strategy for memory allocation management.
- Sets default method used by DOS for allocating memory resources.
- Defines available menu options within CONFIG.SYS processing.
- Specifies color schemes for menus (can be emulated under DR-DOS).
- Selects default menu block (emulation supported under DR-DOS).
- Defines individual menu blocks (emulatable in DR-DOS environments).
- Enables operations involving multiple disk tracks simultaneously.
- Continues CONFIG.SYS processing from a new file, with optional device driver loading and setting of %NEWFILE% environment variable.
NTemplate:NbndQ
- Sets default character representing No () in Yes/No/Resume prompts.
- Controls keyboard [[Num Lock|Template:Keypress]] state, toggling it on or off.
- Enables conditional execution based on the last error code encountered, e.g., .
- Displays a message and waits for a keypress, functioning similarly to and in DR-DOS systems.
- Requires user confirmation when errors occur during CONFIG.SYS processing.
- Configures buffer sizes assigned to LPT ports.
- Enables conditional execution specifically on PC-compatible hardware platforms.
- Adjusts priority scheduler settings within the system.
- Sets priority levels for disk input/output programs.
- Changes default printer device driver assignment from LPT1 to LPT3 or LPT4 for PRN devices.
- Specifies whether DOS-based programs are permitted to run on the system.
- Loads a user interface shell environment during startup.
- Enables conditional execution on IBM PS/1-compatible machines only.
- Enables conditional execution on IBM PS/2-compatible machines only.
- Suppresses output directed to STDOUT.
RTemplate:NbndT
- Enables automatic system reboot upon encountering errors.
- Permits inclusion of comments within CONFIG.SYS files.
- Allocates a drive letter for local block device drivers.
- Sets the default character used to resume operations during queries.
- Returns control from nested CONFIG.SYS processing back to the previous GOSUB or SWITCH point, optionally passing a return code.
- Specifies the size of real mode memory available.
- Functions like CALL but initiates programs in CONFIG.SYS simultaneously in the background.
- Saves the initial character of deleted files in a reserved FAT area.
- Defines video mode behavior under FreeDOS; under PTS-DOS, it determines screen access methods.
- Toggles the keyboard Scroll Lock state on or off.
- Assigns environment variables.
- Loads the command interpreter shell.
- Similar to SHELL but includes a SIZE parameter for pre-allocating memory in HMA or UMBs, enhancing memory efficiency with third-party shells.
- Sets keyboard modifier states such as Shift Lock, Num Lock, Scroll Lock, and Insert mode.
- Specifies how files are closed when Ctrl+Alt+Del is pressed.
- Controls whether POST is bypassed during system reboot.
- , STACKSIZE, STACKSHIGH
- Configure hardware interrupt stack sizes and buffer locations across various DOS versions, with some parameters ignored in newer or specific systems.
- , SYSBOOT, SYSGEN, SYSLOAD, SYSTOUMB (PTS-DOS only)
- Manage boot manager configurations, alternate OS boot files, DOS memory placements, and system loading into UMBs to optimize memory usage.
- , SWITCHES (DOS variants)
- Define submenu blocks or special options, with some commands unsupported by DR-DOS or FreeDOS but emulated through alternative directives.
- , SWAPPATH (OS/2)
- Manages error logging drives and swap file directories to enhance system stability and performance tuning.
- , SWITCHAR
- Allows conditional nested CONFIG.SYS processing triggered by key input and sets default switch characters ('/' or '-').
- , THREADS, TIMESLICE (OS/2)
- Configure fixes for FPU bugs, thread concurrency settings, and scheduler time slices for improved system performance.
- , TRACE, TRACEBUF
- Control command timeouts within CONFIG.SYS, enable single-step execution globally or locally, and set trace log buffer sizes for debugging across DOS variants including PTS-DOS and OS/2.
- , TRAPDUMP
- Defines temporary file extensions (PTS-DOS) and logs detailed error information (OS/2) to aid in system diagnostics.
UTemplate:NbndZ
- Sets a specific segment to be used as an Upper Memory Block (UMB) in DOS.
- Configures the UMB server parameters.
- Defines address ranges allocated as UMB RAM.
- Enables or disables verification of disk write operations.
- Specifies the DOS version number reported to applications.
- Controls VGA display status settings.
- Sets the current video mode similarly to FreeDOS's SCREEN command.
- Activates virtual DMA capabilities.
- Manages deactivation of the processor’s Virtual Mode Extensions.
- Configures VxD drivers for Windows environments.
- Sets up system support parameters for Windows operation.
- Adjusts relocation settings for the Extended BIOS Data Area (XBDA).
- Executes conditionally on XT-compatible hardware platforms.
- Enables built-in Year 2000 compliance support.
- Defines the default 'Yes' character used in prompt responses.
- Configures tracking of file deletions.
Issues
Although the system can start without CONFIG.SYS or AUTOEXEC.BAT, these files are crucial for comprehensive customization and meeting software needs during startup. If either file becomes damaged or corrupted, troubleshooting is necessary.
When CONFIG.SYS does not contain a SHELL directive or if it is missing or corrupted, DOS attempts to locate COMMAND.COM in the root directory of the boot drive. Versions prior to 6.0 will fail if COMMAND.COM is not found, whereas MS-DOS 6.0, PC DOS 6.1, and Novell DOS 7 and later will prompt the user to specify the path to a command processor. This prompt also appears if the command interpreter terminates intentionally or crashes, offering a limited shell replacement without requiring a reboot.
COMMAND.COM from MS-DOS 7.0 and newer is incompatible with DR-DOS, though they frequently coexist in dual-boot configurations. Starting with DR-DOS 7.02, bypassing SHELL directives during skip, trace, or step modes is restricted to prevent conflicts. If no valid shell is found before loading COMMAND.COM by default, users are prompted to provide an appropriate shell path.
The maximum size of CONFIG.SYS differs among operating systems: MS-DOS and PC DOS limit it to 64 KB in recent editions, while DR-DOS imposes no fixed size limit other than file system constraints. MS-DOS processes CONFIG.SYS by compiling it into a tokenized format in memory before executing directives sequentially—device drivers first, followed by TSRs. Conversely, DR-DOS parses CONFIG.SYS line-by-line during execution, allowing fine-grained control over loading order and conditional processing based on hardware detection or error states. This approach aids in resolving driver conflicts and supports integration of debugging tools.
DR-DOS also includes an INSTALL directive that enables running non-resident programs within the CONFIG.SYS processing sequence, further enhancing configuration flexibility.
In MS-DOS and PC DOS versions 2.0 through 4.01, the SHELL command line was limited to 31 characters; later releases expanded this limit to 128 characters, while DR-DOS supports up to 255 characters. Notably, CONFIG.SYS directives do not accept long filenames.
Dual booting DOS and Windows 9x
When Windows 95 is installed over an existing DOS or Windows environment, it renames CONFIG.SYS and AUTOEXEC.BAT to CONFIG.DOS and AUTOEXEC.DOS respectively to enable dual boot functionality. During a boot into DOS mode, these files are temporarily renamed back to their original filenames. Meanwhile, backups of the Windows 95 versions are saved as CONFIG.W40 and AUTOEXEC.W40.
In systems where Caldera DR-DOS 7.02 or 7.03 is installed alongside Windows 95, the Windows CONFIG.SYS and AUTOEXEC.BAT remain untouched. Instead, DR-DOS uses DCONFIG.SYS and AUTODOS7.BAT as its startup configuration files.
OS/2 / Windows NT
OS/2 depends extensively on CONFIG.SYS for setting up drivers and environment variables prior to launching its graphical user interface.
Within the OS/2 subsystem of Windows NT, the CONFIG.SYS configuration perceived by OS/2 applications is actually stored within the Windows registry.
There exist several undocumented CONFIG.SYS commands specific to OS/2.
CONFIG.SYS continues to be utilized by OS/2 derivatives 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 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
- FreeDOS CONFIG.SYS directive documentation (archived)
- PTS-DOS 2000 Pro User Manual including CONFIG.SYS commands (archived)
- German-language unofficial PTS-DOS FAQ (PTS/FAQD) with CONFIG.SYS information (archived)