CPU286 (CONFIG.SYS directive)
| Company type | Configuration file |
|---|---|
| Industry | Operating systems |
| Founded | 1983 |
| Products | Configuration commands for DOS and OS/2 |
CONFIG.SYS serves as the essential configuration file for DOS and OS/2 operating systems. This plain text file, written in ASCII, holds configuration commands that the OS's DOS BIOS—typically found in IBMBIO.COM or IO.SYS—reads during the boot sequence. CONFIG.SYS was first introduced with DOS version 2.0.
Usage
The directives within CONFIG.SYS are responsible for setting up DOS to manage hardware devices, software applications, and memory allocation. Once CONFIG.SYS has been processed, DOS launches the command interpreter specified by the SHELL directive; if none is defined, it defaults to COMMAND.COM, which subsequently executes the AUTOEXEC.BAT script.
This file predominantly includes name=value pairs that establish adjustable parameters or load essential 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 derivatives recognize alternate configuration filenames that supersede CONFIG.SYS:
Concurrent DOS 386, Concurrent DOS XM, Multiuser DOS, System Manager, and REAL/32 prioritize CCONFIG.SYS (derived from "Concurrent") over CONFIG.SYS. Some Multiuser DOS editions employ CCONFIG.INI, while REAL/32 may use MCONFIG.SYS. These platforms often maintain supplementary settings in a binary file called CCONFIG.BIN, which is generally modified using CONFIG.EXE.
In systems like DR DOS 3.31, PalmDOS 1.0, Novell DOS 7, OpenDOS 7.01, and DR-DOS 7.02 and later versions, DCONFIG.SYS (short for "DR DOS") takes precedence over CONFIG.SYS. Originally designed to support disk compression utilities that altered drive letter assignments, it now also facilitates multi-boot setups. OpenDOS 7.01 and DR-OpenDOS 7.02 look for ODCONFIG.SYS, whereas some DR-DOS 7.02+ releases check for DRCONFIG.SYS.
Starting with DR DOS 6.0, the SYS /DR:ext command enables customization of default file extensions to allow multiple system files to coexist in a single root directory, selectable through boot loaders such as LOADER from Multiuser DOS and DR-DOS versions 7.02/7.03. The SHELL command supports specifying alternative AUTOEXEC.BAT scripts via /P[:filename.ext], and COMMAND.COM is capable of recognizing extensions other than ".BAT"—a feature also supported by 4DOS.
From DR DOS 6.0 onward, the CHAIN=filespec directive allows inclusion of additional configuration files during processing; these files can be located outside the root directory. Moreover, DR-DOS 7.02 and later versions introduce optional labels to enable targeted jumps within chained configuration files.
With DR-DOS 7.03 and subsequent versions, the SYS /A option was added to copy corresponding CONFIG.SYS and AUTOEXEC.BAT files alongside system files.
Other operating systems use distinct configuration filenames: FreeDOS employs FDCONFIG.SYS; RxDOS version 7.24 and above uses RXCONFIG.SYS; and PTS-DOS utilizes CONFIG.PTS.
Although both CONFIG.SYS and AUTOEXEC.BAT reside in the root directories of Windows 95 and Windows 98 boot drives due to their DOS heritage, these files are generally left empty.
Windows Me does not execute CONFIG.SYS during startup; instead, it loads environment variables directly from the registry at:
- HKLM\System\CurrentControlSet\Control\SessionManager\Environment
In contrast, under FlexOS, 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 targets for , , , , and commands.
- Functions like , but also allows inline comments following other CONFIG.SYS instructions. (Note that in MS-DOS/PC DOS, inline comments inside double quotes are not disregarded.)
- Used at the start of inline comments, alongside the ; directive.
- Prompts the user with a Yes/No confirmation before executing subsequent CONFIG.SYS commands. (FreeDOS supports optional conditions in boot menus but lacks optional messages.) (From DOS 6.0 onward, a similar feature is available by appending after the directive, e.g., .)
- Forces unconditional execution of the next CONFIG.SYS command.
ATemplate:NbndC
- Determines whether programs can be interrupted upon encountering errors.
- Sets which drives record file access timestamps in FAT filesystems.
- Enables conditional execution on AT-compatible hardware.
- Acts as a boot manager.
- Adjusts the level of detail shown in error messages.
- Changes the default serial driver used for the AUX device.
- Prevents character devices from being accessible outside the phantom \DEV directory.
- Loads a base device driver into memory.
- Produces a beep sound even if audible alerts are disabled.
- Specifies the operating system to boot next.
- Enables or disables extended Ctrl+C checking.
- Defines how many disk buffers are allocated.
- Similar to BUFFERS but loads buffers into HMA or UMB areas.
- Sets the maximum number of cache blocks allocated from the system pool.
- Defines the maximum time before unused cache blocks return to the system pool.
- Specifies maximum time before dirty cache blocks are flushed to disk.
- Loads programs during CONFIG.SYS processing, running them in the foreground and halting further processing until they complete.
- Sets Caps Lock keyboard state on or off.
- Defines the CD-ROM hardware driver name.
- Specifies how many buffers are used for CD-ROM access.
- Continues CONFIG.SYS processing from a new file or label.
- Specifies the type of system clock used.
- Clears the screen display.
- Defines OEM codepages to use.
- ; Specifies CMOS RAM address location.
- ; Sets colors used in boot menus.
- , ;COM2, ;COM3, ;COM4
- Configure count, logical order, I/O address, and timeout for respective COM ports (DR-DOS 7.02+).
- , ;Defines DMA buffer settings (PTS-DOS).
- , ;Redefines inline-comment initiators or causes lines to be ignored (various DOS versions).
- , ;Enables and configures internationalization support (various DOS versions).
- , ;Sets cursor position for configuration menus (DR DOS 6.0+).
- CPU-specific conditional directives (CPU88, CPU86, CPU286, CPU386, CPU486 variants) control execution based on processor type (PTS-DOS, DR-DOS).
DTemplate:NbndF
- Configures relocation of drive descriptor tables in memory.
- Defines memory segment address limit up to which multi-sector disk data deblocking is permitted.
- Activates internal debugger support features.
- Functions as a boot manager utility.
- Loads device drivers into conventional memory areas.
- Loads device drivers into upper memory blocks (equivalent to in DRDOS 5.0).
- Sets country and codepage information for keyboard, screen, and printer devices.
- Configures sizes of cache memory allocations.
- Determines floppy disk compatibility mode settings.
- Specifies font used for display output.
- Controls loading of DOS into high memory and/or utilization of upper memory blocks.
- Loads DOS tables such as BUFFERS, FCBS, FILES, LASTDRIVE, and STACKS into upper memory regions.
- Specifies an alternative directory path for DOS system files.
- Defines search paths for data files used by DOS utilities.
- Describes physical parameters for disk drives connected to the system.
- Provides configuration parameters for unrecognized drive types.
- See .
- Enables error logging with PDUMP.nnn files on specified drives.
- Controls display of messages on screen during startup or operations.
- Displays messages including ANSI escape sequences for enhanced formatting.
- Adds additional verification checks when launching programs.
- Assumes specified error or return codes for subsequent commands executed.
- Sets A20 gate state when initiating programs to control memory addressing above 1 MB.
- Terminates CONFIG.SYS processing early before reaching file end (except SWITCHES and SHELL directives still process).
- Defines size of hash table used for rapid file opening operations, differing from MS-DOS/PC DOS FASTOPEN driver behavior.
- Specifies number of cached File Control Blocks (FCBs) that can be opened simultaneously (shares buffer space with FILES under DR-DOS).
GTemplate:NbndI
- Waits for a key press or timeout, setting the error level to the ASCII value or 1024 if timed out.
- Resumes CONFIG.SYS processing at the specified label.
- Continues nested CONFIG.SYS processing at a given label and returns with .
- Refer to , , or for additional information.
- Consult for further details.
- See for related commands.
- Refer to or for more context.
- See or for relevant instructions.
- Consult for further reference.
- Loads a TSR program after DOS relocates data, functioning similarly to . Compare with INSTCDEX.
- See , , or for related options.
- Refer to for additional guidance.
- See or for more information.
- Activates console and command line history buffer with enhanced pattern search capabilities.
- Defines the address of the HMA segment.
- Configures the HLT power-saving mode.
- Enables scanning of boot sector viruses.
- Loads installable file system drivers.
- Prevents execution of certain CONFIG.SYS subsections. Also see: .
- Permits execution of specific programs at ring 2 level, allowing direct hardware I/O access.
- Incorporates directives from another menu block (can be emulated with GOSUB/RETURN in DR-DOS).
- Sets the status of keyboard Insert mode.
- Installs TSR programs into conventional memory.
- Installs TSR utilities into upper memory, equivalent to HIINSTALL in DR DOS 5.0.
- Loads TSR programs after relocating DOS data segment, similar to INSTALL. Compare with INSTCDEX.
- Adjusts PIC interrupt priorities by rotating them so that a particular IRQ is assigned highest priority.
KTemplate:NbndM
- Defines the keyboard layout configuration.
- Specifies the address where the keyboard buffer has been relocated.
- Sets the maximum number of accessible drive letters.
- Functions like LASTDRIVE but also loads Current Directory Structure into upper memory.
- Lists directories searched for DLL files.
- Handles compatibility settings for legacy applications.
- Sets the number of allowable file locks.
- Configures support for boot logos and startup messages using PTS-DOS boot manager.
- Defines parameters such as count, order, I/O address, and timeout for the LPT1 port.
- Equivalent settings for the LPT2 port as LPT1.
- Same configuration applied to the LPT3 device as LPT1.
- Enables and configures LPT4 device similarly to other LPT ports.
- Specifies wait duration before elevating process priority.
- Determines strategy for memory allocation management.
- Sets default memory allocation behavior in DOS environments.
- Defines options available within menus.
- Specifies color schemes used in menus (emulatable under DR-DOS).
- Sets the default menu block (also emulatable under DR-DOS).
- Establishes definitions for menu blocks (emulatable in DR-DOS).
- Enables or disables multitrack disk operations functionality.
- Continues processing CONFIG.SYS within a new file after loading a device driver and setting %NEWFILE% environment variable.
NTemplate:NbndQ
- Determines default No () character used in Yes/No/Resume prompts.
- Controls keyboard [[Num Lock|Template:Keypress]] state—on or off.
- Executes commands conditionally based on last error code, e.g., .
- Displays a message and waits for key input, similar to and commands in DR-DOS.
- Requires user acknowledgment when errors occur during CONFIG.SYS processing.
- Configures buffer sizes assigned to LPT ports.
- Allows conditional execution on PC-compatible hardware platforms.
- Sets scheduling priority levels for processes.
- Adjusts priority specifically for disk I/O operations.
- Changes default printer device driver assignment among LPT1 through LPT4 ports.
- Restricts execution of DOS programs under certain conditions.
- Loads a user interface shell environment.
- Enables conditional execution on IBM PS/1-compatible systems.
- Allows conditional execution on IBM PS/2-compatible machines.
- Suppresses output sent to STDOUT.
RTemplate:NbndT
- Activates automatic system reboot upon encountering errors.
- Permits inclusion of comments within CONFIG.SYS files.
- Allocates a reserved drive letter for local block device drivers.
- Establishes the default character for Resume () prompts.
- Returns control from nested CONFIG.SYS processing to the prior GOSUB or SWITCH point, optionally providing a return code.
- Defines the size of real mode memory available.
- Enables simultaneous loading of programs listed in CONFIG.SYS in the background.
- Saves the initial character of deleted files within the FAT reserved space.
- Determines video mode settings (FreeDOS) or methods for screen access (PTS-DOS).
- Configures the keyboard Scroll Lock state to either enabled or disabled.
- Sets environment variables for system operation.
- Loads the command interpreter shell environment.
- Functions similarly to SHELL but includes a size parameter allowing relocation of 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.
- Controls whether files are closed upon pressing Ctrl+Alt+Del.
- Skips the Power-On Self Test (POST) during reboot sequences.
- , STACKSIZE, STACKSHIGH
- Configure stack parameters across different DOS variants and platforms to enhance interrupt handling and memory management.
- , SYSBOOT, SYSGEN, SYSLOAD
- PTS-DOS-specific commands that manage boot options and system memory layout configurations.
- , SWITCH
- Facilitates control menus and conditional processing within CONFIG.SYS (available from DOS 6.0 onwards).
- , SWAPPATH, THREADS, TIMESLICE
- OS/2 directives responsible for managing error logging, defining swap file locations, concurrency controls, and scheduler time slices.
- , TRACE
- Provides timeout management and enables single-step execution for debugging purposes in DR-DOS, PTS-DOS, and OS/2 environments.
- Additional directives govern temporary file extensions (TMPEXT), keyboard switch characters (SWITCHAR), error logging parameters (TRAPDUMP), and hardware workaround implementations (SXFAKEHWFPU).
UTemplate:NbndZ
- Configures DOS to designate a particular memory segment as an upper memory block (UMB).
- Defines the UMB server settings.
- Specifies address ranges allocated for UMB RAM usage.
- Enables or disables verification of disk write operations.
- Reports the DOS version number as presented to applications.
- Sets VGA display status parameters.
- Indicates the current video mode configuration.
- Enables virtual DMA capabilities for enhanced disk access.
- Controls processor Virtual Mode Extensions (VME) functionality.
- Configures VxD drivers utilized by Windows operating systems.
- Manages system support features specific to Windows environments.
- Handles relocation of the Extended BIOS Data Area (EBDA).
- Allows conditional execution on XT-compatible machines based on hardware detection.
- Implements Year 2000 compliance support features.
- Defines the default character used to confirm prompts with a Yes response.
- Manages tracking of file deletions within the system.
Issues
While it is possible for the system to start without CONFIG.SYS or AUTOEXEC.BAT files, these configuration files are crucial for comprehensive OS customization and meeting software dependencies. Any corruption or damage to these files requires diagnostic intervention.
If CONFIG.SYS lacks a SHELL directive—or if the file itself is missing or damaged—DOS attempts to locate COMMAND.COM in the root directory of the boot drive. Early DOS versions will fail to boot if COMMAND.COM cannot be found. Starting with MS-DOS 6.0 and PC DOS 6.1, if COMMAND.COM is absent, users are prompted to specify an alternative command processor path, enabling limited recovery options and allowing shell replacement without rebooting.
COMMAND.COM versions from MS-DOS 7.0 onward are incompatible with DR-DOS systems. DR-DOS generally prevents bypassing SHELL directives during skip or trace modes in versions 7.02 and later. Recovery mechanisms include prompting users for valid shell filenames before loading COMMAND.COM, thereby enhancing robustness during boot failures.
CONFIG.SYS file size restrictions differ by operating system: MS-DOS and PC DOS limit these files to a maximum size of approximately 64 KB. In contrast, DR-DOS imposes no practical size limit because it interprets CONFIG.SYS line-by-line rather than tokenizing it all at once. This approach provides DR-DOS with greater flexibility in determining load sequences for device drivers and TSR programs via DEVICE and INSTALL commands. Consequently, advanced configurations such as debugging support or conditional driver loading based on hardware presence or error conditions become feasible.
Limits on shell command line lengths vary as well: MS-DOS and PC DOS versions prior to 5.0 support up to 31 characters, while later releases extend this limit up to 128 characters. DR-DOS further increases this capacity to allow command lines up to 255 characters in length. It should be noted that CONFIG.SYS directives do not accept long filenames under any circumstances.
Dual Booting Between DOS and Windows 9x
During the installation of Windows 95 over a pre-existing DOS or Windows environment, the system renames CONFIG.SYS and AUTOEXEC.BAT to CONFIG.DOS and AUTOEXEC.DOS, enabling a dual-boot setup between Windows 9x and DOS. When the system boots into DOS mode, these files are temporarily restored to their original names, CONFIG.SYS and AUTOEXEC.BAT. Additionally, backups of the Windows 95 configuration files are stored as CONFIG.W40 and AUTOEXEC.W40.
In scenarios where Caldera DR-DOS version 7.02 or 7.03 is installed alongside Windows 95, the Windows CONFIG.SYS and AUTOEXEC.BAT retain their original filenames. Instead, DR-DOS utilizes DCONFIG.SYS and AUTODOS7.BAT as its initialization files.
OS/2 and Windows NT
The OS/2 operating system heavily relies on CONFIG.SYS for setting up drivers and environment variables prior to loading its graphical user interface. Within the OS/2 subsystem of Windows NT, CONFIG.SYS is represented as a configuration stored in the system registry.
OS/2 includes numerous undocumented directives within CONFIG.SYS. This configuration file continues to be employed by 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 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
- Details on FreeDOS CONFIG.SYS directives
- PTS-DOS 2000 Pro User Manual including CONFIG.SYS commands (archived)
- Unofficial German PTS-DOS FAQ with CONFIG.SYS information (archived)