PC (CONFIG.SYS directive)
| Company type | Configuration file |
|---|---|
| Industry | Computer software |
| Founded | 1983 |
| Products | DOS and OS/2 system configuration |
CONFIG.SYS serves as the main configuration file utilized by the DOS and OS/2 operating system families. This specialized ASCII text document contains setup instructions accessible to users, which are interpreted by the operating system's DOS BIOS—commonly found in files like IBMBIO.COM or IO.SYS—during the boot phase. The CONFIG.SYS file was first introduced with DOS version 2.0.
Usage
The directives within CONFIG.SYS configure DOS settings related to hardware devices, software applications, and memory allocation. Once CONFIG.SYS has been processed, DOS launches the command interpreter specified on the SHELL line; if none is indicated, it defaults to COMMAND.COM, which then executes the commands in the AUTOEXEC.BAT file.
CONFIG.SYS predominantly consists of name=value entries that either adjust configurable parameters or load components such as device drivers and terminate-and-stay-resident programs (TSRs).
In DOS environments, this file is located in the root directory of the system’s boot partition.
The same filename is also employed by (DCP), a variant of MS-DOS developed by East-German manufacturer VEB Robotron.
Certain DOS variants prioritize alternative filenames over CONFIG.SYS:
Early releases of Concurrent DOS, versions 3.2 through 4.1, did not support CONFIG.SYS; however, subsequent editions including Concurrent DOS 386, Concurrent DOS XM, Multiuser DOS, System Manager, and REAL/32 utilize CCONFIG.SYS instead. Some Multiuser DOS variants use CCONFIG.INI, while REAL/32 checks for MCONFIG.SYS. These platforms maintain extra configuration data (for example, INIT_INSTALL) within a binary file named CCONFIG.BIN, which is generally edited via 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 supersedes CONFIG.SYS as the primary configuration file. This naming convention originated from disk compression software requirements and also facilitates multi-boot configurations. OpenDOS 7.01 and DR-OpenDOS 7.02 additionally check for ODCONFIG.SYS, while some DR-DOS 7.02+ editions look for DRCONFIG.SYS.
Starting with DR DOS 6.0, the command SYS /DR:ext enables users to modify default system file extensions, allowing multiple distinct system file sets to coexist within a single root directory and be selected by boot loaders such as LOADER (used by Multiuser DOS and DR-DOS). The SHELL directive supports specifying alternate AUTOEXEC.BAT files using /P[:filename.ext], and COMMAND.COM can recognize different extensions when launched this way; these capabilities are also supported by 4DOS. The CHAIN=filespec directive in CONFIG.SYS permits continuation of processing in another configuration file located anywhere on disk; from DR-DOS 7.02 onwards, an optional label parameter (CHAIN=filespec,label) allows jumping directly to a defined section within that file.
Versions of DR-DOS from 7.03 onward introduce a SYS /A option that copies associated CONFIG.SYS and AUTOEXEC.BAT files alongside system files during installation.
FreeDOS employs a comparable configuration file named FDCONFIG.SYS; similarly, RxDOS version 7.24 and above uses RXCONFIG.SYS, while PTS-DOS relies on CONFIG.PTS.
Both CONFIG.SYS and AUTOEXEC.BAT are present in the root directory of Windows 95 and Windows 98 startup drives but are usually left empty.
Unlike its predecessors, Windows Me does not process CONFIG.SYS at boot time; instead, it retrieves environment variable settings directly from the Windows Registry at:
- HKLM\System\CurrentControlSet\Control\SessionManager\Environment
In contrast, under FlexOS, CONFIG.SYS exists as a binary file that specifies resource managers and device drivers loaded during system initialization.
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 used as jump destinations for , , , , and commands.
- Functions like , but also supports inline comments following other instructions. (MS-DOS/PC DOS treats inline comments differently if enclosed in double quotes.)
- Used to begin inline comments alongside the ; directive.
- Prompts a Yes/No confirmation before executing subsequent commands. (FreeDOS allows optional conditions with boot menus but lacks optional messages.) DOS 6.0+ provides a similar capability by appending after commands.
- Executes the next command without any condition.
ATemplate:NbndC
- Determines whether programs can be terminated upon errors.
- Sets which drives record file access date stamps in FAT systems.
- Enables conditional execution on AT-compatible hardware.
- Boot manager utility.
- Adjusts verbosity 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 a base device driver into memory.
- Produces a brief beep even when audible alerts are disabled.
- Defines which operating system will boot next.
- Enables or disables extended Ctrl+C checking.
- Specifies the count of disk buffers to allocate.
- Similar to BUFFERS, but loads buffers into HMA or UMB areas.
- , , (Exclusive to Embedded DOS 6-XL)
- Manage cache block allocation and flushing parameters.
- Loads programs during CONFIG.SYS processing, runs them in foreground, pausing CONFIG.SYS until completion.
- Sets keyboard Caps Lock status.
- , (PTS-DOS only)
- Defines CD-ROM driver name and buffer quantity.
- (DR DOS 5.0+, Embedded DOS)
- Continues CONFIG.SYS processing from a new file or label.
- , , and other PTS-DOS-specific directives control system clock, screen clearing, color settings, buffers, etc.
- , , and similar commands enable internationalization support and codepage settings (varies by OS).
- CPU-specific directives (e.g., CPU386, CPU486) allow conditional execution based on processor type (PTS-DOS, DR-DOS).
DTemplate:NbndF
- Adjusts relocation of drive descriptor tables.
- Sets memory segment limit up to which multi-sector disk data deblocking is allowed.
- Activates internal debugger support.
- Boot manager function.
- Loads a device driver into memory.
- Loads a device driver into upper memory (equivalent to in DRDOS 5.0).
- Configures country and codepage information for keyboard, screen, and printer devices.
- Sets cache memory sizes.
- Defines floppy disk compatibility mode.
- Specifies display font settings.
- Controls loading of DOS into high or upper memory (similar to in DRDOS 5.0).
- Loads DOS tables (BUFFERS, FCBS, FILES, LASTDRIVE, STACKS) into upper memory areas.
- Provides an alternative path for DOS file searching.
- Specifies search paths for data files.
- Defines physical parameters of disk drives.
- Sets parameters for unrecognized drives.
- See .
- Enables PDUMP.nnn error log creation and assigns drive location.
- Outputs a message on screen.
- Displays messages incorporating ANSI Escape sequences.
- Determines if extra checks occur when launching programs.
- Defines an assumed error or return code value.
- Sets A20 gate state upon program start-up.
- Terminates CONFIG.SYS processing early (except for certain directives).
- Configures hash table size for fast file opening operations, differing from MS-DOS/PC DOS FASTOPEN driver behavior.
- Number of cached File Control Blocks that can be opened simultaneously (shares buffer space with FILES in DR-DOS).
- Similar to FCBS but explicitly loads into upper memory areas.
- Boot manager function again.
- Specifies maximum number of files open concurrently.
- Same as FILES but explicitly loads file handles into upper memory regions.
- Allows inclusion and execution of specified CONFIG.SYS subsections (refer to IGNORE).
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 a designated label.
- Continues nested CONFIG.SYS execution at a specified label, then returns to the previous point.
- Refer to , , or for additional details.
- See also .
- Consult .
- Refer to or for more information.
- See or as relevant.
- Refer to .
- Loads a TSR program into memory following DOS data segment relocation. Compare with INSTCDEX.
- See , , or for related commands.
- Consult .
- Refer to or for further context.
- Activates console and command line history buffers along with enhanced pattern searching capabilities.
- Defines the HMA segment address.
- Configures energy-saving mode using the HLT instruction.
- Performs boot sector virus scanning.
- Loads installable file system drivers.
- Prevents execution of specified CONFIG.SYS subsections.
- Permits certain programs to run at ring 2 for direct hardware I/O operations.
- Includes 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 memory.
- Loads TSR into upper memory area (equivalent to HIINSTALL in DR DOS 5.0).
- Installs TSR after relocating the DOS data segment (see also INSTCDEX).
- Rotates PIC interrupt priorities to assign highest priority to a specified IRQ number.
KTemplate:NbndM
- Defines the keyboard layout configuration.
- Specifies the address of the relocated keyboard buffer.
- Sets the maximum number of accessible drives.
- Similar to LASTDRIVE but loads Current Directory Structure into upper memory.
- Lists paths used for DLL searching.
- Manages legacy program loading procedures.
- Sets the number of allowable file locks.
- Configures support for boot logos and integrates with PTS-DOS boot manager.
- Defines count, sequence, I/O address, and timeout settings for LPT1 device.
- Same configuration parameters for LPT2 device.
- Same configuration parameters for LPT3 device.
- Enables and configures LPT4 device functionality.
- Sets delay before increasing process priority level.
- Specifies memory allocation strategies.
- Defines default DOS memory allocation method.
- Specifies menu options available in CONFIG.SYS.
- Sets menu color schemes (can be emulated under DR-DOS).
- Defines default menu block (emulatable in DR-DOS environment).
- Specifies menu blocks (emulation supported by DR-DOS).
- Enables multitrack disk functionality.
- Continues CONFIG.SYS processing from a new file after loading a device driver and setting %NEWFILE% environment variable.
NTemplate:NbndQ
- Sets the default "No" character option in Yes/No/Resume prompts.
- Controls keyboard [[Num Lock|Template:Keypress]] state, enabling or disabling it by default.
- Executes commands conditionally based on the last error code, such as .
- Displays a message and waits for key input, similar to DR-DOS's and commands.
- Requires user confirmation of errors encountered during CONFIG.SYS processing.
- Configures buffer sizes for LPT port operations.
- Enables conditional execution based on PC compatibility checks.
- Sets process scheduling priority levels.
- Assigns priority levels specifically for disk I/O processes.
- Changes default printer device driver assignment among LPT1 through LPT4 ports.
- Determines whether DOS programs are permitted to run within the environment.
- Loads a user interface shell program during startup.
- Conditional execution restricted to IBM PS/1-compatible systems.
- Conditional execution restricted to IBM PS/2-compatible systems.
- Suppresses standard output display by muting it.
RTemplate:NbndT
- Activates automatic system reboot upon encountering errors.
- Permits inclusion of comments within CONFIG.SYS files.
- Allocates drive letters for local block device drivers.
- Defines the default character to resume () during queries.
- Returns nested CONFIG.SYS execution to the prior GOSUB or SWITCH point, optionally passing a return code.
- Sets the size of real mode memory.
- Enables concurrent program loading in the background during CONFIG.SYS processing, akin to CALL or INSTALL commands in DOS.
- Configures storage of the initial character from deleted files into the FAT reserved area.
- Determines video mode settings (FreeDOS) or screen access protocols (PTS-DOS).
- Controls the state of the Scroll Lock key on the keyboard.
- Assigns environment variables.
- Loads the command interpreter shell.
- Similar to SHELL but allows preloading COMMAND.COM into HMA or UMBs to minimize fragmentation, beneficial when using third-party shells.
- Specifies keyboard modifier states such as Shift Lock, Num Lock, Scroll Lock, and Insert mode.
- Determines whether files are closed during reboot triggered by Ctrl+Alt+Del.
- Skips Power-On Self-Test (POST) during reboot sequences.
- Serves as a compatibility placeholder due to changes in DR DOS's reentrant stack layout design.
- Sets the number of hardware interrupt stacks.
- Defines default stack size for newly created threads.
- Similar to STACKS but loads buffers into upper memory area (UMA).
- Configures boot manager settings.
- Reserved for internal directives.
- Manages behavior of the XMS A20 gate.
- {{nobold|(DOS 6.0 and later, excluding DR-DOS and FreeDOS)} }
- Defines submenu blocks (emulated via CLS, ECHO, SWITCH commands in DR-DOS).
- { { nob old | ( OS / 2 version 3.0 and above ) } }
- Redirects error logging from popup dialogs to disk drives.
- { { mono | 1 = SWAPPATH } } { { nob old | ( OS / 2 ) } }
- Specifies path for swap file storage.
- { { mono | 1 = SWITCH } } { { nob old | ( DR DOS 6.0 and newer ) } }
- Enables conditional continuation of nested CONFIG.SYS processing based on keypresses, returning control to previous location.
- { { mono | 1 = SWITCHAR } } { { nob old | ( DOS versions 2.0 through 2.1, DOS Plus, DR-DOS, PTS-DOS, FreeDOS, RxDOS ) } }
- Sets system default switch character ('/' or '-').
- { { mono | 1 = SWITCHES } } { { nob old | ( DOS 4.0, Novell DOS 7 and later; ignored in PTS-DOS ) } }
- Specifies special options for handling CONFIG.SYS processing.
- { { mono | 1 = SXFAKEHWFPU } } { { nob old | ( OS/2 Warp 4 FixPak and later ) } }
- Activates workaround for floating-point unit rounding bug in OS/2 Warp systems.
- { { mono | 1 = SYSBOOT } } { { nob old | ( PTS-DOS ) } }
- Selects alternative DOS operating system file for booting.
- { { mono | 1 = SYSGEN } } { { nob old | ( PTS-DOS ) } }
- Configures memory locations assigned to DOS components.
- { { mono | 1 = SYSLOAD } } { { nob old | ( PTS-DOS ) } }
- Loads system from an alternate disk region.
- { { mono | 1 = SYSTEMPOOL } } { { nob old | ( Embedded DOS 6-XL ) } }
- Specifies size of dynamic system memory pool allocated for runtime use.
- { { mono | 1 = SYSTOUMB } } { { nob old | ( PTS-DOS ) } }
- Loads DOS data and code into upper memory blocks (UMBs).
- { { mono | 1 = THREADS } } { { nob old | ( OS/2 ) } }
- Configures number of concurrent threads supported.
- { { mono | 1 = TIMEOUT } } { { nob old | ( DR-DOS, PTS-DOS ) } }
- Sets timeout durations for single-stepping through CONFIG.SYS and default responses in queries and SWITCH selections.
{{
mono |
""
} } {{ nob old | ( OS / ""
) } }
- Establishes minimum and maximum scheduler time slice durations.
{{
mono |
""
} } {{ nob old | ( PTS - ""
) } }
- Defines temporary file extension used by the system.
{{
mono |
""
} } {{ nob old | ( DR - "" , PTS - ""
OS / ""
) } }
- Globally or locally enables or disables single-step execution for CONFIG.SYS and AUTOEXEC.BAT scripts.
{{
mono |
""
} } {{ nob old | ( OS / "" only) } }
- Determines size of TRACE log buffer.
{{
mono |
""
} } {{ nob old | ( OS / "" and higher) } }
- Records comprehensive error information upon system traps.
UTemplate:NbndZ
- Assigns a particular segment for use as an Upper Memory Block (UMB) in DOS.
- Sets up the UMB management service.
- Defines memory address ranges allocated for UMB RAM.
- Toggles verification of disk write operations.
- Provides DOS version information to applications.
- Manages VGA display configuration status.
- Indicates the active video mode.
- Activates support for virtual DMA operations.
- Enables or disables the processor's Virtual Mode Extensions.
- Configures drivers for Windows VxD.
- Establishes support parameters for Windows systems.
- Moves the Extended BIOS Data Area (XBDA) to a new location.
- Executes conditionally on systems compatible with XT architecture.
- Implements built-in Year 2000 compliance features.
- Defines the default character used for affirmative responses in prompts.
- Controls tracking of file deletions.
Issues
Although the system can initialize without CONFIG.SYS, this file, together with AUTOEXEC.BAT, is critical for customizing the boot process and meeting software requirements. Any corruption or absence of these files requires diagnostic intervention.
If CONFIG.SYS does not contain a SHELL command or is missing/corrupted, 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 without it, whereas MS-DOS 6.0, PC DOS 6.1, and Novell DOS 7 and newer will prompt users to enter a valid command interpreter path. This prompt also appears if COMMAND.COM terminates unexpectedly or is exited deliberately, enabling a limited replacement shell session without restarting the system.
Due to incompatibilities between MS-DOS 7.x's COMMAND.COM and DR-DOS, versions 7.02 and later of DR-DOS enforce SHELL directives during skip, trace, or step debugging modes to prevent circumvention in dual-boot environments. Additionally, new key combinations allow recovery from invalid SHELL parameters by prompting users to provide correct shell filenames before loading COMMAND.COM.
The maximum size for CONFIG.SYS differs among systems: MS-DOS and PC DOS limit it to several kilobytes (up to 64 KB in later releases), while DR-DOS imposes no practical restriction beyond the file system capacity. MS-DOS processes CONFIG.SYS by compiling it into a tokenized structure in memory, ensuring device drivers load before TSRs. In contrast, DR-DOS interprets CONFIG.SYS commands sequentially, offering flexible control over loading order through DEVICE and INSTALL commands. This approach facilitates resolving conflicts during driver loading and supports conditional execution based on hardware status or error detection, enhancing customization and troubleshooting capabilities.
In early MS-DOS releases (2.0 through 4.01), the SHELL command line length was capped at 31 characters; subsequent versions permit up to 128 characters. DR-DOS allows even longer lines, up to 255 characters. It should be noted that CONFIG.SYS commands do not support long filenames.
Dual booting DOS and Windows 9x
When Windows 95 is installed on top of an existing DOS/Windows environment, it renames CONFIG.SYS and AUTOEXEC.BAT to CONFIG.DOS and AUTOEXEC.DOS respectively, enabling dual-boot functionality. Upon booting into DOS mode, these files are temporarily restored under their original names. Backup copies of Windows 95-specific configurations are saved as CONFIG.W40 and AUTOEXEC.W40.
In setups where Caldera DR-DOS versions 7.02 or 7.03 coexist with Windows 95, the Windows CONFIG.SYS and AUTOEXEC.BAT remain unaltered. Instead, DR-DOS utilizes DCONFIG.SYS and AUTODOS7.BAT files for its startup configuration processes.
OS/2 / Windows NT
In OS/2, the CONFIG.SYS file plays a crucial role in setting up drivers and the system environment prior to launching the graphical user interface. Within the Windows NT OS/2 subsystem, however, these CONFIG.SYS configurations are maintained within the system registry instead of a physical file.
OS/2 includes many CONFIG.SYS commands that are not officially documented. The use of CONFIG.SYS continues to be essential in OS/2-based operating 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
- 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
- Explanation of FreeDOS CONFIG.SYS commands
- PTS-DOS 2000 Pro User Guide with CONFIG.SYS command descriptions
- Unofficial German FAQ for PTS-DOS (2004) containing extra CONFIG.SYS commands