CPU86+ (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 file is a plain ASCII text document containing setup instructions accessible to users, which the operating system's DOS BIOS interprets during the startup sequence. CONFIG.SYS was first introduced with DOS version 2.0.
Usage
The directives within CONFIG.SYS are used to configure DOS for hardware devices, software applications, and memory allocation. Once CONFIG.SYS has been processed, DOS launches the command interpreter specified in the SHELL directive; if none is specified, it defaults to COMMAND.COM, which subsequently executes the AUTOEXEC.BAT script.
Typically, the file is composed of name=value statements that set adjustable 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 system’s boot drive.
Certain DOS derivatives check for alternative configuration filenames that take priority over CONFIG.SYS:
- Advanced iterations of Concurrent DOS 386, Concurrent DOS XM, Multiuser DOS, and REAL/32 utilize CCONFIG.SYS or CCONFIG.INI instead, with supplementary settings saved in binary format as CCONFIG.BIN, typically modified using CONFIG.EXE.
- From DR DOS version 3.31 onward, DCONFIG.SYS is preferred and commonly employed alongside disk compression utilities or multi-boot setups. OpenDOS 7.01 and DR-OpenDOS 7.02 also look for ODCONFIG.SYS and occasionally DRCONFIG.SYS.
- Starting with DR DOS 6.0, users can alter default system file extensions through SYS /DR:ext, enabling multiple sets of system files to coexist and be selected by boot loaders such as LOADER in Multiuser DOS and DR-DOS 7.x.
- Enhanced SHELL commands permit specifying different AUTOEXEC.BAT files and support extensions other than .BAT, capabilities also found in 4DOS.
- The CHAIN=filespec statement in DR-DOS 6.0 and later allows continuation of configuration processing from separate files, optionally directing execution to specific labels for increased control.
- DR-DOS 7.03 and newer versions introduce a SYS /A option that copies CONFIG.SYS and AUTOEXEC.BAT alongside other system files during setup.
Other DOS variants incorporate comparable alternative configuration filenames: FDCONFIG.SYS in FreeDOS, RXCONFIG.SYS in RxDOS, and CONFIG.PTS in PTS-DOS.
Windows 95 and Windows 98, which are built on DOS foundations, retain CONFIG.SYS and AUTOEXEC.BAT on their boot drives but usually leave them unpopulated. In contrast, Windows Me does not process CONFIG.SYS at startup; instead, it loads environment variables from the Windows Registry at:
- HKLM\System\CurrentControlSet\Control\SessionManager\Environment
Within the FlexOS operating system, CONFIG.SYS exists as a binary file specifying resource managers and device drivers to be loaded during boot.
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>
:;*?!
- Marks labels within CONFIG.SYS to serve as jump destinations for , , , , and directives.
- Functions similarly to , allowing in-line comments after other CONFIG.SYS commands. (Note: Inline comments inside double quotes are not ignored in MS-DOS/PC DOS.)
- Used at the start of in-line comments alongside the ; directive.
- Prompts a Yes/No confirmation before executing subsequent CONFIG.SYS commands. (FreeDOS does not support custom messages but allows conditional execution via boot menus and .) DOS version 6.0 and later provide a comparable feature by appending after a directive (e.g., ).
- Executes the next CONFIG.SYS command unconditionally.
ATemplate:NbndC
- Determines whether programs can be terminated upon encountering errors.
- Specifies which drives record file access timestamps within FAT file systems.
- Enables conditional execution on AT-compatible hardware.
- Boot manager utility.
- Adjusts the detail level of error message output.
- Alters the default internal serial device driver (COM ports) assigned to the AUX device.
- Disables access to character devices outside the phantom \DEV directory.
- Loads the base device driver into memory.
- Forces an audible beep even if sound notifications are turned off.
- Defines the operating system that should be booted next.
- Enables or disables extended Ctrl+C checking functionality.
- Sets the count of disk buffers to allocate.
- Loads disk buffers specifically into HMA or UMB memory areas.
- Defines the maximum number of cache blocks that can be dynamically allocated.
- Specifies the maximum idle time before unused cache blocks are returned to the system pool.
- Sets the maximum interval before dirty cache blocks are flushed to disk storage.
- Runs programs in CONFIG.SYS foreground, pausing further processing until they return control.
- Defines keyboard Caps Lock state.
- Specifies the name of the CD-ROM hardware driver.
- Sets the number of buffers allocated for CD-ROM access operations.
- Continues processing of CONFIG.SYS within a different file or label context.
- Determines the system clock type used by the operating system.
- Clears the display screen.
- Specifies OEM codepage(s) used by the system.
- Defines CMOS RAM address locations.
- Sets color schemes for boot menu displays.
- Configures parameters for COM1 serial device.
- through ; configure corresponding COM ports on DR-DOS 7.02 and later versions similarly.
- Assigns buffer for DMA operations (PTS - DOS).
- Defines characters that mark inline comments or causes lines to be ignored, depending on OS behavior.
- Activates and configures international language support features (varies by OS).
- CPU-specific conditional directives such as ;CPU386 enable execution depending on processor type (PTS - DOS, DR-DOS).
DTemplate:NbndF
- Controls relocation of drive descriptor tables in memory.
- Indicates memory segment address used for multi-sector disk data deblocking processes.
- Enables support for an internal debugger environment.
- Boot manager functionality.
- Loads a device driver into conventional memory space.
- Loads a device driver into upper memory area (equivalent to in DR-DOS 5.0).
- Configures country and codepage settings for keyboard, screen, and printer devices (KBD, SCR, LPT).
- Sets sizes for cache memory allocation.
- Defines floppy disk compatibility mode settings.
- Selects display font characteristics.
- Controls loading DOS into high memory and/or usage of upper memory blocks.
- Specifies loading DOS tables such as BUFFERS, FCBS, FILES, LASTDRIVE, STACKS into upper memory areas.
- Specifies an alternative directory path for DOS system files.
- Defines search paths for data files used by DOS utilities.
- Provides physical parameters and characteristics of disk drives connected to the system.
- Sets parameters for drives that are not automatically recognized by DOS.
- See .
- Enables generation of PDUMP.nnn error logs and specifies target drive location for these logs.
- Displays a textual message on-screen during processing.
- Shows messages including ANSI escape sequences for enhanced formatting capabilities.
- Determines whether additional validation checks occur when launching programs.
- Specifies an error or return code value to be assumed after certain operations.
- Configures A20 gate state during program startup sequence control.
- Terminates CONFIG.SYS processing prematurely except when encountering SWITCHES and SHELL directives under specific conditions.
- Sets hash table size used to accelerate file open operations, differing from FASTOPEN driver behavior in MS-DOS/PC DOS systems.
- Defines number of cached File Control Blocks (FCBs) allowed simultaneously open (shares buffer with FILES under DR-DOS).
- Similar to FCBS but explicitly loads FCBs into upper memory areas for performance optimization.
- Boot manager feature inclusion.
- Specifies maximum number of files that may be opened concurrently by DOS processes.
- Like FILES directive but forces allocation of file handles into upper memory explicitly.
- Incorporates execution of specified CONFIG.SYS subsections (refer to IGNORE directive).
GTemplate:NbndI
- Waits 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 control to the previous point afterward.
- Refer to , , or for additional details.
- See also .
- Consult .
- Refer to or for further information.
- See or for related commands.
- Consult .
- Loads a terminate-and-stay-resident (TSR) program after relocating the DOS data segment. Compare with INSTCDEX.
- Refer to , , or for more information.
- Consult .
- See , or for related options.
- Activates console and command line history buffering with advanced pattern search capabilities.
- Defines the address of the High Memory Area (HMA) segment.
- Configures energy-saving settings for the HLT instruction.
- Performs boot sector virus detection.
- Loads installable file system drivers.
- Prevents execution of specified CONFIG.SYS subsections.
- Permits certain programs to execute at ring 2, allowing direct hardware input/output access.
- Incorporates directives from another menu block, emulated via GOSUB/RETURN in DR-DOS.
- Sets the status of the keyboard Insert mode.
- Installs a TSR program into conventional memory.
- Installs a TSR program into upper memory, equivalent to HIINSTALL in DR DOS 5.0.
- Installs a TSR after relocating the DOS data segment. Compare with INSTCDEX.
- Adjusts PIC interrupt priorities by rotating them to prioritize a specified IRQ number.
KTemplate:NbndM
- Defines the keyboard layout configuration.
- Specifies the location of the relocated keyboard buffer in memory.
- Sets the maximum number of accessible drive letters.
- Similar to LASTDRIVE but additionally loads the Current Directory Structure into upper memory segments.
- Lists directories searched for dynamic link libraries (DLLs).
- Manages compatibility settings for legacy software applications.
- Determines the number of allowed file locks simultaneously.
- Enables boot logo features when using the PTS-DOS boot manager.
- Configures count, order, I/O port address, and timeout parameters for LPT1 device.
- Configures count, order, I/O port address, and timeout parameters for LPT2 device.
- Configures count, order, I/O port address, and timeout parameters for LPT3 device.
- Enables and sets parameters for LPT4 device similarly to other parallel ports.
- Establishes delay before increasing process priority levels.
- Sets strategy for memory allocation management.
- Specifies default DOS memory allocation method.
- Defines options available within menus.
- Assigns colors used in menus (emulatable under DR-DOS).
- Specifies default menu block selection (emulatable under DR-DOS).
- Defines individual menu blocks (emulatable under DR-DOS).
- Enables operations involving multitrack disks.
- Continues CONFIG.SYS processing from a new file after loading a device driver and setting %NEWFILE% environment variable.
NTemplate:NbndQ
- Sets default No () character response in Yes/No/Resume prompts.
- Controls whether keyboard [[Num Lock|Template:Keypress]] is enabled or disabled at startup.
- Enables conditional command execution based on previous error codes, such as .
- Displays a message and waits for user key press, similar to DR-DOS's and commands.
- Requires user confirmation when errors occur during CONFIG.SYS processing.
- Adjusts buffer sizes allocated to LPT ports.
- Allows conditional execution on PC-compatible hardware platforms.
- Sets scheduler priority levels for processes.
- Specifies priority settings for disk input/output operations programs.
- Changes default printer device assignment (e.g., switching from LPT1 to LPT3 or LPT4).
- Determines whether DOS applications are permitted to run.
- Loads a user interface shell environment.
- Allows conditional execution on IBM PS/1-compatible systems only.
- Allows conditional execution on IBM PS/2-compatible systems only.
- Suppresses output display sent to STDOUT.
RTemplate:NbndT
- Activates automatic system reboot upon encountering errors.
- Permits inclusion of comments within CONFIG.SYS (not processed by PTS-DOS).
- Reserves a drive letter to prevent usage by local block device drivers.
- Sets the default character for Resume () prompts in Yes/No/Resume dialogs.
- Returns control from nested CONFIG.SYS processing to the previous GOSUB or SWITCH location, optionally providing a return value.
- Specifies the amount of real mode memory available.
- Enables simultaneous loading of programs within CONFIG.SYS in the background.
- Stores the initial character of deleted files in a reserved FAT area.
- Defines video mode under FreeDOS or screen access methods for PTS-DOS.
- Controls the keyboard Scroll Lock state, turning it on or off.
- Establishes environment variables.
- Loads the command interpreter shell.
- Similar to SHELL but supports pre-allocating space to relocate COMMAND.COM into HMA or UMBs, minimizing fragmentation.
- Sets keyboard modifier states such as Shift Lock, Num Lock, Scroll Lock, and Insert mode.
- Determines file closure behavior when Ctrl+Alt+Del is pressed.
- Configures whether POST is skipped during reboot.
- , STACKSIZE, STACKSHIGH
- Define hardware interrupt stack sizes and buffer locations across various DOS versions (implementation varies by OS).
- , SYSBOOT, SYSGEN, SYSLOAD, SYSTOUMB
- Specific to PTS-DOS, these directives manage boot options, system memory allocation, and loading addresses.
- , SUPPRESSPOPUPS, SWAPPATH
- OS-specific commands controlling menu blocks, suppression of error popups, and swap file directory paths.
- , SWITCHES, SWITCHAR
- Manage conditional processing in CONFIG.SYS with customizable switch characters and options across different DOS variants.
- , THREADS, TIMESLICE
- OS/2-specific parameters for addressing FPU bugs, managing concurrency, and defining scheduler time slices.
- , TRACE, TRACEBUF
- Control timeouts during CONFIG.SYS processing and enable tracing or logging features in DR-DOS, PTS-DOS, and OS/2 environments.
- , TRAPDUMP
- Defines temporary file extensions (PTS-DOS) and detailed error logging options (OS/2).
UTemplate:NbndZ
- Directs DOS to use a specified segment as Upper Memory Block (UMB) space.
- Selects the UMB server implementation to be used.
- Defines address ranges allocated for UMB RAM usage.
- Enables or disables verification of disk writes.
- Specifies which DOS version is reported to applications.
- Configures VGA display status settings.
- Sets the current video mode similarly to FreeDOS's SCREEN directive.
- Indicates whether virtual DMA support is enabled.
- Controls deactivation of the processor’s Virtual Mode Extensions (VME).
- Configures VxD drivers for Windows environments.
- Sets system support parameters for Windows integration.
- Manages relocation of the Extended BIOS Data Area (XBDA).
- Enables conditional execution on XT-compatible systems.
- Activates built-in Year 2000 compliance features.
- Defines the default character used for affirmative responses in prompts.
- Configures tracking of file deletions.
Issues
While the system can initiate booting without CONFIG.SYS or AUTOEXEC.BAT files present, these are crucial for comprehensive customization and satisfying software dependencies. Corruption of these files necessitates troubleshooting efforts.
If CONFIG.SYS does not contain a SHELL directive or if it is missing or damaged, 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 is absent. From MS-DOS 6.0/PC DOS 6.1 onward and including Novell DOS 7+, users are prompted to specify a command interpreter path if COMMAND.COM cannot be found or fails to load. This mechanism allows limited shell replacement at runtime without requiring a reboot.
Due to compatibility issues between MS-DOS 7+ COMMAND.COM and DR-DOS, versions of DR-DOS starting at 7.02 enforce SHELL directives during skip/trace/step modes. This prevents bypassing these directives during recovery procedures. When skipping CONFIG.SYS processing, users must provide a valid shell path before COMMAND.COM loads.
The maximum size of CONFIG.SYS is restricted to several kilobytes (up to 64 KB) in MS-DOS/PC DOS but is virtually unlimited under DR-DOS, limited only by file system constraints. MS-DOS compiles CONFIG.SYS into an internal tokenized structure that organizes directives by load priority—drivers first followed by TSRs. Conversely, DR-DOS processes CONFIG.SYS sequentially line-by-line, granting precise control over driver and TSR load sequences through DEVICE and INSTALL commands. This approach facilitates resolving conflicts arising from load order and supports conditional execution based on hardware detection or error conditions, thereby enhancing system configurability.
DR-DOS's INSTALL directive can execute non-resident programs integrated into the CONFIG.SYS process flow. This feature proves useful for temporary program loading and debugging purposes.
In MS-DOS/PC DOS versions 2.0 through 4.01, the SHELL directive was limited to a maximum length of 31 characters. Subsequent releases expanded this limit up to 128 characters. DR-DOS allows up to 255 characters for this directive. None of these CONFIG.SYS commands support long filenames within their parameters.
Dual Booting DOS and Windows 9x
When Windows 95 is installed over a pre-existing DOS or Windows environment, the system renames CONFIG.SYS and AUTOEXEC.BAT to CONFIG.DOS and AUTOEXEC.DOS respectively. This allows users to switch between Windows 9x and DOS by temporarily restoring these files to their original names during DOS startup. Meanwhile, copies of the Windows 95 versions are preserved as CONFIG.W40 and AUTOEXEC.W40.
In cases where Caldera DR-DOS 7.02 or 7.03 is installed alongside Windows 95, the original CONFIG.SYS and AUTOEXEC.BAT files used by Windows remain intact. Instead, DR-DOS relies on alternative startup files named DCONFIG.SYS and AUTODOS7.BAT for its configuration.
OS/2 and Windows NT
OS/2 makes extensive use of CONFIG.SYS to manage system settings, load drivers, and configure the environment before launching its graphical user interface.
Within the OS/2 subsystem of Windows NT, the CONFIG.SYS file that OS/2 applications interact with is actually stored within the system registry rather than as a traditional file.
OS/2 utilizes several CONFIG.SYS commands that are not officially documented.
The importance of CONFIG.SYS continues in OS/2-based operating systems such as eComStation and ArcaOS, where it remains a key configuration component.
See also
- IBMBIO.COM / IO.SYS
- IBMDOS.COM / MSDOS.SYS
- CONFIG (environment variable)
- AUTOEXEC.BAT
- COMMAND.COM
- List of DOS commands
External links
- AUTOEXEC.BAT and CONFIG.SYS details at Computer Hope
- Overview of Windows 98 / MS-DOS 7.10 CONFIG.SYS commands (archived)
- Caldera’s CONFIG.SYS Command Reference (archived) – summary of DR-DOS 7 directives
- Guide to FreeDOS CONFIG.SYS commands
- User Manual for PTS-DOS 2000 Pro including CONFIG.SYS directives summary
- Unofficial German PTS-DOS FAQ (PTS/FAQD) with extended CONFIG.SYS information