SYSBOOT (CONFIG.SYS directive)
| Company type | Configuration file |
|---|---|
| Industry | Computer software |
| Founded | 1983 (with DOS version 2.0) |
| Products | Configuration commands for DOS and OS/2 |
CONFIG.SYS serves as the chief configuration file for DOS and OS/2 operating systems. This plain text file holds configuration commands that the operating system's DOS BIOS—commonly found in IBMBIO.COM or IO.SYS—interprets during the boot sequence. CONFIG.SYS was first introduced with DOS version 2.0.
Usage
The purpose of this file is to set up DOS for hardware devices and software applications, including the initialization of memory managers. Once CONFIG.SYS has been processed, DOS launches the command interpreter defined by the SHELL directive, or defaults to COMMAND.COM. Subsequently, this shell executes the commands found in AUTOEXEC.BAT.
CONFIG.SYS primarily contains name=value pairs that specify configurable parameters or load essential components such as device drivers and terminate-and-stay-resident programs (TSRs). It is located in the boot drive’s root directory.
The same filename is also utilized by (DCP), a version of MS-DOS developed by East-German firm VEB Robotron.
Certain DOS variants recognize alternative filenames that override CONFIG.SYS:
Advanced editions of Concurrent DOS 386, Concurrent DOS XM, Multiuser DOS, System Manager, and REAL/32 employ CCONFIG.SYS (derived from "Concurrent") instead of CONFIG.SYS. Some Multiuser DOS releases opt for CCONFIG.INI, while REAL/32 looks for MCONFIG.SYS. These platforms maintain supplementary configuration data within a binary file called CCONFIG.BIN, which is generally edited using CONFIG.EXE.
In versions like DR DOS 3.31, PalmDOS 1.0, Novell DOS 7, OpenDOS 7.01, and DR-DOS 7.02+, a file named DCONFIG.SYS (short for "DR DOS") takes priority over CONFIG.SYS. Originally created to support disk compression utilities that remapped drive letters, it also facilitates multi-boot setups.
OpenDOS 7.01 and DR-OpenDOS 7.02 seek out ODCONFIG.SYS, while some DR-DOS 7.02+ versions check for DRCONFIG.SYS. Starting with DR DOS 6.0, the SYS /DR:ext command enables users to modify default system file extensions, allowing multiple sets of system files to coexist in one root directory and be selected via boot loaders such as LOADER.
The SHELL directive permits specifying alternative AUTOEXEC.BAT files through /P[:filename.ext], with COMMAND.COM accepting various extensions—a feature also supported by 4DOS. From DR DOS 6.0 onward, CHAIN=filespec can be used to continue processing an additional configuration file located outside the root directory; DR-DOS 7.02+ enhances this with optional jump labels via CHAIN=filespec,label.
Beginning with DR-DOS 7.03+, the SYS /A command copies both CONFIG.SYS and AUTOEXEC.BAT alongside other system files during setup.
FreeDOS employs a comparable FDCONFIG.SYS file; RxDOS version 7.24+ uses RXCONFIG.SYS; and PTS-DOS utilizes CONFIG.PTS.
Both CONFIG.SYS and AUTOEXEC.BAT are found in the root directory of Windows 95 and Windows 98, although they are often empty since these operating systems are built on DOS foundations.
Unlike its predecessors, Windows Me does not process CONFIG.SYS at startup; instead, it loads environment variables directly from the Windows Registry at:
- HKLM\System\CurrentControlSet\Control\SessionManager\Environment
Within the context of 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>
:;*?!
- Used to create labels in CONFIG.SYS, serving as jump targets for , , , , and commands.
- Functions similarly to , but also supports inline comments following other directives. (Within MS-DOS/PC DOS, inline comments inside quotation marks are not ignored.)
- Initiates inline comments alongside the ; directive.
- Prompts a Yes/No confirmation before executing subsequent CONFIG.SYS commands. (FreeDOS does not support optional messages but allows conditions with boot menus defined by and .) From DOS 6.0 onward, a comparable feature exists by appending after a directive, e.g., .
- Forces unconditional execution of the next CONFIG.SYS command.
ATemplate:NbndC
- Determines whether programs can be aborted upon encountering errors.
- Sets which drives record file access timestamps in FAT file systems.
- Enables conditional execution on AT-compatible hardware.
- Manages boot loading.
- Adjusts verbosity level of error messages.
- Modifies the default serial driver assigned to the AUX: device.
- Prevents access to character devices outside the phantom \DEV directory.
- Loads fundamental device drivers into memory.
- Produces a beep sound even when notifications are disabled.
- Defines the next operating system to boot.
- Enables or disables extended Ctrl+C checking.
- Allocates a specified number of disk buffers.
- Explicitly loads buffers into HMA or UMB areas (similar to HIBUFFERS in DR DOS).
- , CACHETTL, CACHEFLUSH (Embedded DOS 6-XL only)
- Configure cache block allocation and flushing behavior.
- Runs programs from within CONFIG.SYS, pausing processing until they return.
- Sets the keyboard Caps Lock state.
- , CDDBUFFERS (PTS-DOS only)
- Defines CD-ROM driver name and buffer quantity.
- Continues processing CONFIG.SYS from another file or label.
- , CLS, CODEPAGE (various OS versions)
- Manage system clock type, clear screen, and set OEM codepages.
- , COM2, COM3, COM4 (DR-DOS 7.02+)
- Specify count, sequence, I/O addresses, and timeouts for COM ports.
- , COMMENT(S), COUNTRY (various OS versions)
- Define DMA buffers, customize inline comment characters, and enable internationalization support.
- , CPSW (MS-DOS/DR-DOS)
- Set cursor position and enable codepage switching support.
- CPU directives (PTS-DOS only), such as CPU88, CPU86+, CPU386+, specify conditional execution based on CPU model or speed.
DTemplate:NbndF
- Controls relocation of drive descriptor tables.
- Sets memory segment limit for multi-sector disk data deblocking.
- Activates internal debugger support.
- Manages boot loading operations.
- Loads device drivers into memory.
- Loads device drivers into upper memory (equivalent to in DRDOS 5.0).
- Configures country and codepage settings for keyboard, screen, and printer devices.
- Specifies cache memory sizes.
- Defines floppy disk compatibility mode.
- Selects display font.
- Loads DOS into high memory area and/or enables use of upper memory (similar to in DRDOS 5.0).
- Loads DOS tables such as BUFFERS, FCBS, FILES, LASTDRIVE, STACKS into upper memory areas.
- Specifies an alternative directory path for DOS files.
- Defines search paths for data files.
- Sets parameters for physical disk drives.
- Configures settings for unrecognized drives.
- See .
- Enables PDUMP.nnn error logging and specifies target drive.
- Displays a message on screen.
- Shows a message including ANSI escape sequences.
- Determines whether additional checks are performed when launching programs.
- Assigns an assumed error or return code for subsequent commands.
- Sets A20 gate status when starting a program.
- Terminates CONFIG.SYS processing before file end (except for SWITCHES and SHELL directives under certain conditions).
- Defines hash table size to accelerate file opening operations, differing from MS-DOS/PC DOS FASTOPEN driver behavior.
- Specifies maximum cached File Control Blocks open simultaneously (shares buffer space with FILES under DR-DOS).
- Similar to FCBS but explicitly loads FCBs into upper memory areas.
- Manages boot loading processes.
- Sets maximum number of simultaneously open files.
- Similar to FILES but explicitly loads file handles into upper memory areas.
- Includes execution of specified CONFIG.SYS subsections (see IGNORE).
GTemplate:NbndI
- Waits for a key press or timeout, setting the error level to the ASCII value of the key or 1024 if timed out.
- Resumes processing of CONFIG.SYS at a specified label.
- Continues nested CONFIG.SYS processing at a given label, returning afterward to the previous point.
- Refer to , , or for additional details.
- Consult for further information.
- See for related commands.
- Refer to or for context.
- See or for more information.
- Consult as needed.
- Loads a TSR program into memory following DOS data segment relocation. Compare with INSTCDEX.
- See , , or for related usage.
- Consult for further reference.
- Refer to or for details.
- Activates console and command line history buffer along with enhanced pattern searching capabilities.
- Defines the address of the HMA segment.
- Configures energy-saving mode via HLT instruction.
- Performs boot sector virus detection.
- Loads installable file system drivers.
- Prevents execution of specified subsections within CONFIG.SYS.
- Permits certain applications to operate at ring 2, enabling direct hardware I/O access.
- Incorporates directives from another menu block, emulated by GOSUB/RETURN in DR-DOS environments.
- Sets the status of the keyboard Insert mode.
- Installs a TSR program into memory space.
- Loads TSR into upper memory area (equivalent to HIINSTALL in DR DOS 5.0).
- Installs TSR after relocating DOS data segment (compare with INSTCDEX).
- Adjusts PIC interrupt priorities to prioritize a specified IRQ number.
KTemplate:NbndM
- Defines keyboard layout configuration.
- Assigns the address for the relocated keyboard buffer.
- Sets the maximum number of accessible drives.
- Similar to LASTDRIVE but loads Current Directory Structure into upper memory area.
- Lists paths used for DLL searching.
- Manages compatibility with legacy programs.
- Specifies the number of file locks allowed.
- Configures boot logo and startup messages when using PTS-DOS boot manager.
- Sets count, logical order, I/O address, and timeout parameters for LPT1 device.
- Applies LPT1 settings equivalently to LPT2 device.
- Applies LPT1 settings equivalently to LPT3 device.
- Enables and configures LPT4 device similarly to others.
- Defines wait interval before increasing process priority.
- Determines memory allocation method strategy.
- Sets default DOS memory allocation approach.
- Specifies menu option configurations.
- Defines menu color schemes (can be emulated via ECHO in DR-DOS).
- Specifies default menu block (emulatable using TIMEOUT and SWITCH in DR-DOS).
- Defines multiple menu blocks (emulatable via ECHO and SWITCH in DR-DOS).
- Enables multitrack disk operation support.
- Continues CONFIG.SYS processing from a new file after loading a device driver and setting %NEWFILE% environment variable.
NTemplate:NbndQ
- Specifies default No () character used in Yes/No/Resume prompts.
- Sets the status of keyboard Num Lock on or off during startup.
- Enables conditional execution based on last error code, such as .
- Displays text and waits for user keypress, similar to and commands in DR-DOS.
- Requires user confirmation upon encountering errors in CONFIG.SYS processing.
- Configures buffer sizes for LPT1 through LPT3 ports.
- Enables conditional execution specific to PC-compatible systems.
- Sets scheduler priority level for processes.
- Adjusts priority settings for disk I/O intensive programs.
- Changes default printer device driver assignment (LPT1-LPT4).
- Controls whether DOS applications are permitted to run or not.
- Loads a user interface shell environment.
- Allows conditional execution on IBM PS/1-compatible machines only.
- Allows conditional execution on IBM PS/2-compatible machines only.
- Suppresses output directed to STDOUT.
RTemplate:NbndT
- Activates automatic system reboot upon encountering errors.
- Permits inclusion of comments within CONFIG.SYS files.
- Allocates a drive letter for 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 command, optionally passing a return code.
- Specifies the amount of real mode memory available.
- Enables concurrent loading of programs in the background during CONFIG.SYS execution, functioning similarly to CALL or INSTALL commands in DOS.
- Determines whether the first character of deleted filenames is stored in the FAT reserved area.
- Defines video mode settings under FreeDOS or screen access methods for PTS-DOS.
- Sets the status of the keyboard Scroll Lock key.
- Establishes environment variables.
- Loads the command interpreter shell.
- Similar to SHELL but allows pre-allocation of space for COMMAND.COM to relocate into High Memory Area (HMA) or Upper Memory Blocks (UMBs), improving memory efficiency when using third-party shells.
- Specifies keyboard modifier states including Shift Lock, Num Lock, Scroll Lock, and Insert keys.
- Controls whether files are closed when pressing Ctrl+Alt+Del.
- Determines if Power-On Self Test (POST) is bypassed during reboot sequences.
- , STACKSIZE, STACKSHIGH
- Configure hardware interrupt stack sizes and buffer locations across various DOS editions, with some parameters disregarded in newer versions for compatibility purposes.
- , SYSBOOT, SYSGEN, SYSLOAD, SYSTOUMB
- Directives unique to PTS-DOS handling boot options, system memory allocation, and loading addresses for DOS components.
- , SWITCH
- Defines submenu blocks and enables conditional nested CONFIG.SYS processing triggered by key inputs on certain DOS variants.
- , SWAPPATH
- OS/2-specific commands that manage error log drive assignments and swap file directory paths.
- , SWITCHES
- Designate system switch characters (such as '/' or '-') and special options across different DOS implementations.
- , THREADS, TIMESLICE
- OS/2-exclusive parameters addressing hardware bug fixes, thread concurrency settings, and scheduler time slice durations.
- Configures timeout intervals for CONFIG.SYS single-step execution and sets default responses for prompts.[1][2][3]
- , TRACE, TRACEBUF, TRAPDUMP
- Manage temporary file extensions related to tracing, enable or disable single-step execution logging, define buffer sizes for trace data, and control error dump logging predominantly in OS/2 and advanced DOS environments.
UTemplate:NbndZ
- Sets a specific memory segment for DOS to use as Upper Memory Blocks (UMB).
- Specifies which UMB server is utilized by the system.
- Defines address ranges allocated as UMB RAM areas.
- Enables or disables verification of disk write operations.
- Configures the DOS version number reported to applications.
- Controls VGA display status settings.
- Indicates current video mode similarly to FreeDOS's SCREEN command.
- Determines whether virtual DMA usage is permitted.
- Specifies if the processor's Virtual Mode Extensions (VME) are disabled.
- Configures Virtual Device Driver (VxD) settings for Windows environments.
- Manages system support parameters for Windows operating systems.
- Controls relocation behavior of the Extended BIOS Data Area (XBDA).
- Enables conditional execution based on XT-compatible hardware detection.
- Activates built-in Year 2000 compliance features.
- Sets the default character used in Yes/No prompt responses.
- Configures tracking of file deletions.
Issues
Although the system can start without CONFIG.SYS or AUTOEXEC.BAT, these files are crucial for comprehensive OS customization and meeting software prerequisites. Any corruption or damage to these files necessitates diagnostic efforts.
In cases where CONFIG.SYS is missing a SHELL command (or the file itself is absent or damaged), DOS attempts to locate COMMAND.COM in the root directory of the boot drive. Versions of DOS prior to 6.0 will fail to boot if COMMAND.COM is not found, whereas MS-DOS 6.0, PC DOS 6.1, Novell DOS 7+, and subsequent releases prompt the user to specify the path to the command interpreter. This recovery prompt also appears if the command processor terminates unexpectedly or exits intentionally, enabling limited runtime substitution of the shell.
COMMAND.COM from MS-DOS 7.0 and later is not compatible with DR-DOS but is typically stored in C:\ within dual-boot environments. Starting with DR-DOS 7.02, SHELL directives are strictly enforced during skip, trace, and step modes, preventing users from bypassing them during startup recovery. Some versions introduced key sequences to reinstate previous skip behaviors for recovering from invalid SHELL parameters. When skipping CONFIG.SYS processing without a valid SHELL, users must enter a correct shell location before COMMAND.COM is loaded.
CONFIG.SYS file size under MS-DOS/PC DOS is limited to a few kilobytes (up to 64 KB in later editions), whereas DR-DOS imposes no fixed limit aside from file system constraints. MS-DOS converts CONFIG.SYS into a tokenized form in memory and processes commands sequentially—loading device drivers before TSRs. Conversely, DR-DOS parses each line individually, granting fine-grained control over load sequencing via DEVICE and INSTALL directives, which aids in resolving conflicts or debugging drivers. This method supports conditional execution based on hardware detection or error status and allows temporary external utilities to be integrated into the CONFIG.SYS workflow.
The maximum length of the SHELL line in MS-DOS/PC DOS versions 2.0 through 4.01 is restricted to 31 characters; later versions permit up to 128 characters, while DR-DOS accepts lines up to 255 characters. It should be noted that CONFIG.SYS directives do not accommodate long filenames.
Dual booting DOS and Windows 9x
When Windows 95 is installed over an existing DOS or Windows configuration, the original CONFIG.SYS and AUTOEXEC.BAT files are renamed to CONFIG.DOS and AUTOEXEC.DOS respectively, enabling dual boot functionality between Windows 9x and DOS environments. Upon booting into DOS mode, these files are temporarily restored to their original names. Backups of the Windows 95 versions are preserved as CONFIG.W40 and AUTOEXEC.W40.
In contrast, installing Caldera DR-DOS versions 7.02 or 7.03 alongside Windows 95 retains the Windows CONFIG.SYS and AUTOEXEC.BAT filenames, while DR-DOS employs separate startup files named DCONFIG.SYS and AUTODOS7.BAT.
OS/2 / Windows NT
OS/2 depends extensively on CONFIG.SYS for setting up device drivers and environment variables prior to launching its graphical user interface.
Within the OS/2 subsystem running under Windows NT, what OS/2 applications recognize as CONFIG.SYS is actually maintained within the Windows registry.
A significant number of undocumented CONFIG.SYS commands exist in OS/2, reflecting its intricate configuration requirements.
CONFIG.SYS continues to be utilized by OS/2 derivatives 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 settings (archived)
- Caldera's CONFIG.SYS Command Guide (archived) – summary of DR-DOS 7 directives
- Guide to FreeDOS CONFIG.SYS directives
- User Manual for PTS-DOS 2000 Pro including CONFIG.SYS directives overview
- German-language unofficial PTS-DOS FAQ (PTS/FAQD) featuring CONFIG.SYS directives