PS2 (CONFIG.SYS directive)
| Company type | Configuration file |
|---|---|
| Industry | Operating systems |
| Founded | 1983 |
| Products | Configuration of DOS and OS/2 systems |
CONFIG.SYS serves as the main configuration file for the DOS and OS/2 operating system families. This plain text file contains setup instructions accessible to users that are interpreted by the operating system's DOS BIOS—commonly found in IBMBIO.COM or IO.SYS—during the startup process. CONFIG.SYS made its debut with DOS version 2.0.
Usage
The directives within CONFIG.SYS customize DOS for hardware devices, software applications, and memory management utilities. Once CONFIG.SYS is processed, DOS proceeds to launch the command interpreter specified by the SHELL directive; if none is specified, it defaults to COMMAND.COM, which then executes the AUTOEXEC.BAT script.
This file mainly consists of name=value pairs that set configurable parameters or load components such as device drivers and terminate-and-stay-resident programs (TSRs).
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 manufacturer VEB Robotron.
Certain DOS versions prioritize alternative configuration filenames over CONFIG.SYS:
Advanced editions of Concurrent DOS 386, Concurrent DOS XM, Multiuser DOS, System Manager, and REAL/32 replace CONFIG.SYS with CCONFIG.SYS. Some Multiuser DOS releases adopt CCONFIG.INI, whereas REAL/32 prefers MCONFIG.SYS. These platforms support extended configuration options stored in binary files like CCONFIG.BIN, which are commonly edited using CONFIG.EXE.
In systems such as DR DOS 3.31, PalmDOS 1.0, Novell DOS 7, OpenDOS 7.01, and DR-DOS 7.02+, a file named DCONFIG.SYS—where "D" represents "DR DOS"—takes precedence over CONFIG.SYS. Originally linked to disk compression utilities managing drive letter assignments, DCONFIG.SYS also facilitates multi-boot setups.
Moreover, OpenDOS 7.01 and DR-OpenDOS 7.02 check for ODCONFIG.SYS, while some DR-DOS 7.02+ variants look for DRCONFIG.SYS. The command SYS /DR:ext allows modification of default system file extensions to enable multiple concurrent configurations selectable via boot loaders like LOADER in Multiuser DOS and DR-DOS.
The SHELL directive can specify alternate AUTOEXEC.BAT files using /P[:filename.ext], with COMMAND.COM accepting extensions beyond ".BAT"—a feature also supported by 4DOS. Starting with DR-DOS 6.0, the CHAIN=filespec command permits chaining to another configuration file located outside the root directory, and DR-DOS 7.02+ supports jumping to specific labels within these chained files.
From version 7.03 onward, DR-DOS introduces a SYS /A option to copy matching CONFIG.SYS and AUTOEXEC.BAT files alongside system files.
FreeDOS implements a comparable mechanism through FDCONFIG.SYS, while RxDOS version 7.24+ employs RXCONFIG.SYS, and PTS-DOS uses CONFIG.PTS.
Due to their foundation on DOS, both CONFIG.SYS and AUTOEXEC.BAT are present in the root directory of Windows 95 and Windows 98 boot drives; however, these files are generally left empty.
Windows Me does not process CONFIG.SYS during startup but instead loads environment variables directly from the Windows Registry at:
- HKLM\System\CurrentControlSet\Control\SessionManager\Environment
In contrast, under FlexOS, CONFIG.SYS is a binary-format 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>
:;*?!
- Used to define labels within CONFIG.SYS, serving as jump points for , , , , and commands.
- Functions similarly to , also utilized for inline comments following other directives. (Note that under MS-DOS/PC DOS, inline comments enclosed in double quotes are not ignored.)
- Marks the start of inline comments, providing an alternative to the ; directive.
- Presents a Yes/No prompt to confirm whether subsequent CONFIG.SYS commands should execute. (FreeDOS does not support optional messages but allows conditional execution via boot menus.) DOS version 6.0 and later offers comparable functionality by appending after directives.
- Forces unconditional execution of the next directive.
ATemplate:NbndC
- Determines whether programs can be terminated upon encountering errors.
- Sets which drives record file access timestamps within FAT file systems.
- Enables conditional execution on AT-compatible hardware.
- Manages boot loading.
- Adjusts the verbosity level of error messages.
- Alters the default serial driver assigned to the AUX device.
- Prevents character devices from being accessible outside the phantom \DEV directory.
- Loads a fundamental device driver into memory.
- Produces a brief beep sound even if notification sounds are disabled.
- Specifies the operating system to boot next.
- Enables or disables extended Ctrl+C detection.
- Defines the number of disk buffers to allocate.
- Explicitly loads buffers into High Memory Area (HMA) or Upper Memory Blocks (UMB).
- , CACHETTL, CACHEFLUSH (Embedded DOS 6-XL only)
- Controls cache block management and flushing intervals.
- Executes programs within CONFIG.SYS, pausing processing until they return control.
- Sets the Caps Lock key status on the keyboard.
- , CDDBUFFERS (PTS-DOS only)
- Configures CD-ROM driver name and buffer allocation.
- (DR DOS 5.0+, Embedded DOS)
- Continues processing CONFIG.SYS in a new file or label.
- , CLS, CODEPAGE (various OS versions)
- Manages system clock type, clears the display, and sets OEM codepages.
- , COM2, COM3, COM4 (DR-DOS 7.02+)
- Configures serial port count, order, I/O addresses, and timeouts.
- , COMMENT(S) (various OS versions)
- Defines DMA buffer size and reassigns inline comment characters or ignores lines.
- (DOS 3.0+, DR DOS 3.31+, OS/2)
- Enables and configures international language support.
- , CPSW (various versions)
- Sets cursor position on screen and manages codepage switching capabilities.
- , CPU88, CPU86, CPU286, CPU386, CPU486 (+ variants) (PTS-DOS and DR-DOS)
- Executes conditionally based on CPU model and speed.
DTemplate:NbndF
- Controls relocation of drive descriptor tables in memory.
- Specifies memory segment address used for multi-sector disk data deblocking operations.
- Activates internal debugging features.
- Handles boot management functions.
- Loads device drivers into memory space.
- Loads device drivers into upper memory areas (equivalent to in DRDOS 5.0).
- Configures country-specific settings and codepages for keyboard, screen, and printer devices.
- Sets cache memory sizes for improved performance.
- Defines floppy disk compatibility modes.
- Selects font used for display output.
- Controls loading of DOS into high and/or upper memory regions (similar to in DRDOS 5.0).
- Loads essential DOS tables such as BUFFERS, FCBS, FILES, LASTDRIVE, STACKS into upper memory areas.
- Specifies alternate directories for DOS system files.
- Defines search paths for data files during operation.
- Sets physical parameters for disk drives connected to the system.
- Establishes parameters for drives that are not recognized automatically.
- See .
- Enables error logging by specifying drive location for PDUMP.nnn files.
- Displays a message on the screen during processing.
- Outputs messages including ANSI escape sequences for enhanced formatting.
- Adds extra verification steps when launching programs.
- Defines error or return codes assumed after execution of commands.
- Sets the state of the A20 gate upon program startup to manage memory addressing.
- Terminates CONFIG.SYS processing prematurely except for SWITCHES and SHELL directives under certain conditions.
- Adjusts hash table size to accelerate file open operations, differing from MS-DOS/PC DOS FASTOPEN driver behavior.
- Specifies how many File Control Blocks can be cached simultaneously (shares buffer with FILES under DR-DOS).
- Similar to FCBS but explicitly loads FCBs into upper memory areas.
- Boot management functionality included here as well.
- Determines maximum number of files that can be opened concurrently.
- Like FILES but loads file handles explicitly into upper memory regions.
- Includes execution of selected CONFIG.SYS subsections based on IGNORE directives.
GTemplate:NbndI
- Waits for a key press or timeout, then sets the error level to the ASCII value of the key pressed or 1024 if timed out.
- Resumes CONFIG.SYS processing at a designated label.
- Continues nested CONFIG.SYS processing at a specified label, returning afterward to the previous point.
- Refer to , , or for additional details.
- See further information in .
- Consult for more context.
- Refer to or for related commands.
- See or for comparable functions.
- Consult for additional guidance.
- Loads a terminate-and-stay-resident (TSR) program into memory following DOS data segment relocation. Compare with INSTCDEX.
- See , , or for related usage.
- Refer to for more information.
- Consult or for supplementary details.
- Activates console and command line history buffer with enhanced pattern searching capabilities.
- Defines the address of the High Memory Area (HMA) segment.
- Configures energy-saving mode using the HLT instruction.
- Specifies virus scanning of the system boot sector.
- Loads installable file system drivers.
- Prevents execution of particular subsections within CONFIG.SYS.
- Permits execution of certain applications at CPU ring 2, enabling direct hardware I/O access.
- Includes directives from an alternate menu block, emulated via GOSUB/RETURN in DR-DOS.
- Sets the status of keyboard Insert mode.
- Installs a TSR program into memory.
- Installs a TSR program into upper memory, equivalent to HIINSTALL in DR DOS 5.0.
- Loads a TSR program after relocating the DOS data segment. See also INSTCDEX.
- Adjusts PIC controller interrupt priorities to elevate a specified IRQ number.
KTemplate:NbndM
- Defines the keyboard layout configuration.
- Specifies the address for the relocated keyboard buffer.
- Sets the maximum number of accessible drive letters.
- Functions like LASTDRIVE but additionally loads Current Directory Structure into upper memory.
- Specifies directories to search for DLL files.
- Manages compatibility loading for legacy applications.
- Sets the number of allowable file locks.
- Configures display of boot logo when using PTS-DOS boot manager.
- Defines parameters including count, sequence, I/O port, and timeout for LPT1 device configuration.
- Mirrors LPT1 settings for LPT2 device configuration.
- Applies LPT1 parameters to LPT3 device similarly.
- Enables and configures settings for LPT4 device support.
- Sets delay before priority boost is applied to waiting processes.
- Configures strategy for memory allocation management.
- Specifies default DOS memory allocation policy.
- Defines options available within system menus.
- Sets color schemes for menus, emulated via ECHO commands under DR-DOS environments.
- Establishes default menu block, emulated via TIMEOUT and SWITCH commands in DR-DOS systems.
- Defines individual menu blocks, emulated through ECHO and SWITCH in DR-DOS implementations.
- Enables operations involving multiple disk tracks simultaneously.
- Continues CONFIG.SYS processing from a new file, optionally after loading a device driver and setting the %NEWFILE% environment variable.
NTemplate:NbndQ
- Sets default character representing No () in Yes/No/Resume prompts.
- Defines whether keyboard [[Num Lock|Template:Keypress]] is enabled or disabled by default.
- Executes commands conditionally based on the last error code, e.g., .
- Displays text output and waits for user key press confirmation.
- Requires user acknowledgment when errors occur during CONFIG.SYS processing.
- Configures buffer sizes used by LPT ports.
- Enables conditional execution on PC-compatible hardware platforms.
- Sets scheduling priority levels for processes.
- Assigns priority specifically to disk I/O related applications.
- Changes default printer driver assigned to PRN device output.
- Specifies whether DOS applications are permitted to run on the system.
- Loads user interface components as configured.
- Conditional execution targeting IBM PS/1-compatible systems only.
- Conditional execution targeting IBM PS/2-compatible systems only.
- Suppresses output directed to STDOUT.
RTemplate:NbndT
- Enables automatic system reboot upon encountering errors.
- Permits inclusion of comments within CONFIG.SYS files.
- Allocates drive letters reserved for local block device drivers.
- Sets the default character used for Resume () prompts.
- Returns nested CONFIG.SYS execution to a prior GOSUB or SWITCH location, optionally passing a return code.
- Specifies the amount of real mode memory available.
- Allows programs in CONFIG.SYS to load simultaneously in the background.
- Controls whether the first character of deleted filenames is stored in the FAT reserved area.
- Defines video mode settings for FreeDOS or screen access methods for PTS-DOS.
- Indicates the status of the keyboard Scroll Lock key.
- Establishes environment variables.
- Loads the command interpreter shell.
- Functions like SHELL but includes a size parameter to relocate COMMAND.COM into HMA or UMBs, optimizing memory usage with third-party shells.
- Specifies keyboard modifier states such as Shift Lock, Num Lock, Scroll Lock, and Insert mode.
- Determines if open files are closed when Ctrl+Alt+Del is pressed.
- Configures skipping of POST during reboot sequences.
- , STACKSIZE, STACKSHIGH
- Manage hardware interrupt stack sizes and buffer locations across multiple DOS variants and derivatives.
- Configures the boot manager settings.
- (DOS 6.0+) Defines submenu blocks, a feature unsupported by DR-DOS and FreeDOS.
- (OS/2) Redirects error logging to disk instead of showing pop-up messages.
- , SWITCHAR, SWITCHES
- Set paths for swap files, define default switch characters ('/' or '-'), and specify special options across different DOS implementations.
- , SYSBOOT, SYSGEN, SYSLOAD
- Provide system configuration directives for OS/2 and PTS-DOS related to hardware fixes, alternate boot files, memory layouts, and system loading addresses.
- , SYSTOUMB
- Controls embedded DOS memory pool size and loading of DOS data or code into UMBs within PTS-DOS environments.
- , TIMESLICE
- OS/2 parameters for managing concurrent thread execution and scheduler time slices.
- , TRACE
- Sets timeouts for CONFIG.SYS processing and enables single-step execution modes under DR-DOS, PTS-DOS, FreeDOS, and OS/2 with variant-specific behaviors.
- , TRAPDUMP
- OS/2 directives defining log buffer sizes and detailed error reporting.
UTemplate:NbndZ
- Directs DOS memory management to utilize a specified segment as Upper Memory Block (UMB).
- Specifies which UMB server is employed.
- Defines address ranges allocated as UMB RAM areas.
- Toggles verification of disk writes on or off.
- Sets the DOS version number reported to applications.
- Configures VGA display status parameters.
- Indicates current video mode similarly to FreeDOS's SCREEN directive.
- Enables or disables virtual DMA usage capability.
- Controls activation of processor Virtual Mode Extensions (VME).
- Configures VxD driver support for Windows environments.
- Adjusts system support parameters for Windows operation.
- Manages relocation of the Extended BIOS Data Area (XBDA).
- Executes conditionally on XT-compatible hardware only.
- Enables built-in Year 2000 compliance support features.
- Defines the default affirmative character used in prompt responses.
- Configures tracking behavior for file deletions.
Issues
While it is possible to boot a system without CONFIG.SYS or AUTOEXEC.BAT files present, these are critical for customizing the operating system environment and loading necessary software components. If these files are missing or corrupted, troubleshooting becomes necessary.
In cases where CONFIG.SYS lacks a SHELL directive or is damaged or absent altogether, DOS attempts to locate COMMAND.COM in the root directory of the boot drive. Versions earlier than 6.0 will fail to boot if COMMAND.COM cannot be found. However, MS-DOS 6.0, PC DOS 6.1, and Novell DOS 7 or later will prompt users to enter a path for the command processor if missing—facilitating recovery. This prompt also appears if COMMAND.COM terminates unexpectedly during operation, allowing users to replace the shell without rebooting.
COMMAND.COM versions from MS-DOS 7.0 onward are incompatible with DR-DOS systems. This incompatibility affects dual-boot configurations where COMMAND.COM resides on the C: drive. From DR-DOS version 7.02 onwards, SHELL directives are strictly enforced during skip, trace, and step modes, preventing bypasses that were possible in earlier releases. Some subsequent patches restored limited skip functionality to enable recovery from invalid SHELL arguments. In scenarios where no SHELL directive is detected during skipped CONFIG.SYS processing, users must specify a valid shell before COMMAND.COM can load.
The maximum size allowed for CONFIG.SYS varies depending on the operating system: MS-DOS and PC DOS restrict this file size up to approximately 64 KB in recent versions, whereas DR-DOS imposes no fixed upper limit aside from file system constraints. MS-DOS compiles CONFIG.SYS into an internal tokenized structure that organizes directives so device drivers load prior to TSRs. Conversely, DR-DOS processes CONFIG.SYS sequentially line-by-line, offering granular control over the loading order of drivers and TSRs through DEVICE and INSTALL commands. This approach aids in resolving conflicts related to load order and supports integration of non-resident software components within CONFIG.SYS execution flow.
Earlier MS-DOS releases limited the length of the SHELL command line to 31 characters. Later versions expanded this limit up to 128 characters, while DR-DOS allows up to 255 characters. It is important to note that CONFIG.SYS directives do not support long filenames.
Dual booting DOS and Windows 9x
When Windows 95 is installed over a pre-existing DOS or Windows environment, it renames the CONFIG.SYS and AUTOEXEC.BAT files to CONFIG.DOS and AUTOEXEC.DOS, enabling a dual-boot setup between Windows 9x and DOS. During a DOS startup, these renamed files are temporarily restored to their original filenames. Additionally, Windows 95 system files are saved as CONFIG.W40 and AUTOEXEC.W40.
In configurations where Caldera DR-DOS versions 7.02 or 7.03 coexist with Windows 95, the Windows CONFIG.SYS and AUTOEXEC.BAT remain intact, while DR-DOS utilizes separate startup scripts named DCONFIG.SYS and AUTODOS7.BAT.
OS/2 / Windows NT
The OS/2 operating system depends extensively on CONFIG.SYS for loading drivers and setting environment parameters before its graphical user interface initiates.
Within the OS/2 subsystem of Windows NT, the file perceived as CONFIG.SYS by OS/2 applications is actually maintained within the system registry.
OS/2 employs several CONFIG.SYS commands that are not officially documented.
CONFIG.SYS continues to be employed by OS/2-based 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 – Computer Hope
- Overview of CONFIG.SYS directives for Windows 98 / MS-DOS 7.10
- Command reference for CONFIG.SYS – Caldera (DR-DOS 7 directives)
- Details on FreeDOS CONFIG.SYS commands
- PTS-DOS 2000 Pro User Guide including CONFIG.SYS directives
- Unofficial German PTS-DOS FAQ (PTS/FAQD) covering CONFIG.SYS directives