MENUDEFAULT (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 central configuration file for DOS and OS/2 operating systems. This plain text file, written in ASCII, includes setup instructions that the OS's DOS BIOS—commonly found in IBMBIO.COM or IO.SYS—processes during system startup. CONFIG.SYS was first introduced with DOS version 2.0.
Usage
The directives within CONFIG.SYS tailor DOS to manage devices, applications, and memory allocation. Once CONFIG.SYS has been executed, DOS launches the command interpreter specified by the SHELL directive; if none is indicated, it defaults to COMMAND.COM, which subsequently runs AUTOEXEC.BAT.
Typically, the file contains name=value pairs that set configuration 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.
Certain DOS variants prioritize alternative configuration filenames over CONFIG.SYS:
- Systems such as Concurrent DOS 386, Concurrent DOS XM, Multiuser DOS, System Manager, and REAL/32 look for CCONFIG.SYS or CCONFIG.INI (for Multiuser DOS) and MCONFIG.SYS (for REAL/32). These platforms support enhanced configuration stored in binary files like CCONFIG.BIN, typically managed through CONFIG.EXE.
- Starting with DR DOS 3.31 and later editions—including PalmDOS 1.0, Novell DOS 7, OpenDOS 7.01, and DR-DOS 7.02+—the file DCONFIG.SYS takes precedence over CONFIG.SYS. This naming scheme facilitates disk compression utilities and multi-boot environments. Additionally, OpenDOS 7.01 and DR-OpenDOS 7.02 check for ODCONFIG.SYS, while select DR-DOS 7.02+ releases also recognize DRCONFIG.SYS.
- From DR-DOS 6.0 onward, users can modify default system file extensions using SYS /DR:ext, allowing multiple system files to coexist within a single root directory and be selected by boot loaders like those bundled with Multiuser DOS and DR-DOS 7.x.
- The SHELL command supports specifying alternative AUTOEXEC.BAT files via /P[:filename.ext], enabling COMMAND.COM to accept executable files with extensions other than .BAT—a feature also available in 4DOS.
- DR-DOS versions 6.0 and later introduce a CHAIN=filespec directive that permits loading additional configuration files from locations outside the root directory; beginning with DR-DOS 7.02+, this directive can target specific labels within those chained files.
- With DR-DOS 7.03+, the command SYS /A can copy both CONFIG.SYS and AUTOEXEC.BAT alongside other system files.
Comparable functionalities are present in other DOS derivatives:
- FreeDOS utilizes FDCONFIG.SYS, - RxDOS version 7.24 and above uses RXCONFIG.SYS, - PTS-DOS employs CONFIG.PTS.
Within Windows 95 and Windows 98, both CONFIG.SYS and AUTOEXEC.BAT exist on boot volumes but are generally left empty since these operating systems are based on DOS but manage configurations differently. Unlike its predecessors, Windows Me does not process CONFIG.SYS during startup; instead, it retrieves environment variables directly from the Windows Registry at:
- HKLM\System\CurrentControlSet\Control\SessionManager\Environment
For FlexOS, CONFIG.SYS is a binary configuration file that specifies resource managers and device drivers loaded at boot time.
Example
Below is a sample CONFIG.SYS file 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>
:;*?!
- Establishes labels within CONFIG.SYS that serve as jump targets for , , , , and commands.
- Functions similarly to , but additionally allows for inline comments following other CONFIG.SYS instructions. (In MS-DOS/PC DOS, inline comments enclosed in double quotes are not ignored.)
- Introduces inline comments alongside the ; directive.
- Presents a Yes/No prompt, optionally requesting user confirmation before proceeding with subsequent CONFIG.SYS commands.[1] (FreeDOS extends this with conditional options through and in boot menus.) DOS version 6.0 and later provides comparable functionality by appending after the directive (e.g., ).
- Forces unconditional execution of the following CONFIG.SYS command.
ATemplate:NbndC
- Determines whether applications can be interrupted upon error occurrence.
- Configures which drives record file access timestamps in FAT file systems.
- Enables conditional execution on AT-compatible hardware.
- Acts as a boot manager.
- Adjusts verbosity level of error messages.
- Alters default serial device driver associated with the AUX device.
- Prevents access to character devices outside the phantom \DEV directory.
- Loads a base device driver into memory.
- Produces a beep sound even if audible alerts are disabled.
- Defines the next operating system to boot.
- Enables or disables extended Ctrl+C handling.
- Specifies the quantity of disk buffers to allocate.
- Explicitly loads buffers into High Memory Area (HMA) or Upper Memory Blocks (UMB).
C
- , , (Embedded DOS 6-XL)
- Controls allocation and flushing timing of cache blocks.
- (OS/2 4.0+)
- Executes programs within CONFIG.SYS, pausing further processing until completion.
- (DR-DOS 7.02+)
- Sets Caps Lock status on the keyboard.
- , (PTS-DOS)
- Defines CD-ROM driver name and buffer quantity.
- (DR DOS 5.0+, Embedded DOS)
- Continues CONFIG.SYS processing from a new file or label.
- , , and other display-related directives govern system interface behavior during startup.
COM Ports
- , ..., (DR-DOS 7.02+)
- Configure number, sequence, I/O addresses, and timeout settings for COM port devices.
COMMENT
- , supported from DOS version 4.0 onward, serves to insert inline remarks or to ignore specific lines.
COUNTRY
Activates configuration for internationalization support.
Conditional directives based on CPU type include CPU88, CPU86, CPU286, CPU386, CPU486 variants applicable in PTS-DOS and DR-DOS environments.
This concise summary emphasizes essential CONFIG.SYS directives pertinent to system configuration management within business contexts utilizing DOS-based operating systems.
DTemplate:NbndF
- Manages relocation of drive descriptor tables.
- Defines memory segment limit up to which multi-sector disk data deblocking is permitted.
- Activates internal debugger support.
- Functions as a boot manager.
- Loads a specified device driver into memory.
- Loads device drivers into upper memory areas (equivalent to in DRDOS 5.0).
- Sets country and codepage parameters for keyboard, screen, and printer devices.
- Configures cache memory sizes.
- Determines floppy disk compatibility mode.
- Specifies font used for display output.
- Controls loading of DOS into high memory and/or usage of upper memory (similar to in DRDOS 5.0).
- Loads DOS tables such as BUFFERS, FCBS, FILES, LASTDRIVE, STACKS into upper memory regions.
- Defines alternative directory path for DOS files.
- Sets search paths for data files.
- Specifies physical parameters for disk drives.
- Establishes parameters for unknown drives.
- Refer to .
- Allows designation of drive for PDUMP.nnn error logging files.
- Outputs a message on the screen.
- Displays messages incorporating ANSI escape sequences.
- Adds extra verification steps when launching programs.
- Specifies an error or return code to be assumed next.
- Defines A20 gate status upon program start-up.
- Terminates CONFIG.SYS processing prematurely except for SWITCHES and SHELL directives.
- Sets hash table size to accelerate file opening operations (distinct from MS-DOS FASTOPEN driver).
- Determines number of cached File Control Blocks open simultaneously (shares buffer space with FILES under DR-DOS).
- Similar to FCBS but loads into upper memory areas.
- Functions as a boot manager.
- Sets maximum number of files that can be open concurrently.
- Equivalent to FILES but loads handles into upper memory space.
- Incorporates execution of designated CONFIG.SYS subsections (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 processing of CONFIG.SYS at a designated label.
- Continues nested CONFIG.SYS processing at a specified label, then returns to the previous point.
- Refer to , , or for additional context.
- See also .
- See also .
- Refer to or for further details.
- Refer to or for further details.
- Consult for more information.
- Loads a TSR program into memory following relocation of the DOS data segment. Compare with INSTCDEX.
- See , , or for related commands.
- See also .
- Refer to or for more information.
- Activates console and command-line history buffering with advanced pattern search capabilities.
- Defines the segment address for HMA (High Memory Area).
- Configures power-saving settings related to the HLT instruction.
- Sets up system checks for boot sector viruses during startup.
- Loads installable file system drivers.
- Prevents execution of specified subsections within CONFIG.SYS.
- Permits certain applications to execute at ring 2, enabling direct hardware I/O access.
- Includes directives from another menu block, functionally similar to GOSUB/RETURN in DR-DOS environments.
- Sets the keyboard’s Insert mode status.
- Installs a TSR program into conventional memory.
- Loads a TSR program into upper memory, equivalent to HIINSTALL in DR DOS 5.0.
- Installs a TSR program after relocating the DOS data segment. Compare with INSTCDEX.
- Adjusts PIC interrupt priorities by rotating them to prioritize a specific IRQ number.
KTemplate:NbndM
- Defines the keyboard layout configuration.
- Specifies the memory address of the relocated keyboard buffer.
- Sets the maximum number of accessible drive letters.
- Similar to LASTDRIVE but additionally loads the Current Directory Structure (CDS) into upper memory.
- Lists paths where DLL files are searched for.
- Manages compatibility settings for legacy software.
- Determines the number of file locks allowed.
- Configures support for boot logos and startup messages when using PTS-DOS boot manager.
- Specifies count, order, I/O address, and timeout parameters for LPT1 printer device.
- Specifies count, order, I/O address, and timeout parameters for LPT2 printer device.
- Specifies count, order, I/O address, and timeout parameters for LPT3 printer device.
- Enables and configures LPT4 printer device similarly to other LPT ports.
- Sets delay time before increasing process priority level.
- Defines memory allocation policies and strategies.
- Establishes default DOS memory allocation behavior.
- Defines options available in system menus.
- Configures menu color schemes (can be emulated under DR-DOS).
- Sets the default menu block (emulatable in DR-DOS).
- Specifies individual menu blocks (emulatable in DR-DOS).
- Enables operations involving multitrack disks.
- Continues processing CONFIG.SYS in a new file after loading a device driver and setting the %NEWFILE% environment variable.
NTemplate:NbndQ
- Sets the default response character for No () in Yes/No/Resume prompts.
- Controls the state of the keyboard’s Num Lock key ([[Num Lock|Template:Keypress]]) on startup.
- Enables conditional execution based on the previous error code, such as .
- Displays text and waits for user key input, similar to and commands in DR-DOS systems.
- Requires user confirmation when errors occur during CONFIG.SYS processing.
- Configures buffer sizes for LPT port communications.
- Enables conditional execution on PC-compatible hardware platforms.
- Sets priority levels for task scheduling processes.
- Defines priority settings specifically for disk input/output operations.
- Changes the default printer device driver from LPT1 through LPT4 as specified.
- Determines whether DOS applications 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.
- Silences standard output display (STDOUT) during operation.
RTemplate:NbndT
- Activates automatic system reboot upon encountering errors.
- Permits inclusion of comments within CONFIG.SYS files.
- Allocates a drive letter reserved for local block device drivers.
- Defines the default character used in Yes/No/Resume prompts.
- Returns control from nested CONFIG.SYS processing to the previous GOSUB or SWITCH statement, optionally providing a return code.
- Sets the size of real mode memory available.
- Enables simultaneous loading of programs in CONFIG.SYS, functioning similarly to CALL or INSTALL commands found in other DOS variants.
- Saves the initial character of deleted files within the FAT reserved section.
- Determines video mode settings for FreeDOS or screen access methods for PTS-DOS.
- Configures the status of the keyboard Scroll Lock key.
- Establishes environment variable values.
- Loads the command interpreter shell.
- Similar to SHELL, but supports preloading COMMAND.COM into HMA or UMBs to reduce fragmentation, beneficial when using third-party shells.
- Specifies keyboard modifier key states such as Shift Lock, Num Lock, Scroll Lock, and Insert mode.
- Controls whether files are closed upon pressing Ctrl+Alt+Del.
- Bypasses POST during system reboot.
- (ignored in DR DOS versions 3.31-5.0 and 7.02+)
- Present for compatibility due to differing stack configurations in earlier DR DOS releases.
- (Applicable to DOS 3.2 and Novell DOS 7+, ignored by DR DOS 6.0 and PTS-DOS)
- Sets the count of hardware interrupt stacks.
- (Exclusive to Embedded DOS 6-XL)
- Defines default stack size allocated for new threads.
- (Supported by MS-DOS 7.0, DR-DOS 7.02+, FreeDOS)
- Functions like STACKS but loads buffers into upper memory areas.
- (PTS-DOS exclusive)
- Configuration settings for the boot manager.
- (MS-DOS 3.0 only, ignored in DR-DOS 7.02+)
- Reserved for internal use.
- (PTS-DOS only)
- Manages XMS A20 gate operation behavior.
- (DOS 6.0 and later, except DR DOS and FreeDOS)
- Specifies submenu block definitions, which can be emulated in DR-DOS using CLS, ECHO, and SWITCH commands.
- (Available in OS/2 3.0+)
- Redirects error logging to a drive instead of displaying popup notifications.
- (OS/2 exclusive)
- Designates the location path for swap files.
- (DR DOS 6.0 and newer)
- Enables conditional continuation of nested CONFIG.SYS processing at specified labels based on key input, with RETURN resuming from the previous point.
- (Supported by DOS 2.x, DOS Plus, DR-DOS 7.02+, PTS-DOS, FreeDOS, RxDOS)
- Sets the system’s default switch character ('/' or '-').
- (Applicable to DOS 4.0 and Novell DOS 7+, ignored by PTS-DOS)
- Defines special options affecting CONFIG.SYS processing behavior.
- (Introduced in OS/2 Warp 4 FixPak 1+)
- Applies a fix addressing FPU rounding errors.
- (PTS-DOS only)
- Specifies alternative filenames for booting different DOS operating systems.
- (PTS-DOS only)
- Configures memory addresses assigned to DOS components.
- (PTS-DOS only)
- Enables loading the system from alternative disk sectors.
- (Embedded DOS 6-XL only)
- Determines size of system memory pool for dynamic allocations.
- (PTS-DOS only)
- Loads DOS code and data segments into upper memory blocks (UMBs).
- (Exclusive to OS/2)
- Defines the number of threads supported concurrently by the system scheduler.
- (Supported by DR DOS 6.0+ and PTS-DOS)
- Sets timeouts for single-stepping through CONFIG.SYS and default responses for Yes/No queries as well as SWITCH selections—only PTS-DOS supports timeout values directly.
- (OS/2 only)
- Configures minimum and maximum time slices allocated by the scheduler.
- (PTS-DOS only)
- Specifies file extension used for temporary files.
- (DR-DOS 7.02+, PTS-DOS, OS/2)
- Enables or disables single-step execution of CONFIG.SYS and AUTOEXEC.BAT either globally or locally—implementation varies considerably between OS/2 and DOS environments.
- (Exclusive to OS/2)
- Sets the size of the TRACE log buffer.
- (Available from OS/2 version 3.0 onward)
- Captures detailed diagnostic error logs for troubleshooting purposes.
UTemplate:NbndZ
- Sets DOS to allocate a designated segment as an Upper Memory Block (UMB).
- Establishes the UMB management service.
- Defines memory address ranges allocated for UMB RAM.
- Toggles verification of disk write operations.
- Determines the DOS version presented to applications.
- Manages VGA display status settings.
- Indicates the active video mode.
- Activates virtual DMA capabilities.
- Regulates the processor’s Virtual Mode Extensions (VME).
- Configures the Virtual Device Driver (VxD) for Windows environments.
- Sets system parameters supporting Windows operation.
- Controls relocation of the Extended BIOS Data Area.
- Enables conditional command execution on XT-compatible hardware.
- Activates integrated Year 2000 compliance features.
- Specifies the default affirmative character in prompt responses.
- Manages tracking of file deletions.
Issues
Although booting is possible without CONFIG.SYS or AUTOEXEC.BAT, these files are crucial for tailoring the operating system and loading necessary software components. Corruption or damage to either file requires diagnostic intervention.
If CONFIG.SYS does not include a SHELL statement or if it is missing or corrupted, DOS attempts to locate COMMAND.COM in the root directory of the boot drive. Versions earlier than DOS 6.0 will fail to boot if COMMAND.COM is not found. Versions from MS-DOS 6.0, PC DOS 6.1, and Novell DOS 7 onward prompt users to specify the command processor’s path, offering recovery options when the shell fails or terminates unexpectedly. This mechanism also permits swapping the shell during runtime without restarting.
Due to compatibility issues between MS-DOS 7.x COMMAND.COM and DR-DOS, DR-DOS versions 7.02 and later enforce SHELL directives during skip, trace, and step debugging modes to prevent startup conflicts in dual-boot configurations. Recovery procedures include requesting a valid shell filename prior to loading COMMAND.COM from the root directory.
The maximum size allowed for CONFIG.SYS varies by operating system: MS-DOS and PC DOS limit it to a few kilobytes (up to approximately 64 KB), whereas DR-DOS imposes no effective size restriction, processing directives sequentially rather than compiling them. This approach provides enhanced flexibility in managing device drivers and terminate-and-stay-resident programs (TSRs) through DEVICE and INSTALL commands, allowing resolution of load order conflicts and enabling temporary program integration into startup sequences.
The permitted length of shell command lines expanded over time—from an initial limit of 31 characters in early MS-DOS releases up to 128 characters in later editions—with DR-DOS supporting up to 255 characters. It should be noted that CONFIG.SYS directives do not accommodate long filenames.
Dual booting DOS and Windows 9x
When Windows 95 is installed atop an existing DOS/Windows environment, the original CONFIG.SYS and AUTOEXEC.BAT files are renamed CONFIG.DOS and AUTOEXEC.DOS respectively, facilitating dual-boot capabilities between Windows 9x and DOS. During a DOS boot session, these files are temporarily restored to their standard names. Meanwhile, Windows 95 retains backup copies named CONFIG.W40 and AUTOEXEC.W40.
In setups where Caldera DR-DOS versions 7.02 or 7.03 coexist with Windows 95, the latter’s CONFIG.SYS and AUTOEXEC.BAT remain intact. DR-DOS utilizes separate configuration files named DCONFIG.SYS and AUTODOS7.BAT for its initialization process.
OS/2 / Windows NT
OS/2 relies heavily on CONFIG.SYS for driver setup and environment configuration before launching its graphical user interface.
Within the OS/2 subsystem on Windows NT, what appears as CONFIG.SYS to OS/2 applications is actually maintained within the system registry.
Numerous CONFIG.SYS commands employed by OS/2 remain undocumented.
CONFIG.SYS continues in use among OS/2-based 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
- Information on AUTOEXEC.BAT and CONFIG.SYS – Computer Hope (dated 2017-12-29)
- Overview of CONFIG.SYS directives for Windows 98 / MS-DOS 7.10
- Caldera’s CONFIG.SYS Command Reference (1998) – overview of DR-DOS 7 directives
- Guide to FreeDOS CONFIG.SYS directives
- PTS-DOS 2000 Pro User Manual – detailing PTS-DOS CONFIG.SYS commands
- Unofficial German PTS-DOS FAQ (2004-04-25) – includes extended CONFIG.SYS directive information
- ↑ Cite error: Invalid
<ref>tag; no text was provided for refs namedPaul_2000_CONFIG