CPU86 (CONFIG.SYS directive)
| Company type | Configuration file |
|---|---|
| Industry | Computer software |
| Founded | 1983 |
| Headquarters | N/A |
| Products | Operating system configuration |
CONFIG.SYS serves as the essential configuration file for DOS and OS/2 operating systems. This plain ASCII text document holds configuration commands that the operating system's DOS BIOS—typically found in IBMBIO.COM or IO.SYS—interprets during the startup process. CONFIG.SYS was first introduced with DOS version 2.0.
Usage
The directives within CONFIG.SYS are responsible for setting up DOS to handle hardware devices, applications, and memory allocation. Once CONFIG.SYS has been processed, DOS loads the command interpreter specified by the SHELL directive, defaulting to COMMAND.COM if none is provided, which then executes the AUTOEXEC.BAT script.
This file predominantly contains name=value pairs that either configure system parameters or load components such as device drivers and terminate-and-stay-resident programs (TSRs) into memory.
In DOS environments, CONFIG.SYS is located in the boot drive's root directory.
The same filename is also utilized by (DCP), an MS-DOS variant developed by East-German manufacturer VEB Robotron.
Certain DOS variants prioritize alternative configuration filenames over CONFIG.SYS:
- Advanced editions of Concurrent DOS 386, Concurrent DOS XM, Multiuser DOS, System Manager, and REAL/32 prefer CCONFIG.SYS or CCONFIG.INI. - REAL/32 specifically searches for MCONFIG.SYS. These systems keep extra configuration data in CCONFIG.BIN, which can be edited using CONFIG.EXE.
For versions like DR DOS 3.31, PalmDOS 1.0, Novell DOS 7, and subsequent DR-DOS releases, DCONFIG.SYS overrides CONFIG.SYS priority. Originally linked to disk compression utilities, it now also manages multi-boot setups. OpenDOS 7.01 and DR-OpenDOS 7.02 look for ODCONFIG.SYS, whereas some DR-DOS 7.02+ variants check for DRCONFIG.SYS.
Starting with DR-DOS 6.0, users can alter default file extensions using SYS /DR:ext, allowing multiple system files to coexist within a single root directory and be selected via boot loaders such as LOADER. The SHELL line supports specifying alternative AUTOEXEC.BAT files, with COMMAND.COM accepting other extensions as well (a feature also supported by 4DOS). Additionally, the CHAIN=filespec command enables chaining to another configuration file during processing, including jumping to designated labels in DR-DOS 7.02 and later.
With DR-DOS 7.03 and beyond, the SYS /A option facilitates copying CONFIG.SYS and AUTOEXEC.BAT alongside core system files.
Other operating systems use similar but distinct filenames: FreeDOS employs FDCONFIG.SYS, RxDOS version 7.24 and later uses RXCONFIG.SYS, while PTS-DOS utilizes CONFIG.PTS.
In Windows 95 and 98, both CONFIG.SYS and AUTOEXEC.BAT reside in the boot drive's root but are generally left empty. Conversely, Windows Me bypasses parsing CONFIG.SYS during startup, instead loading environment variables from the Windows Registry (HKLM\System\CurrentControlSet\Control\SessionManager\Environment).
Within the FlexOS system, CONFIG.SYS exists as a binary file that specifies resource managers and device drivers.
Example
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 commands.
- Functions similarly to , but also supports in-line comments following other CONFIG.SYS statements. (In MS-DOS/PC DOS, inline comments enclosed in double quotes are not ignored.)
- Used at the beginning of in-line remarks alongside the ; command.
- Prompts a Yes/No confirmation before executing subsequent CONFIG.SYS commands. (FreeDOS allows optional conditions with boot menus.) Starting with DOS 6.0, a comparable feature is available by appending after the directive, e.g., .
- Forces immediate execution of the next CONFIG.SYS directive without condition.
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 specifically on AT-compatible hardware.
- Boot manager utility.
- Adjusts the verbosity level of error messages.
- Alters the default serial device driver assigned to the AUX device.
- Prevents character devices from being accessible outside the phantom \DEV directory.
- Loads fundamental device drivers into memory.
- Produces a beep sound even if audible alerts are disabled.
- Indicates which operating system to boot next.
- Enables or disables extended Ctrl+C detection.
- Sets the quantity of disk buffers allocated.
- Similar to BUFFERS but loads buffers into HMA or UMB regions.
- , CACHETTL, CACHEFLUSH (Embedded DOS 6-XL exclusive)
- Manage allocation and timing of cache blocks.
- Runs programs within CONFIG.SYS in the foreground, pausing further processing until completion.
- Defines keyboard Caps Lock status during startup.
- , CDDBUFFERS (PTS-DOS exclusive)
- Specifies CD-ROM driver name and buffer quantity.
- Continues CONFIG.SYS processing from another file or label.
- , CLS (PTS-DOS and DR DOS variants)
- Defines clock type and screen clearing commands.
- (OS/2 exclusive)
- Sets OEM codepage(s).
- , COLOR (PTS-DOS only)
- Configures CMOS RAM address and colors for boot menu display.
- , COM2, COM3, COM4 (DR-DOS 7.02 and later)
- Sets parameters for serial ports including count, order, I/O addresses, and timeout values.
- , COMMENT (PTS-DOS and DOS editions)
- Specifies DMA buffer size and redefines inline-comment characters.
- (DOS 3.0+, DR DOS 3.31+, OS/2)
- Activates international language support features.
- , CPSW (DR DOS and MS-DOS versions)
- Supports cursor positioning and codepage switching capabilities.
- CPU-related directives (PTS-DOS and DR-DOS) provide conditional execution based on CPU type or speed.
DTemplate:NbndF
- Adjusts relocation settings for drive descriptor tables.
- Defines memory segment address used for multi-sector disk data deblocking operations.
- Activates internal debugger functionality.
- Boot manager component.
- Loads device drivers into standard memory areas.
- Loads device drivers into upper memory blocks (equivalent to in DRDOS 5.0).
- Configures country-specific and codepage data for keyboard, screen, and printer devices.
- Sets cache memory size parameters.
- Determines floppy disk compatibility mode settings.
- Specifies the display font used by the system.
- Loads DOS into high or upper memory segments (similar to in DRDOS 5.0).
- Moves DOS tables such as BUFFERS, FCBS, FILES, LASTDRIVE, STACKS into upper memory areas.
- Assigns an alternative search path for DOS files.
- Defines search path locations for data files.
- Specifies physical parameters of disk drives.
- Sets parameters for unknown or unrecognized drives.
- Refer to .
- Enables logging of PDUMP.nnn error reports on a specified drive.
- Outputs a message to the display screen.
- Displays messages incorporating ANSI escape sequences for formatting.
- Adds extra verification steps when launching programs.
- Defines an assumed error or return code for subsequent commands.
- Specifies the A20 gate state during program startup.
- Terminates CONFIG.SYS processing before reaching file end (except under certain conditions involving SWITCHES and SHELL).
- Configures hash table size to optimize file open speed, differing from MS-DOS/PC DOS FASTOPEN driver implementation.
- Sets maximum number of cached File Control Blocks that can be opened simultaneously (shares buffer with FILES under DR-DOS).
- Similar to FCBS but loads these into upper memory areas.
- Boot manager functionality included here as well.
- Determines maximum number of files that can be opened simultaneously by the system.
- Functions like FILES but explicitly loads file handles into upper memory segments.
- Includes execution of specified subsections within CONFIG.SYS (refer to IGNORE directive).
GTemplate:NbndI
- Awaits a key press or timeout, returning the ASCII code or 1024 if timed out.
- Resumes CONFIG.SYS processing at a designated label.
- Executes nested CONFIG.SYS processing at a specified label, allowing return to the previous point.
- Refer to , , or for additional details.
- Consult for further information.
- See for more guidance.
- Refer to or as needed.
- See or for related commands.
- Consult for instructions.
- Loads a TSR program into memory following DOS data segment relocation; compare with INSTCDEX.
- Refer to , , or for similar functions.
- See for related usage.
- Consult or for additional options.
- Activates console and command line history buffers with enhanced search capabilities.
- Defines the address of the High Memory Area (HMA) segment.
- Sets up HLT power-saving mode.
- Enables virus scanning of the boot sector.
- Loads installable filesystem drivers.
- Prevents execution of selected CONFIG.SYS subsections.
- Permits certain programs to execute at ring 2, granting direct hardware I/O access.
- Incorporates directives from another menu section (simulated via GOSUB/RETURN in DR-DOS).
- Adjusts keyboard Insert mode status.
- Loads TSR programs into memory.
- Installs TSR programs into upper memory blocks (equivalent to HIINSTALL in DR DOS 5.0).
- Loads TSR programs post DOS data segment relocation; see INSTCDEX for comparison.
- Rotates PIC interrupt priorities to prioritize a specified IRQ line.
KTemplate:NbndM
- Defines the keyboard layout configuration.
- Sets the relocated keyboard buffer's memory address.
- Determines the maximum number of accessible drives.
- Functions like LASTDRIVE but also loads Current Directory Structure into upper memory.
- Specifies paths for DLL searches.
- Controls compatibility handling for legacy applications.
- Sets the number of file locks allowed.
- Configures display of the boot logo when using PTS-DOS boot manager.
- Defines parameters such as count, order, I/O address, and timeout for LPT1 port.
- Applies similar settings for LPT2 port.
- Configures LPT3 port with equivalent parameters.
- Enables and sets up LPT4 port likewise.
- Specifies delay before increasing process priority level.
- Configures strategy for memory allocation management.
- Sets default DOS memory allocation method.
- Defines options available in the system menu.
- Specifies color schemes for menus (can be emulated using ECHO in DR-DOS).
- Selects default menu block (emulatable via TIMEOUT and SWITCH in DR-DOS).
- Defines individual menu blocks (emulatable via ECHO and SWITCH in DR-DOS).
- Enables support for multitrack disk operations.
- Continues processing CONFIG.SYS from another file, optionally loading a driver and setting %NEWFILE% environment variable.
NTemplate:NbndQ
- Sets default 'No' () response character in Yes/No/Resume prompts.
- Controls keyboard Num Lock state (on/off).
- Allows conditional execution based on the last error code, e.g., .
- Displays text and waits for key press, similar to and commands in DR-DOS.
- Requires user confirmation upon CONFIG.SYS errors.
- Configures buffer sizes for LPT ports.
- Enables conditional execution on PC-compatible hardware platforms.
- Sets system priority scheduler parameters.
- Assigns priority levels to disk I/O operations.
- Changes default printer device driver among LPT1 through LPT4 ports.
- Specifies permission for running DOS programs.
- Loads the user interface shell environment.
- Conditional execution applicable to IBM PS/1-compatible systems.
- Conditional execution applicable to IBM PS/2-compatible systems.
- Suppresses output display directed to STDOUT.
RTemplate:NbndT
- Activates automatic system reboot upon encountering errors.
- Permits inclusion of comments within CONFIG.SYS files (ignored in PTS-DOS).
- Allocates a drive letter for local block device drivers.
- Sets the default Resume () character used in Yes/No/Resume prompts.
- Returns control from nested CONFIG.SYS processing to the prior GOSUB or SWITCH location, optionally passing a return code.
- Defines the size of real mode memory available.
- Enables concurrent loading of programs within CONFIG.SYS, functioning similarly to CALL or INSTALL commands.
- Saves the initial character of deleted files in the reserved FAT area.
- Determines video mode under FreeDOS or specifies screen access methods under PTS-DOS.
- Toggles keyboard Scroll Lock status on or off.
- Establishes environment variables.
- Loads the command interpreter shell.
- Similar to SHELL but includes a SIZE parameter to pre-allocate COMMAND.COM into HMA or UMBs, reducing fragmentation.
- Sets keyboard modifier states such as Shift Lock, Num Lock, Scroll Lock, and Insert mode.
- Controls whether files close upon pressing Ctrl+Alt+Del.
- Bypasses POST during reboot sequences.
- , STACKSIZE, STACKSHIGH
- Configure interrupt stack sizes and buffer locations across various DOS versions, differing by system release and vendor implementation.
- , SYSBOOT, SYSGEN, SYSLOAD
- Directives unique to PTS-DOS that handle boot management, alternative operating system boot files, DOS memory layouts, and loading systems from alternate disk sectors.
- , SWITCH, SWITCHES
- Facilitate conditional processing blocks within CONFIG.SYS with differing levels of support among DOS variants, enabling complex configuration scenarios.
- , SWAPPATH, THREADS, TIMESLICE
- OS/2-specific settings that manage error logging paths, swap file locations, thread concurrency, and scheduler time slices to optimize system performance.
- , TRACE, TRACEBUF
- Manage temporary file extensions in PTS-DOS, enable or disable single-step debugging of CONFIG.SYS in DR-DOS and PTS-DOS, and configure trace log buffer sizes in OS/2 environments.
- , SXFAKEHWFPU
- OS/2 features designed for detailed error logging and correction of FPU rounding bugs to enhance system reliability.
UTemplate:NbndZ
- Assigns a specific segment for UMB memory usage by DOS.
- Configures the Upper Memory Block (UMB) server settings.
- Defines address ranges allocated for UMB RAM.
- Enables or disables verification of disk writes.
- Specifies the DOS version number reported to applications.
- Sets VGA display status parameters.
- Indicates the current video mode in use.
- Determines whether virtual DMA is enabled.
- Disables the processor’s Virtual Mode Extensions feature.
- Configures VxD driver parameters for Windows environments.
- Adjusts system support settings for Windows operation.
- Manages relocation of the Extended BIOS data area (EBDA).
- Executes conditionally on XT-compatible hardware platforms.
- Enables built-in Year 2000 compliance support.
- Sets the default affirmative character used in prompts.
- Configures tracking behavior for file deletions.
Issues
Although the system can initiate boot without CONFIG.SYS or AUTOEXEC.BAT files present, these files are critical for customizing the operating system environment and loading necessary software components. If corrupted, they require diagnostic attention.
In cases where CONFIG.SYS lacks a SHELL directive or is absent/damaged, DOS attempts to locate COMMAND.COM within the root directory of the boot drive. Versions earlier than 6.0 will fail to start if COMMAND.COM is missing. MS-DOS 6.0/PC DOS 6.1 and Novell DOS 7 and later versions prompt users to specify a command processor path. This prompt also appears if the shell terminates unexpectedly or exits intentionally, allowing users to replace the shell at runtime without rebooting.
Due to incompatibilities between MS-DOS versions 7.0 and above COMMAND.COM and DR-DOS shells, DR-DOS 7.02 and later prevent bypassing SHELL directives when using skip/trace/step modes (triggered by Ctrl+F5/F7/F8). Subsequent updates introduced Ctrl+F6 to restore skip functionality for recovery from invalid SHELL arguments. When skipping CONFIG.SYS processing without locating a SHELL directive, users must input a valid shell filename before COMMAND.COM can be loaded from the root directory.
CONFIG.SYS size limitations vary depending on DOS version—MS-DOS and PC DOS restrict file size to several kilobytes (up to 64 KB in newer editions), whereas DR-DOS imposes no inherent size restrictions beyond those of the underlying file system. MS-DOS processes CONFIG.SYS by compiling it into a tokenized form stored in memory before executing directives sequentially (loading device drivers prior to TSRs). In contrast, DR-DOS interprets directives line-by-line during processing, allowing precise control over load order through DEVICE and INSTALL commands—facilitating conflict resolution and driver debugging.
This line-by-line interpretation in DR-DOS also supports conditional execution based on hardware detection or error conditions and permits integration of temporary external programs via INSTALL.
The maximum length for SHELL command lines has expanded over time—from an initial limit of 31 characters in MS-DOS/PC DOS versions 2.0 through 4.01 up to as many as 128 characters in later releases—with DR-DOS supporting up to 255 characters. It is important to note that CONFIG.SYS directives do not accommodate long filenames.
Dual Booting DOS with Windows 9x
When Windows 95 is installed over a pre-existing DOS or Windows configuration, the system renames CONFIG.SYS and AUTOEXEC.BAT to CONFIG.DOS and AUTOEXEC.DOS respectively. This renaming supports dual boot functionality between Windows 9x and DOS environments. During a DOS boot session, these files are temporarily reverted 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 cases where Caldera DR-DOS versions 7.02 or 7.03 coexist with Windows 95, the Windows CONFIG.SYS and AUTOEXEC.BAT files remain untouched. Instead, DR-DOS employs its own startup scripts named DCONFIG.SYS and AUTODOS7.BAT, ensuring backward compatibility with earlier releases of DR DOS.
OS/2 and Windows NT
OS/2 relies heavily on CONFIG.SYS for loading drivers and setting up the environment prior to launching its graphical user interface. Within the OS/2 subsystem of Windows NT, the CONFIG.SYS configuration is stored in the system registry to manage OS/2 applications.
OS/2 supports a variety of undocumented CONFIG.SYS commands, highlighting the complexity of its setup requirements.
CONFIG.SYS continues to play a crucial role in OS/2-based operating systems such as eComStation and ArcaOS, preserving traditional system configuration capabilities for contemporary enterprise use.
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
- Details on FreeDOS CONFIG.SYS commands
- PTS-DOS 2000 Pro User Manual covering CONFIG.SYS directives (archived)
- Unofficial German PTS-DOS FAQ including CONFIG.SYS information (archived)