HISTORY (CONFIG.SYS directive)
| Company type | Configuration file |
|---|---|
| Industry | Operating systems |
| Founded | 1983 |
| Headquarters | N/A |
| Products | Configuration for DOS and OS/2 operating systems |
CONFIG.SYS serves as the main configuration file for the DOS and OS/2 operating system families. This plain ASCII text file contains setup instructions accessible to users, which are interpreted by the operating system's DOS BIOS—usually within IBMBIO.COM or IO.SYS—during the boot 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 management. Once CONFIG.SYS has been processed, DOS launches 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 primarily consists of name=value statements that set adjustable parameters or load files 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 company VEB Robotron.
Certain DOS versions check for alternative configuration filenames with higher priority than CONFIG.SYS:
- Advanced releases of Concurrent DOS 386, Concurrent DOS XM, Multiuser DOS, and REAL/32 replace CONFIG.SYS with CCONFIG.SYS (derived from "Concurrent"). Some Multiuser DOS editions utilize CCONFIG.INI, whereas REAL/32 prefers MCONFIG.SYS. These platforms support extended configuration data stored in binary files like CCONFIG.BIN, commonly edited through CONFIG.EXE.
- In DR DOS 3.31, PalmDOS 1.0, Novell DOS 7, OpenDOS 7.01, and DR-DOS 7.02+, the filename DCONFIG.SYS (from "DR DOS") takes precedence over CONFIG.SYS. Originally connected to disk compression utilities, it also enables multi-boot setups.
- OpenDOS 7.01 and DR-OpenDOS 7.02 additionally search for ODCONFIG.SYS, while certain DR-DOS 7.02+ variants look for DRCONFIG.SYS.
- Starting with DR DOS 6.0, the SYS /DR:ext command permits customization of default file extensions, allowing multiple system files to coexist in one root directory and be selectable via boot loaders such as LOADER included with Multiuser DOS and DR-DOS versions 7.02/7.03.
- The SHELL directive can specify alternative AUTOEXEC.BAT files using /P[:filename.ext], with COMMAND.COM supporting extensions other than ".BAT" (a feature also found in 4DOS).
- From DR-DOS 6.0 onward, CHAIN=filespec enables continuation of configuration processing in another file that may reside outside the root directory; versions 7.02 and later add an optional label argument for jumping to specific sections within these files.
- In DR-DOS 7.03 and newer, the SYS /A option copies both CONFIG.SYS and AUTOEXEC.BAT alongside system files.
FreeDOS uses FDCONFIG.SYS as its configuration filename, while RxDOS version 7.24 and above utilize RXCONFIG.SYS. The operating system PTS-DOS employs CONFIG.PTS.
Both CONFIG.SYS and AUTOEXEC.BAT exist in the root directory of boot drives for Windows 95 and Windows 98, although they are generally left empty.
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 loaded during 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 destinations for commands such as , , , and .
- Functions like , but also allows in-line comments following other CONFIG.SYS instructions. (Note: MS-DOS/PC DOS does not ignore inline comments inside double quotes.)
- Used at the beginning of inline comments in conjunction with the ; directive.
- Prompts a Yes/No confirmation before executing the next CONFIG.SYS command.[1] FreeDOS supports optional conditional execution via boot menus using and . DOS 6.0 and later versions provide a similar feature by appending after directives (e.g., ).
- Forces unconditional execution of the subsequent CONFIG.SYS directive.
ATemplate:NbndC
- Determines whether programs can be terminated upon errors.
- Specifies which drives record file access timestamps within FAT file systems.
- Enables conditional execution specifically on AT-compatible hardware.
- Manages boot loading processes.
- Adjusts verbosity 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 fundamental device drivers into memory.
- Produces a brief beep sound, even if audible alerts are disabled.
- Indicates which operating system should boot next.
- Enables or disables extended Ctrl+C checking functionality.
- Sets the quantity 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)
- Configure cache block size, time-to-live, and flush intervals.
- Executes programs within CONFIG.SYS, pausing further processing until completion.
- (DR-DOS 7.02+)
- Controls keyboard Caps Lock state.
- , CDDBUFFERS (PTS-DOS only)
- Defines CD-ROM driver name and buffer allocation.
- (DR DOS 5.0+ and Embedded DOS)
- Continues processing CONFIG.SYS from a new file or label.
- , CLS, CODEPAGE (various OS versions)
- Set system clock type, clear screen display, and specify OEM codepages.
- , COLOR (PTS-DOS only)
- Assign CMOS RAM address and configure boot menu colors.
- (DR-DOS 7.02+)
- Defines count, sequence, I/O addresses, and timeout values for COM ports.
- , COMMENT(S), COUNTRY (various OS versions)
- Configure DMA buffers for COM devices, redefine inline comment characters, enable internationalization support.
- , CPSW (various OS versions)
- Set cursor position on display and enable codepage switching support.
- , CPU88-CPU486+ (PTS-DOS and DR-DOS)
- Execute conditionally based on CPU type or clock speed.
This concise list highlights essential CONFIG.SYS directives relevant to managing system configurations in professional environments utilizing DOS variants. It emphasizes compatibility, control over device drivers, memory handling, and system behavior optimization.
DTemplate:NbndF
- Adjusts relocation settings for drive descriptor tables.
- Specifies memory segment address used for multi-sector disk data deblocking operations.
- Activates internal debugger capabilities.
- Boot loader management utility.
- Loads device drivers into conventional memory.
- Loads device drivers into upper memory areas (similar to in DRDOS 5.0).
- Configures country codes and codepages for keyboard, screen, and printer devices.
- Sets cache memory size parameters.
- Specifies compatibility mode for floppy disk drives.
- Selects display font for output devices.
- Controls loading of DOS into high memory and usage of upper memory blocks (akin to in DRDOS 5.0).
- Places DOS tables such as BUFFERS, FCBS, FILES, LASTDRIVE, STACKS into upper memory regions.
- Defines alternate directory paths for DOS files.
- Sets search paths for locating data files.
- Specifies physical disk drive parameters explicitly.
- Defines characteristics for unrecognized drives.
- See .
- Enables drive access for PDUMP.nnn error log files.
- Outputs a message on the screen during processing.
- Displays messages including ANSI escape sequences for formatting.
- Adds extra validation checks when launching programs.
- Specifies an error or return code to assume next in sequence.
- Configures A20 gate status upon program start-up.
- Terminates CONFIG.SYS processing prematurely except for SWITCHES and SHELL directives.
- Sets size of hash table used for accelerating file open operations (distinct from MS-DOS FASTOPEN driver).
- Number of cached File Control Blocks open at once (shares buffer with FILES parameter under DR-DOS).
- Similar to FCBS but explicitly loads into upper memory areas.
- Boot manager utility command.
- Defines maximum number of simultaneously open files allowed by the system.
- Like FILES but loads handles explicitly into upper memory blocks.
- Includes execution of specified subsections within CONFIG.SYS (refer to IGNORE directive).
GTemplate:NbndI
- Waits for a key press or timeout, assigning the error level to the ASCII value of the key or 1024 if timed out.
- Resumes processing of CONFIG.SYS at a designated label.
- Continues nested CONFIG.SYS execution at a specified label, then returns to the prior point.
- Refer to , , or for additional details.
- Consult for further information.
- See for more context.
- Refer to or as applicable.
- See or for related commands.
- Consult for relevant guidance.
- Loads a TSR program into memory following DOS data segment relocation, functioning similarly to .
- Refer to , , or for extended information.
- See for further explanation.
- Refer to or as needed.
- Activates console and command line history buffer with advanced pattern search capabilities.
- Defines the segment address for HMA.
- Configures energy-saving mode via HLT instruction.
- Determines whether the system checks for boot sector viruses during startup.
- Loads installable file system drivers.
- Prevents execution of designated CONFIG.SYS sections.
- Permits specified programs to operate at ring 2, allowing direct hardware I/O access.
- Includes directives from another menu block, emulated through GOSUB/RETURN in DR-DOS environments.
- Sets the status of keyboard Insert mode.
- Installs a TSR program into memory.
- Loads a TSR program into upper memory, equivalent to HIINSTALL in DR DOS 5.0.
- Installs a TSR program after relocating the DOS data segment.
- Adjusts PIC interrupt priorities, elevating the specified IRQ to highest priority.
KTemplate:NbndM
- Defines keyboard layout configuration.
- Sets the address for the relocated keyboard buffer.
- Specifies the maximum number of accessible drives.
- Similar to LASTDRIVE but also loads Current Directory Structure into upper memory.
- Lists directories for DLL search paths.
- Manages backward compatibility settings for legacy applications.
- Determines the number of file locks allowed.
- Configures boot logo display when using PTS-DOS boot manager.
- Specifies count, order, I/O port address, and timeout settings for LPT1 device.
- Applies identical settings as LPT1 for LPT2 device.
- Mirrors LPT1 configuration for LPT3 device.
- Enables and configures LPT4 device with similar parameters.
- Sets delay before increasing process priority level.
- Controls memory allocation strategy parameters.
- Defines default DOS memory allocation method used by the system.
- Specifies available menu options within CONFIG.SYS menus.
- Sets color schemes for menus, emulatable in DR-DOS environments.
- Defines default menu block selection (DR-DOS emulation supported).
- Declares a menu block definition (emulatable under DR-DOS).
- Enables multitrack disk operation support.
- Continues CONFIG.SYS processing from another file, optionally loading a device driver and setting %NEWFILE% environment variable.
NTemplate:NbndQ
- Sets default No () response character in Yes/No/Resume prompts.
- Controls keyboard [[Num Lock|Template:Keypress]] state on startup.
- Enables conditional execution based on last error code, such as .
- Displays text and pauses until key press, similar to and commands in DR-DOS systems.
- Requires user confirmation when errors occur during CONFIG.SYS processing.
- Configures buffer sizes for LPT1 through LPT3 devices.
- Enables conditional execution on PC-compatible hardware platforms.
- Sets process scheduling priority policies.
- Defines disk I/O priority levels for running programs.
- Changes default printer device driver assignment between LPT1, LPT2, LPT3, or LPT4 ports.
- Specifies whether DOS applications are permitted to execute.
- Loads user interface shell components during startup.
- Enables conditional execution specifically on IBM PS/1-compatible machines.
- Enables conditional execution specifically on IBM PS/2-compatible machines.
- Suppresses display output sent to STDOUT.
RTemplate:NbndT
- Activates automatic system reboot upon encountering errors.
- Permits inclusion of comments within CONFIG.SYS.
- Allocates drive letters for local block device drivers.
- Defines the default Resume () character used in Yes/No/Resume prompts.
- Allows nested CONFIG.SYS processing to return to the previous GOSUB or SWITCH point, optionally with a return code.
- Sets the size of real mode memory.
- Enables concurrent background loading of programs inside CONFIG.SYS, functioning similarly to CALL or INSTALL commands in DOS.
- Determines whether the initial character of deleted files is saved in the FAT reserved area.
- Specifies video modes for FreeDOS or screen access techniques for PTS-DOS.
- Controls the state of the keyboard Scroll Lock key.
- Assigns environment variables.
- Loads the command interpreter shell.
- Functions like SHELL but allows a size parameter to pre-allocate COMMAND.COM into HMA or UMBs, reducing fragmentation.
- Defines keyboard modifier states such as Shift Lock and Num Lock.
- Configures whether files close upon pressing Ctrl+Alt+Del.
- Skips the Power-On Self-Test (POST) during reboot sequences.
- , STACKSIZE, STACKSHIGH
- Manage stack parameters across multiple DOS variants and platforms, each supporting different features.
- , SYSBOOT, SYSGEN, SYSLOAD, SYSTOUMB
- PTS-DOS-specific commands that handle boot configuration, system loading locations, and memory optimization including use of UMBs.
- , SUPPRESSPOPUPS, SWAPPATH
- OS/2 directives that block user interface pop-ups, suppress error logging, and define swap file directories respectively.
- , SWITCHES, SWITCHAR
- Control conditional processing flow and establish default switch characters ('/' or '-') across various DOS systems.
- , THREADS, TIMESLICE
- OS/2-exclusive settings adjusting hardware floating-point unit fixes, thread concurrency limits, and scheduler time slices.
- , TRACE, TRACEBUF
- Facilitate timing analysis and debugging logs for CONFIG.SYS execution under DR-DOS, PTS-DOS, and OS/2 environments.
- , TRAPDUMP
- Sets temporary file extensions (PTS-DOS) and enables detailed error logging (OS/2).
UTemplate:NbndZ
- Configures DOS to allocate a specific memory segment as Upper Memory Block (UMB).
- Selects the UMB server utilized by the system.
- Defines address ranges designated as UMB RAM.
- Toggles disk write verification on or off.
- Specifies the DOS version reported to applications.
- Manages VGA display status settings.
- Indicates the current video mode in use.
- Enables or disables virtual DMA capabilities.
- Controls deactivation of processor Virtual Mode Extensions.
- Configures VxD drivers for Windows environments.
- Adjusts system-level support for Windows operations.
- Relocates the Extended BIOS Data Area as configured.
- Enables conditional execution on XT-compatible hardware platforms.
- Provides built-in Year 2000 (Y2K) compliance support settings.
- Sets the default character used for affirmative responses in prompts.
- Manages file deletion tracking features.
Issues
While the system can initiate startup without CONFIG.SYS or AUTOEXEC.BAT present, these files are critical for comprehensive operating system customization and meeting software prerequisites. Corruption or loss of these files requires diagnostic intervention.
In cases where CONFIG.SYS lacks a SHELL directive or if it is missing or damaged, DOS attempts to locate COMMAND.COM within the root directory of the boot drive. Versions prior to 6.0 will fail to boot without it. Conversely, MS-DOS 6.0/PC DOS 6.1 and Novell DOS 7 and later versions prompt users to specify a command interpreter path if none is found. This prompt also appears if the primary shell terminates unexpectedly or is exited intentionally, allowing limited shell replacement during runtime without rebooting.
Due to compatibility issues between MS-DOS 7.0+ COMMAND.COM and DR-DOS, versions of DR-DOS 7.02 and newer prevent bypassing SHELL directives when operating in skip/trace/step modes (triggered by Ctrl+F5/F7/F8). Users are required to specify a valid shell before COMMAND.COM can be loaded from the root directory. Some DR-DOS releases introduced Ctrl+F6 functionality to restore skip mode behavior for recovery when invalid SHELL parameters are encountered.
CONFIG.SYS file size is restricted to several kilobytes (up to 64 KB) in MS-DOS/PC DOS but remains unlimited under DR-DOS aside from file system limitations. MS-DOS compiles CONFIG.SYS into a tokenized format in memory before sequentially processing directives—loading device drivers prior to TSRs. In contrast, DR-DOS interprets directives line-by-line at runtime, providing granular control over driver and TSR load order via DEVICE and INSTALL commands. This approach facilitates conflict resolution and debugging by supporting conditional execution based on hardware detection or error states as well as integrating temporary external utilities into the boot sequence.
The maximum length for SHELL command lines was capped at 31 characters in MS-DOS/PC DOS versions 2.0 through 4.01, extended to 128 characters in later releases. DR-DOS permits up to 255 characters. It should be noted that CONFIG.SYS directives do not accommodate long filenames.
Dual Booting Between 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, enabling dual boot functionality between Windows 9x and DOS. During a DOS boot, these files are temporarily restored to their original names, CONFIG.SYS and AUTOEXEC.BAT. The original Windows 95 versions are saved under the filenames CONFIG.W40 and AUTOEXEC.W40.
In setups where Caldera DR-DOS 7.02 or 7.03 coexists with Windows 95, the Windows-specific CONFIG.SYS and AUTOEXEC.BAT retain their standard names, while DR-DOS utilizes DCONFIG.SYS and AUTODOS7.BAT for its startup configuration.
OS/2 and Windows NT
OS/2 extensively depends on CONFIG.SYS to manage system settings, load drivers, and establish the environment prior to initiating its graphical user interface.
Within the OS/2 subsystem of Windows NT, the file perceived by OS/2 applications as CONFIG.SYS is actually maintained within the system registry.
There exists a variety of CONFIG.SYS commands for OS/2 that are either undocumented or insufficiently documented.
CONFIG.SYS continues to play a vital role in 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 Guide – includes CONFIG.SYS directive explanations (archived)
- Unofficial German PTS-DOS FAQ (PTS/FAQD) covering CONFIG.SYS directives (archived)
- ↑ Cite error: Invalid
<ref>tag; no text was provided for refs namedPaul_2000_CONFIG