CPU386 (CONFIG.SYS directive)
| Company type | Configuration file |
|---|---|
| Industry | Operating systems |
| Founded | DOS version 2.0 |
| Products | Configuration instructions for DOS BIOS and OS/2 |
CONFIG.SYS serves as the main configuration file for the DOS and OS/2 operating system families. This plain text ASCII file contains configuration instructions that the operating system's DOS BIOS—typically found in IBMBIO.COM or IO.SYS—interprets during the system startup process. CONFIG.SYS made its debut with DOS version 2.0.
Usage
The directives within CONFIG.SYS tailor DOS settings for hardware devices, software applications, and memory allocation. Once CONFIG.SYS is processed, DOS initiates the command interpreter specified by the SHELL command; if none is indicated, it defaults to COMMAND.COM, which then executes AUTOEXEC.BAT.
This file mainly consists of name=value pairs that establish parameters or load components such as device drivers and terminate-and-stay-resident programs (TSRs).
CONFIG.SYS resides in the root directory of the bootable drive and is also utilized by (DCP), an MS-DOS variant developed by East-German VEB Robotron.
Certain DOS derivatives prioritize alternative configuration filenames over CONFIG.SYS:
Concurrent DOS 386, Concurrent DOS XM, Multiuser DOS, System Manager, and REAL/32 search for CCONFIG.SYS or CCONFIG.INI first, storing supplementary settings in a binary file called CCONFIG.BIN, which is managed through CONFIG.EXE.
From DR DOS 3.31 onwards—including PalmDOS 1.0 and Novell DOS 7—DCONFIG.SYS takes precedence over CONFIG.SYS. This approach supports multi-boot environments and disk compression scenarios where drive letters may change after driver loading. OpenDOS versions 7.01 and DR-OpenDOS 7.02 also check for ODCONFIG.SYS, while some DR-DOS releases look for DRCONFIG.SYS.
Starting with DR DOS 6.0, users can modify default system file extensions using SYS /DR:ext, allowing multiple sets of system files to coexist in a single root directory, selectable by boot managers like LOADER. The SHELL directive permits specifying alternative AUTOEXEC.BAT files with various extensions—a feature also supported by 4DOS.
DR-DOS includes a CHAIN=filespec command to continue processing another configuration file located anywhere on the boot disk; versions 7.02 and later add label-specific jumps with CHAIN=filespec,label. Additionally, DR-DOS 7.03 and above introduce SYS /A, which copies CONFIG.SYS and AUTOEXEC.BAT along with other system files.
FreeDOS uses FDCONFIG.SYS; RxDOS version 7.24 and later employ RXCONFIG.SYS; while PTS-DOS utilizes CONFIG.PTS.
Both CONFIG.SYS and AUTOEXEC.BAT are present in the root directory of boot drives for Windows 95 and Windows 98, though they are often left empty. In contrast, Windows Me does not process CONFIG.SYS during startup; instead, it retrieves environment variables from the Windows Registry at HKLM\System\CurrentControlSet\Control\SessionManager\Environment.
Within the FlexOS operating system, CONFIG.SYS is a binary file that specifies resource managers and device drivers.
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>
:;*?!
- Establishes labels within CONFIG.SYS to serve as jump targets for , , , and commands.
- Functions similarly to , but also supports in-line comments appended after other CONFIG.SYS instructions. (In MS-DOS/PC DOS, inline comments inside double quotes are not ignored.)
- Used at the start of in-line comments alongside the ; directive.
- Prompts a Yes/No confirmation before executing subsequent directives. (FreeDOS does not support custom messages but allows conditional execution via boot menus.) DOS version 6.0 and later implement comparable syntax by appending after directives.
- Executes the following CONFIG.SYS command without condition.
ATemplate:NbndC
- Determines whether programs can be terminated upon encountering errors.
- Sets which drives record file access timestamps in FAT file systems.
- Enables conditional execution on AT-compatible hardware.
- Boot management utility.
- Adjusts verbosity level of error messages.
- Alters the default internal serial device 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 beep sound even when notifications are muted.
- Defines the operating system to boot next.
- Enables or disables extended Ctrl+C detection.
- Specifies the quantity of disk buffers to allocate.
- Similar to BUFFERS but loads buffers into High Memory Area (HMA) or Upper Memory Blocks (UMB).
- , ,
- Configure cache block size, expiration time, and flush intervals.
- Loads programs directly from CONFIG.SYS, pausing processing until they return control.
- Sets the keyboard Caps Lock state.
- ,
- Configures CD-ROM driver name and number of buffers.
- Continues processing CONFIG.SYS from another file or label.
- , , , etc., set system clock type, screen clearing behavior, and OEM codepages (primarily for OS/2 or PTS-DOS).
- , ...,
- Define count, sequence, I/O port addresses, and timeouts for COM ports.
- , etc., manage inline comment syntax or disable lines depending on DOS variant.
- Activates internationalization support (implementation varies by DOS version).
- CPU-specific directives such as CPU88, CPU386+, CPU486+ conditionally run commands based on processor type (used in PTS-DOS and DR-DOS).
DTemplate:NbndF
- Adjusts relocation settings for drive descriptor tables.
- Sets memory segment address for multi-sector disk data deblocking operations.
- Enables built-in debugger functionality.
- Boot management utility.
- Loads device drivers into conventional memory.
- Loads device drivers into upper memory area (equivalent to in DRDOS 5.0).
- Configures country and codepage settings for keyboard, screen, and printer devices.
- Sets cache memory sizes for improved performance.
- Specifies compatibility mode for floppy disk drives.
- Selects display font used by the system.
- Controls loading of DOS into high or upper memory areas (similar to in DRDOS 5.0).
- Loads DOS internal tables such as BUFFERS, FCBS, FILES, LASTDRIVE, STACKS into upper memory blocks.
- Defines an alternate path for DOS system files.
- Designates search path locations for data files.
- Specifies physical drive parameters for hard disks.
- Defines settings for unknown or unrecognized disk drives.
- Refer to .
- Enables error logging and assigns drive location for
PDUMP.nnnfiles. - Displays a simple message on the screen.
- Shows a message incorporating ANSI escape sequences for formatting.
- Adds extra validation checks when launching programs.
- Sets a predefined error or return code for subsequent commands.
- Controls A20 gate state during program startup sequences.
- Terminates CONFIG.SYS processing prematurely except for certain SWITCHES and SHELL commands.
- Defines hash table size used to accelerate file opening operations, differing markedly from MS-DOS/PC DOS FASTOPEN driver behavior.
- Specifies number of cached File Control Blocks (FCBs) allowed open simultaneously (shares buffer space with FILES under DR-DOS).
- Similar to FCBS but explicitly loads FCBs into upper memory areas.
- Boot management utility.
- Sets maximum number of files that can be opened simultaneously.
- Similar to FILES but loads file handles explicitly into upper memory blocks.
- Includes execution of specified CONFIG.SYS subsections (see IGNORE).
GTemplate:NbndI
- Pauses for a key press or timeout, setting the error level to the ASCII value or 1024 if timed out.
- Resumes processing of CONFIG.SYS at a designated label.
- Continues nested CONFIG.SYS processing at a specified label, returning to the previous point afterward.
- Refer to , , or for further details.
- Consult for additional information.
- See for related commands.
- Refer to or for more context.
- See or for related instructions.
- Consult for further guidance.
- Loads a terminate-and-stay-resident (TSR) program after relocating the DOS data segment. Compare with INSTCDEX.
- Refer to , , or for more information.
- See for additional references.
- Consult or for related directives.
- Activates console and command line history with enhanced search capabilities.
- Defines the address of the High Memory Area (HMA) segment.
- Configures energy-saving behavior during HLT (halt) CPU instructions.
- Performs checks for viruses on the boot sector.
- Loads installable file system drivers.
- Prevents execution of specified subsections within CONFIG.SYS.
- Permits certain programs to execute at ring 2, allowing direct hardware input/output access.
- Integrates directives from another menu block, emulated via GOSUB/RETURN in DR-DOS environments.
- Toggles keyboard Insert mode on or off.
- Installs a TSR program into conventional memory.
- Installs a TSR program into upper memory areas, equivalent to HIINSTALL in DR DOS version 5.0.
- Installs TSR programs following DOS data segment relocation (see also INSTCDEX).
- Adjusts PIC interrupt priorities by rotating them so that a specified interrupt receives the highest priority.
KTemplate:NbndM
- Defines the keyboard layout configuration.
- Sets the address for the relocated keyboard buffer.
- Specifies the maximum number of accessible drives supported.
- Similar to LASTDRIVE but loads the Current Directory Structure (CDS) into upper memory regions.
- Lists directories for DLL search paths.
- Manages loading of legacy software applications.
- Specifies the number of allowable file locks simultaneously active.
- Enables boot logo display and startup messages using the PTS-DOS boot manager.
- Configures parameters such as count, order, I/O address, and timeout for the LPT1 device port.
- Applies similar configuration settings to LPT2 device port.
- Applies equivalent configuration settings to LPT3 device port.
- Enables and configures support for LPT4 device port.
- Determines wait duration before increasing process priority levels.
- Sets strategy parameters for memory allocation handling.
- Establishes default memory allocation strategy used by DOS.
- Defines available menu options within the system interface.
- Specifies color schemes for menus, with emulation possible under DR-DOS systems.
- Sets which menu block is loaded by default, emulatable under DR-DOS environments.
- Defines multiple menu blocks, supporting emulation in DR-DOS systems.
- Enables operations involving multitrack disk drives.
- Continues processing CONFIG.SYS commands from a new file, optionally loading a device driver and setting the %NEWFILE% environment variable.
NTemplate:NbndQ
- Sets the default character representing "No" () in Yes/No/Resume prompts.
- Controls whether keyboard [[Num Lock|Template:Keypress]] is enabled or disabled upon startup.
- Enables conditional execution depending on the last error code returned, e.g., .
- Displays a message and waits for a key press, functioning similarly to and commands in DR-DOS systems.
- Requires user confirmation for errors encountered during CONFIG.SYS processing.
- Configures buffer sizes assigned to LPT ports for printing devices.
- Allows conditional command execution on PC-compatible hardware platforms only.
- Assigns scheduler priority levels to processes or tasks.
- Sets priority levels specifically for disk input/output operations programs.
- Changes the default printer device driver assignment among LPT1 to LPT3 or LPT4 ports.
- Determines whether DOS applications are permitted to execute within the system environment.
- Loads a user interface shell program during startup or operation.
- Enables conditional execution based on compatibility with IBM PS/1 machines only.
- Enables conditional execution based on IBM PS/2 machine compatibility exclusively.
- Suppresses output directed to standard output (STDOUT).
RTemplate:NbndT
- Activates automatic system reboot upon encountering errors.
- Permits inclusion of comments within CONFIG.SYS.
- Allocates drive letters reserved by local block device drivers.
- Defines the default character for Resume () prompts in Yes/No/Resume queries.
- Returns control from nested CONFIG.SYS processing to the prior GOSUB or SWITCH point, optionally passing a return code.
- Specifies the size of real mode memory available.
- Executes multiple programs in CONFIG.SYS simultaneously in the background, functioning similarly to CALL or INSTALL commands under DOS.
- Determines whether the first character of deleted files is preserved in the FAT reserved area.
- Sets video mode parameters (FreeDOS) or screen access methods (PTS-DOS).
- Configures the keyboard’s Scroll Lock key status as enabled or disabled.
- Establishes environment variables.
- Loads the command interpreter shell.
- Functions like SHELL but supports a SIZE parameter to pre-allocate COMMAND.COM within HMA or UMBs, reducing file fragmentation.
- Defines keyboard modifier states such as Shift Lock, Num Lock, Scroll Lock, and Insert mode.
- Determines whether files are closed upon pressing Ctrl+Alt+Del.
- Skips Power-On Self-Test (POST) during reboot.
- , STACKSIZE, STACKSHIGH
- Set stack parameters across various DOS versions, with STACKS specifying hardware interrupt stack counts (varies per OS).
- , SYSBOOT, SYSGEN, SYSLOAD, SYSTOUMB
- PTS-DOS-specific options for boot sequence control, system loading addresses, and memory optimization.
- , SUPPRESSPOPUPS, SWAPPATH
- OS-specific settings managing menu blocks, error log storage drives, and swap file locations.
- , SWITCHES, SWITCHAR
- Manage nested CONFIG.SYS flow and define default switch characters ('/' or '-').
- , THREADS, TIMESLICE
- OS/2 directives for hardware compatibility fixes, thread concurrency limits, and scheduler time slice adjustments.
- , TRACE, TRACEBUF
- Control CONFIG.SYS timeouts and enable stepwise execution with configurable log buffer sizes (dependent on OS).
- , TRAPDUMP
- Configures temporary file extensions for PTS-DOS and error log dumping mechanisms in OS/2.
UTemplate:NbndZ
- Assigns a specific memory segment to function as an Upper Memory Block (UMB).
- Designates the UMB server component.
- Defines address ranges allocated as UMB RAM areas.
- Toggles disk write verification on or off.
- Reports a specified DOS version to running applications.
- Controls VGA display status settings.
- Sets the current video mode, analogous to FreeDOS’s SCREEN command.
- Enables usage of virtual DMA channels.
- Manages processor Virtual Mode Extensions (VME) functionality.
- Configures VxD drivers for Windows environments.
- Sets up Windows system support parameters.
- Controls relocation of the Extended BIOS Data Area (XBDA).
- Enables conditional execution on XT-compatible hardware platforms.
- Activates built-in Year 2000 compliance features.
- Defines the default affirmative character for prompt dialogs.
- Manages tracking of deleted files.
Issues
Although the system can initialize without CONFIG.SYS or AUTOEXEC.BAT files present, these configuration files are crucial for complete DOS customization and meeting software prerequisites. Problems arise if these files become corrupted or damaged, requiring diagnostic efforts.
In cases where CONFIG.SYS does not specify a SHELL directive or if it is missing or corrupted, DOS attempts to locate COMMAND.COM in the root directory of the boot drive. MS-DOS versions prior to 6.0 will fail to boot if COMMAND.COM is absent. Conversely, MS-DOS 6.0, PC DOS 6.1, and Novell DOS 7 and later will prompt users to provide a command interpreter path. This prompt also appears if COMMAND.COM terminates unexpectedly or exits intentionally, offering a limited runtime shell alternative without rebooting.
COMMAND.COM from MS-DOS version 7.0 onward is incompatible with DR-DOS systems. This incompatibility affects dual-boot configurations where COMMAND.COM resides in the C:\ root directory. Starting with DR-DOS 7.02, it is no longer possible to bypass SHELL directives when using skip/trace/step modes (activated via Ctrl+F5/F7/F8). Subsequent updates restored Ctrl+F6 functionality to re-enable skip behavior for recovery from invalid SHELL arguments. If no valid SHELL directive is found when skipping CONFIG.SYS processing, users are prompted to enter an appropriate shell filename before COMMAND.COM loads.
CONFIG.SYS file size restrictions vary by DOS version: MS-DOS and PC DOS limit the file size to a few kilobytes—up to approximately 64 KB in newer releases—while DR-DOS imposes no explicit limit aside from filesystem constraints. MS-DOS converts CONFIG.SYS into a tokenized format stored in memory and processes entries sequentially—device drivers load before TSRs. In contrast, DR-DOS parses directives line-by-line at runtime, granting precise control over load order through DEVICE and INSTALL commands. This approach facilitates resolving conflicts between drivers and TSRs and allows temporary software integration during boot.
For MS-DOS/PC DOS versions between 2.0 and 4.01, the maximum length for the SHELL command line is restricted to 31 characters. Later versions expand this limit up to 128 characters. DR-DOS supports even longer lines—up to 255 characters. Notably, CONFIG.SYS directives do not accommodate long filenames.
Dual Booting DOS and Windows 9x
When Windows 95 is installed on top of an existing DOS or Windows environment, the system renames CONFIG.SYS and AUTOEXEC.BAT to CONFIG.DOS and AUTOEXEC.DOS respectively. This adjustment enables a dual-boot setup between Windows 9x and DOS. Upon selecting DOS during startup, these files are temporarily restored to their original names, CONFIG.SYS and AUTOEXEC.BAT. Additionally, backup copies of Windows 95 configuration 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 files retain their standard names, while DR-DOS employs DCONFIG.SYS and AUTODOS7.BAT for its boot-time settings.
OS/2 / Windows NT
OS/2 relies heavily on CONFIG.SYS to set up drivers and environment parameters before loading its graphical user interface.
Within the OS/2 subsystem of Windows NT, the CONFIG.SYS file is emulated through the registry to support OS/2 applications.
OS/2 contains numerous undocumented CONFIG.SYS commands, highlighting its sophisticated configuration demands.
CONFIG.SYS continues to be a fundamental component in OS/2-based systems such as eComStation and ArcaOS, playing a key role in system initialization and driver handling.
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) – overview of DR-DOS 7 directives
- FreeDOS CONFIG.SYS directive descriptions
- PTS-DOS 2000 Pro User Manual featuring CONFIG.SYS directives
- Unofficial German PTS-DOS FAQ (PTS/FAQD) including CONFIG.SYS information