DEFAULT (CONFIG.SYS directive)
| Company type | Configuration file |
|---|---|
| Industry | Operating systems |
| Founded | 1983 |
| Products | System configuration for DOS and OS/2 |
CONFIG.SYS serves as the central configuration file for the DOS and OS/2 operating system families. This plain text file contains setup instructions that are interpreted by the system's DOS BIOS—usually located in IBMBIO.COM or IO.SYS—during the startup process. CONFIG.SYS was first introduced with DOS version 2.0.
Usage
The file's directives are responsible for configuring DOS hardware, software, and memory management settings. Once CONFIG.SYS has been processed, the operating system launches the command interpreter specified by the SHELL directive, defaulting to COMMAND.COM if none is provided. Subsequently, this shell executes the commands found in the AUTOEXEC.BAT file.
CONFIG.SYS primarily contains name=value pairs that either adjust system parameters or load components such as device drivers and terminate-and-stay-resident programs (TSRs). It is located in the boot drive’s root directory.
The same filename is also utilized by (DCP), a variant of MS-DOS developed by East-German manufacturer VEB Robotron.
Certain DOS variants check for alternative configuration filenames that take precedence over CONFIG.SYS:
- Advanced editions like Concurrent DOS 386, Concurrent DOS XM, Multiuser DOS, System Manager, and REAL/32 prefer CCONFIG.SYS or CCONFIG.INI. REAL/32 may alternatively use MCONFIG.SYS. These platforms support enhanced configuration options stored in binary files such as CCONFIG.BIN, typically edited through CONFIG.EXE.
- Versions including DR DOS 3.31, PalmDOS 1.0, Novell DOS 7, and DR-DOS 7.02 and later prioritize DCONFIG.SYS. This facilitates disk compression features and multi-boot setups.
- OpenDOS 7.01 and DR-OpenDOS 7.02 search for ODCONFIG.SYS, while some DR-DOS 7.02+ releases also recognize DRCONFIG.SYS.
- Starting with DR DOS 6.0, users can alter default system file extensions using SYS /DR:ext, allowing multiple parallel sets of system files managed by boot loaders such as LOADER.
- The SHELL command supports specifying alternative AUTOEXEC.BAT filenames via /P[:filename.ext]. In this mode, COMMAND.COM accepts extensions other than ".BAT", a feature also supported by 4DOS.
- DR DOS includes a CHAIN=filespec directive to continue processing another configuration file; an optional label parameter enables jumping to specific sections.
- From DR-DOS 7.03 onward, the command SYS /A can copy both CONFIG.SYS and AUTOEXEC.BAT alongside system files.
FreeDOS uses FDCONFIG.SYS; RxDOS version 7.24 and above employ RXCONFIG.SYS; while PTS-DOS utilizes CONFIG.PTS.
In Windows 95 and 98, both CONFIG.SYS and AUTOEXEC.BAT reside in the root directory of the boot drive but are generally left empty. Windows Me does not process CONFIG.SYS during startup; instead, it loads environment variables from the registry at: HKLM\System\CurrentControlSet\Control\SessionManager\Environment
For the FlexOS operating system, CONFIG.SYS is not text-based but a binary file that specifies resource managers and device drivers.
Example
Below 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 as jump points for , , , , and commands.
- Functions similarly to , additionally used for inline comments after other directives. (Note: MS-DOS/PC DOS does not ignore inline comments enclosed in double quotes.)
- Begins inline comments alongside the ; command.
- Prompts with a Yes/No question to confirm execution of subsequent CONFIG.SYS commands.[1] (FreeDOS does not support custom messages but allows conditional execution via boot menus such as and .) DOS versions 6.0 and later offer a comparable feature by appending after commands (e.g., ).
- Executes the following command without conditions.
ATemplate:NbndC
- Determines whether programs can be terminated upon encountering errors.
- Configures which drives record file access timestamps on FAT file systems.
- Enables conditional execution on AT-compatible hardware.
- Boot manager configuration.
- Adjusts the level of error message detail.
- Changes the default internal serial device driver assigned to AUX.
- Prevents character devices from being accessible outside the phantom \DEV directory.
- Loads a fundamental device driver into memory.
- Produces a brief beep even if sound notifications are disabled.
- Indicates the operating system to boot next.
- Enables or disables extended Ctrl+C checking.
- Specifies how many disk buffers to allocate.
- Similar to BUFFERS but explicitly loads buffers into HMA or UMB areas.
- Sets the maximum number of cache blocks allocated from the system pool.
- Defines the maximum duration before idle cache blocks return to the pool.
- Sets the maximum time before dirty cache blocks are flushed to disk.
- Loads programs within CONFIG.SYS, running them in the foreground and pausing processing until completion.
- Specifies Caps Lock keyboard status.
- Defines the CD-ROM hardware driver name.
- Number of buffers allocated for CD-ROM access.
- Continues processing CONFIG.SYS from another file or label.
- Specifies the type of system clock used.
- Clears the display screen.
- Defines OEM codepage(s).
- Provides CMOS RAM address information.
- Sets colors used in boot menus.
- Defines count, order, I/O addresses, and timeouts for COM ports COM1 through COM4.
- Specifies buffer settings for DMA operations.
- Redefines characters that introduce inline comments or causes ignoring of subsequent lines.
- Activates and configures internationalization support.
- Sets cursor position within configuration menus.
- Supports codepage switching functionality.
- Specifies RAM refresh speed parameters.
- CPU-specific directives (CPU88, CPU86, CPU286, CPU386, CPU486 and their + variants) exist in PTS-DOS and certain DR-DOS versions for conditional execution based on CPU model or generation.
DTemplate:NbndF
- Configures relocation settings for drive descriptor tables.
- Provides memory segment address for multi-sector disk data deblocking operations.
- Enables internal debugger functionality.
- Boot manager setup options.
- Loads device drivers into conventional memory.
- Loads device drivers into upper memory areas (similar to in DRDOS 5.0).
- Sets country and codepage parameters for keyboard, screen, and printer devices (KBD, SCR, LPT).
- Adjusts cache memory size configurations.
- Specifies floppy disk compatibility mode settings.
- Defines display font selections.
- Controls loading of DOS into high memory and/or utilization of upper memory blocks.
- Loads DOS tables—such as BUFFERS, FCBS, FILES, LASTDRIVE, STACKS—into upper memory regions.
- Specifies alternative search paths for DOS files.
- Defines search paths for data files.
- Describes physical parameters of disk drives.
- Establishes parameters for unrecognized disk drives.
- See .
- Enables PDUMP.nnn error logging and specifies target drive location.
- Displays messages on screen output devices.
- Shows messages using ANSI escape sequences for enhanced formatting.
- Activates additional checks during program startup sequences.
- Sets assumed error or return codes for following commands.
- Controls A20 gate state when launching programs.
- Terminates CONFIG.SYS processing prematurely (except SWITCHES and SHELL directives).
- Defines hash table size to accelerate file open operations (distinct from MS-DOS/PC DOS FASTOPEN driver).
- Sets number of cached File Control Blocks (FCBs) open at once (shares buffer with FILES under DR-DOS).
- Similar to FCBS but loads FCBs into upper memory areas.
- Boot manager configuration parameter.
- Specifies maximum number of simultaneously open files allowed.
- Like FILES directive but loads file handles into upper memory regions.
- Includes execution of specified CONFIG.SYS subsections (refer to IGNORE).
GTemplate:NbndI
- Waits for a key press (or times out) and assigns 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 prior point.
- Refer to , , or for details.
- See also .
- Consult .
- Refer to or for further information.
- See or for additional context.
- Consult .
- Loads a TSR program into memory following relocation of the DOS data segment. Compare with INSTCDEX.
- Refer to , , or for related commands.
- See .
- Consult or for more details.
- Activates console and command line history buffer with enhanced pattern search capabilities.
- Defines the address of the HMA segment.
- Configures energy-saving mode via HLT instruction.
- Enables boot sector virus scanning during system startup.
- Loads installable file system drivers.
- Excludes execution of certain CONFIG.SYS subsections.
- Permits specific programs to run at ring 2, allowing direct hardware I/O access.
- Includes directives from another menu block (can be simulated using GOSUB/RETURN in DR-DOS).
- Sets the Insert key mode status on the keyboard.
- Loads a TSR program into memory.
- Installs a TSR program into upper memory, similar to HIINSTALL in DR DOS 5.0.
- Loads a TSR program after relocating the DOS data segment. Compare with INSTCDEX.
- Adjusts PIC interrupt priorities to assign highest priority to a designated IRQ number.
KTemplate:NbndM
- Defines the keyboard layout configuration.
- Specifies the relocated keyboard buffer's memory address.
- Sets the maximum number of accessible drives.
- Similar to LASTDRIVE but additionally loads the Current Directory Structure (CDS) into upper memory.
- Specifies paths for DLL searches.
- Manages compatibility settings for legacy applications.
- Determines the number of allowable file locks.
- Configures boot logo display when using PTS-DOS boot manager.
- Defines parameters such as count, order, I/O address, and timeout for LPT1 device.
- Sets count, order, I/O address, and timeout for LPT2 device configuration.
- Defines count, order, I/O address, and timeout settings for LPT3 device.
- Enables and configures settings for LPT4 device support.
- Specifies wait duration before elevating process priority.
- Controls memory allocation methodology.
- Sets default strategy for DOS memory allocation.
- Defines options available in system menus.
- Specifies color schemes for menus (can be emulated under DR-DOS).
- Selects default menu block (emulatable under DR-DOS).
- Defines individual menu blocks (emulatable under DR-DOS).
- Enables or disables multitrack disk operations functionality.
- Continues processing CONFIG.SYS in a new file after loading a driver and setting %NEWFILE% environment variable.
NTemplate:NbndQ
- Establishes default No () character used in Yes/No/Resume prompts.
- Controls status of keyboard [[Num Lock|Template:Keypress]] key.
- Allows conditional execution based on previous error code, e.g., .
- Displays message and waits for key input, akin to DR-DOS's and .
- Requires user confirmation upon encountering errors in CONFIG.SYS processing.
- Sets buffer sizes for LPT ports.
- Enables conditional execution on PC-compatible systems.
- Configures scheduler priority levels.
- Sets priority level specifically for disk I/O operations.
- Changes default printer device driver among LPT1, LPT3, or LPT4 ports.
- Controls permission settings for executing DOS programs.
- Loads user interface shell environment.
- Enables conditional execution on IBM PS/1-compatible machines.
- Enables conditional execution on IBM PS/2-compatible machines.
- Suppresses output displayed on STDOUT.
RTemplate:NbndT
- Activates automatic system reboot upon encountering errors.
- Permits inclusion of comments within CONFIG.SYS files.
- Allocates drive letters for local block device drivers in advance.
- Sets the default Resume () character displayed in prompts.
- Returns control from nested CONFIG.SYS processing back to the prior GOSUB or SWITCH location, optionally with a return code.
- Defines the size of real mode memory available.
- Allows programs specified in CONFIG.SYS to load simultaneously in the background, functioning similarly to CALL or INSTALL commands under DOS.
- Saves the initial character of deleted files into a reserved area of the FAT.
- Determines video mode for FreeDOS or screen access methods for PTS-DOS.
- Manages the state of the keyboard Scroll Lock key.
- Establishes environment variables for the session.
- Loads the command interpreter shell.
- Functions like SHELL but supports preloading COMMAND.COM into HMA or UMBs to minimize fragmentation.
- Specifies keyboard modifier states such as Shift Lock, Num Lock, and Scroll Lock.
- Controls whether files are closed when Ctrl+Alt+Del is pressed.
- Skips Power-On Self-Test (POST) during reboot sequences.
- , STACKSIZE, STACKSHIGH
- Configure hardware interrupt stack sizes and buffer locations across various DOS versions and embedded systems.
- , SYSBOOT, SYSGEN, SYSLOAD
- PTS-DOS commands responsible for boot management, system memory allocation, and loading alternative operating systems.
- , SUPPRESSPOPUPS, SWAPPATH
- Manage menu blocking, error logging drive assignments, and swap file directories within OS/2 and DOS variants respectively.
- , SWITCHES, SWITCHAR
- Directives for conditional processing and system option switches applicable across DOS versions including DR-DOS and FreeDOS.
- , THREADS, TIMESLICE
- OS/2-specific parameters addressing hardware fixes, thread concurrency control, and scheduler time slice settings.
- , TMPEXT
- Defines timeout intervals for CONFIG.SYS commands and temporary file extensions in DR-DOS and PTS-DOS environments.
- , TRACEBUF, TRAPDUMP
- Enable tracing of CONFIG.SYS execution flow and error logging on DR-DOS, PTS-DOS, and OS/2 platforms.
UTemplate:NbndZ
- Configures DOS to utilize a designated segment as Upper Memory Block (UMB).
- Sets parameters for the UMB server operation.
- Defines address ranges allocated as UMB RAM areas.
- Enables or disables verification of disk writes.
- Specifies the DOS version reported to applications.
- Manages VGA display status settings.
- Sets the active video mode configuration.
- Determines if virtual DMA functionality is permitted.
- Enables or disables processor Virtual Mode Extensions (VME).
- Configures VxD drivers used by Windows environments.
- Establishes system support options for Windows operation.
- Controls relocation of the Extended BIOS Data Area (XBDA).
- Conditional execution based on XT-compatible hardware detection.
- Configures integrated Year 2000 (Y2K) compatibility features.
- Sets default affirmative response character in user prompts.
- Manages tracking of file deletions.
Issues
While booting without CONFIG.SYS or AUTOEXEC.BAT is possible, these files are crucial for thorough customization and meeting software requirements. If they become corrupted or damaged, troubleshooting is necessary.
In cases where CONFIG.SYS lacks a SHELL directive or if the file 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 to start without this file. However, MS-DOS 6.0/PC DOS 6.1 and Novell DOS 7 and later will prompt users to specify a command processor path if COMMAND.COM is absent. This prompt also appears if the primary command interpreter terminates unexpectedly or exits intentionally, allowing limited shell replacement during runtime without requiring a reboot.
COMMAND.COM from MS-DOS 7.0 onward is not compatible with DR-DOS but often resides on drive C: in dual-boot configurations. Starting with DR-DOS 7.02, SHELL directives are enforced during skip, trace, or step modes to prevent bypasses that were common in previous versions. Some updates reintroduced limited skip functionality to recover from invalid SHELL arguments by prompting users to specify a valid shell before loading COMMAND.COM from the root directory.
CONFIG.SYS file size restrictions differ: MS-DOS/PC DOS historically limited these files to a few kilobytes (recently up to 64 KB), whereas DR-DOS imposes no practical limit aside from file system constraints. MS-DOS compiles CONFIG.SYS into a tokenized memory structure that orders directives so device drivers load before TSRs. Conversely, DR-DOS processes CONFIG.SYS sequentially line-by-line, offering precise control over driver and TSR load sequences through DEVICE and INSTALL commands. This approach facilitates resolving conflicts during loading and supports conditional execution based on processor type, keypress detection, error states, or software return codes. The INSTALL directive additionally permits running non-resident programs integrated directly within CONFIG.SYS processing.
Earlier iterations of MS-DOS/PC DOS restricted SHELL directive lines to 31 characters maximum, while later versions expanded this limit up to 128 characters. DR-DOS accepts up to 255 characters in this context. It should be noted that CONFIG.SYS directives do not support long filenames.
Dual Booting DOS with Windows 9x
When Windows 95 is installed over a pre-existing DOS or Windows environment, the original CONFIG.SYS and AUTOEXEC.BAT files are renamed to CONFIG.DOS and AUTOEXEC.DOS to enable dual boot functionality. During a DOS startup, these backup files are temporarily reinstated as CONFIG.SYS and AUTOEXEC.BAT. Additionally, backup copies of Windows 95 configuration files are saved 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 remain intact and unaltered. Instead, DR-DOS utilizes separate startup files named DCONFIG.SYS and AUTODOS7.BAT.
OS/2 and Windows NT
OS/2 heavily relies on CONFIG.SYS for loading device drivers and setting environment variables prior to launching its graphical user interface.
Within the OS/2 subsystem present in Windows NT, the CONFIG.SYS file perceived by OS/2 applications is actually maintained within the system registry rather than as a physical file.
Numerous CONFIG.SYS commands employed by OS/2 have not been officially documented.
The use of CONFIG.SYS persists in OS/2 successors 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 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
- Documentation of FreeDOS CONFIG.SYS directives
- PTS-DOS 2000 Pro User Manual including details on CONFIG.SYS commands
- Unofficial German PTS-DOS FAQ (PTS/FAQD) covering CONFIG.SYS directives
- ↑ Cite error: Invalid
<ref>tag; no text was provided for refs namedPaul_2000_CONFIG