SET (CONFIG.SYS directive)
| Company type | Configuration file |
|---|---|
| Industry | Computer software |
| Founded | 1983 |
| Products | Initialization commands for DOS and OS/2 boot process |
CONFIG.SYS serves as the essential configuration file for the DOS and OS/2 operating system families. This ASCII text document contains initialization commands that the operating system's DOS BIOS—typically found in IBMBIO.COM or IO.SYS—interprets during the boot sequence. CONFIG.SYS was first introduced with DOS version 2.0.
Usage
The directives within CONFIG.SYS are responsible for setting up DOS to manage devices, applications, and memory allocation. Once CONFIG.SYS has been processed, DOS launches the command interpreter specified by the SHELL directive; if none is provided, it defaults to COMMAND.COM. Subsequently, this shell executes the commands contained in the AUTOEXEC.BAT file.
CONFIG.SYS mainly comprises name=value pairs that define configurable parameters or load essential components such as device drivers and terminate-and-stay-resident programs (TSRs). This file is located in the root directory of the drive from which the system boots.
The same filename is also utilized by (DCP), a variant of MS-DOS developed by East-German company VEB Robotron.
Certain DOS derivatives search for alternative configuration filenames that take precedence over CONFIG.SYS:
Earlier releases of Concurrent DOS (versions 3.2 through 4.1) lacked support for CONFIG.SYS. However, subsequent editions including Concurrent DOS 386, Concurrent DOS XM, Multiuser DOS, Datapac System Manager, and REAL/32 employ CCONFIG.SYS (where "C" denotes "Concurrent") or CCONFIG.INI in Multiuser DOS. REAL/32 additionally seeks out MCONFIG.SYS. These systems support enhanced configuration stored in a binary file named CCONFIG.BIN, which is commonly edited with CONFIG.EXE.
In environments like DR DOS 3.31, PalmDOS 1.0, Novell DOS 7, and DR-DOS versions 7.02 and later, a DCONFIG.SYS file supersedes CONFIG.SYS. Originally designed for disk compression utilities to reassign drive letters, this file also aids in managing multi-boot setups. OpenDOS 7.01 and DR-OpenDOS 7.02 prioritize ODCONFIG.SYS, while some DR-DOS 7.02+ variants check for DRCONFIG.SYS.
Starting with DR-DOS 6.0, users can modify default file extensions using SYS /DR:ext, enabling multiple system files with different extensions to coexist within one root directory—selectable by boot loaders such as LOADER (included with Multiuser DOS and DR-DOS 7.x). The SHELL directive supports specifying alternate AUTOEXEC.BAT files via /P[:filename.ext], with COMMAND.COM accepting extensions beyond ".BAT" (a feature also supported by 4DOS). The CHAIN=filespec command enables continuation of processing in another file, which need not be located in the root directory; DR-DOS 7.02 and later versions allow an optional label argument to jump to specific sections within that file.
From version 7.03 onward, DR-DOS introduced a SYS /A option that copies matching CONFIG.SYS and AUTOEXEC.BAT files alongside system files.
FreeDOS provides a comparable function using FDCONFIG.SYS, while RxDOS from version 7.24 utilizes RXCONFIG.SYS, and PTS-DOS implements CONFIG.PTS.
In both Windows 95 and Windows 98, CONFIG.SYS and AUTOEXEC.BAT remain present in the boot drive’s root directory due to their DOS heritage but are typically left empty.
Unlike its predecessors, Windows Me does not process CONFIG.SYS during startup; instead, it loads environment variables directly from the Windows Registry at:
- HKLM\System\CurrentControlSet\Control\SessionManager\Environment
Within the FlexOS operating system, CONFIG.SYS exists as a binary file that specifies resource managers and device drivers loaded at boot time.
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 targets for directives such as , , , and .
- Functions similarly to , but is applicable for inline comments following other CONFIG.SYS commands. (In MS-DOS/PC DOS, inline comments inside double quotes are not ignored.)
- Used to begin inline comments, complementing the ; directive.
- Prompts with a Yes/No question to confirm execution of subsequent CONFIG.SYS commands. (FreeDOS does not support custom messages but allows conditional execution via boot menus.) DOS 6.0 and later versions offer a comparable feature by appending to directives.
- Executes the following CONFIG.SYS command unconditionally.
ATemplate:NbndC
- Determines whether programs can be interrupted upon encountering errors.
- Defines which drives record file access date stamps within FAT file systems.
- Enables conditional execution on AT-compatible hardware.
- Configures boot manager settings.
- Adjusts verbosity level of error messages.
- Changes the default serial driver associated with the AUX device.
- Prevents character devices outside the virtual \DEV directory from loading.
- Loads a base device driver into system memory.
- Forces an audible beep even if notifications are disabled.
- Specifies the next operating system to load during boot.
- Enables or disables extended Ctrl+C checking functionality.
- Sets the number of disk buffers allocated by the system.
- Similar to BUFFERS but loads buffers into HMA or UMB areas.
- , ,
- Control cache block allocation and flushing intervals.
- Loads programs during CONFIG.SYS processing and waits until they return control.
- Sets keyboard Caps Lock state at startup.
- ,
- Configures CD-ROM driver name and buffer quantity.
- Continues processing CONFIG.SYS from another file or label.
- , , , etc.
- Various system parameters including clock settings, screen clearing behavior, OEM codepage selection, among others.
Communication Ports
- , ..., ;
- Define quantity, sequence, I/O port addresses, and timeout values for COM port devices.
Miscellaneous
- , ;, ;, ;, ;, ;, as well as CPU-specific directives (such as CPU88, CPU286+, CPU386+, etc.) manage DMA buffer settings, inline comment handling, internationalization support, cursor positioning, codepage switching, RAM refresh rates, and conditional execution based on CPU type.
This brief summary outlines essential CONFIG.SYS directives pertinent to system setup and device control across multiple DOS variants, highlighting critical customization features aimed at enhancing system efficiency and compatibility in business environments.
DTemplate:NbndF
- Controls relocation of drive descriptor tables in memory.
- Specifies segment address for multi-sector disk data deblocking operations.
- Activates internal debugger functionality.
- Boot manager configuration directive.
- Loads a device driver into conventional memory.
- Loads a device driver into upper memory blocks (equivalent to in DRDOS 5.0).
- Sets country and codepage information for keyboard (KBD), screen (SCR), and printer (LPT) devices.
- Configures cache memory size parameters.
- Defines floppy disk compatibility mode settings.
- Selects display font for output devices.
- Loads DOS into high memory area and/or upper memory blocks (similar to under DRDOS 5.0).
- Loads DOS tables such as BUFFERS, FCBS, FILES, LASTDRIVE, STACKS into upper memory areas.
- Specifies an alternate directory path for DOS files.
- Defines search paths for data files used by DOS utilities.
- Sets physical parameters for disk drives.
- Establishes parameters for drives not recognized by default configurations.
- Refer to directive for additional details.
- Enables PDUMP.nnn error logging and specifies target drive location.
- Displays a message on the screen during boot or processing.
- Displays messages including ANSI escape sequences for enhanced formatting.
- Specifies extra validation checks when launching programs.
- Defines expected error or return codes for program execution outcomes.
- Sets A20 gate state upon program startup to control memory addressing above 1MB.
- Terminates CONFIG.SYS processing early except for specific directives that must still execute.
- Configures hash table size used to accelerate file opening operations, differing from MS-DOS/PC DOS FASTOPEN driver behavior.
- Specifies maximum number of cached File Control Blocks (FCBs) that can be simultaneously open (shares buffer space with FILES under DR-DOS).
- Similar to FCBS but loads FCBs into upper memory instead of conventional memory.
- Boot manager related directive for advanced boot options.
- Determines maximum number of files that can be opened concurrently by the system.
- Similar to FILES but loads file handles into upper memory segments rather than conventional memory.
- Includes execution of designated CONFIG.SYS subsections based on conditions (see IGNORE directive).
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 designated label.
- Continues nested CONFIG.SYS processing at a specified label, then returns to the prior point.
- Refer to , , or for additional details.
- See also .
- Consult .
- Refer to or for related information.
- See or for further reference.
- Consult .
- Loads a TSR into memory following relocation of the DOS data segment. Compare with INSTCDEX.
- Refer to , , or for more information.
- See .
- Consult or as applicable.
- Activates console and command line history buffers with advanced pattern searching capabilities.
- Defines the address of the High Memory Area (HMA) segment.
- Configures energy-saving mode using HLT instruction.
- Enables scanning for boot sector viruses.
- Loads installable file system drivers.
- Prevents execution of specified subsections within CONFIG.SYS.
- Permits certain programs to operate at ring 2, allowing direct hardware I/O access.
- Incorporates directives from another menu block, emulated via GOSUB/RETURN in DR-DOS environments.
- Manages the status of keyboard Insert mode.
- Installs a terminate-and-stay-resident (TSR) program into memory.
- Loads TSR into upper memory, equivalent to HIINSTALL in DR DOS 5.0.
- Installs TSR post DOS data segment relocation, similar in function to INSTALL.
- Adjusts PIC interrupt priorities by rotating them to raise the priority of a specified IRQ.
KTemplate:NbndM
- Defines the keyboard layout configuration.
- Specifies the address of the keyboard buffer after relocation.
- Sets the maximum number of accessible drive letters.
- Similar to LASTDRIVE but loads Current Directory Structure (CDS) into upper memory space.
- Lists directories searched for DLL files.
- Handles compatibility settings for legacy applications.
- Determines the number of allowed file locks.
- Configures display of boot logos using PTS-DOS boot manager.
- Sets parameters including count, logical order, I/O address, and timeout for LPT1 device.
- Applies similar configuration settings for LPT2 device.
- Applies similar configuration settings for LPT3 device.
- Enables and configures LPT4 device functionality.
- Defines wait time before elevating process priority level.
- Controls strategy for memory allocation management.
- Specifies default method for DOS memory allocation.
- Defines menu options available in system menus.
- Sets color schemes for menus, with emulation possible in DR-DOS.
- Specifies default menu block, emulatable in DR-DOS environments.
- Defines multiple menu blocks, supporting DR-DOS emulation.
- Enables multi-track disk operations support.
- Continues CONFIG.SYS processing from a new file, optionally after loading a driver and setting the %NEWFILE% environment variable.
NTemplate:NbndQ
- Sets default character used for No () responses in Yes/No/Resume prompts.
- Configures keyboard Num Lock state as enabled or disabled at startup.
- Executes commands conditionally based on last error code status, e.g., .
- Displays text and waits for user key press, similar to commands found in DR-DOS systems.
- Requires user confirmation upon encountering errors during CONFIG.SYS processing.
- Configures buffer sizes for LPT devices.
- Conditional command execution on PC-compatible systems only.
- Adjusts scheduler priority settings for processes.
- Sets priority levels specifically for disk I/O operations programs.
- ; Switches default printer device driver among LPT1 through LPT4 ports.
- ; Specifies whether DOS programs are permitted to run within the environment.
- ; Loads a user interface shell program during startup.
- ; Conditional execution targeting IBM PS/1-compatible hardware platforms.
- ; Conditional execution targeting IBM PS/2-compatible hardware platforms.
- ; Suppresses output sent to STDOUT.
RTemplate:NbndT
- Activates automatic system reboot upon encountering errors.
- Permits inclusion of comments within CONFIG.SYS files.
- Reserves drive letters for local block device drivers.
- Sets the default Resume () character used in command prompts.
- Returns control from nested CONFIG.SYS processing back to the previous GOSUB or SWITCH statement, optionally with a return code.
- Defines the size of real mode memory available.
- Enables simultaneous loading of multiple programs in CONFIG.SYS running in the background.
- Saves the initial character of deleted files within the FAT reserved area.
- Determines video mode or screen access methods based on the operating system.
- Toggles the keyboard Scroll Lock indicator on or off.
- Establishes environment variables for the session.
- Loads the command interpreter shell for user interaction.
- Similar to SHELL but includes a SIZE parameter to load COMMAND.COM into High Memory Area (HMA) or Upper Memory Blocks (UMBs), optimizing memory usage with third-party shells.
- Specifies keyboard modifier states such as Shift Lock, Num Lock, Scroll Lock, and Insert mode.
- Manages file closure behavior when pressing Ctrl+Alt+Del.
- Skips Power-On Self-Test (POST) during system reboot sequences.
- , STACKSIZE, STACKSHIGH
- Parameters controlling stack size and configuration across various DOS versions for hardware interrupt handling and memory allocation.
- , SYSBOOT, SYSGEN, SYSLOAD
- PTS-DOS specific parameters governing boot procedures and system load addresses.
- Introduces submenu blocks in DOS 6 and later versions (not supported by DR-DOS or FreeDOS).
- , SWAPPATH, THREADS, TIMESLICE
- OS/2-specific settings managing error logging paths, swap file locations, thread management, and scheduler time slice durations.
- , SWITCHES, SWITCHAR
- Directives enabling conditional processing within CONFIG.SYS and defining system option flags across different DOS variants.
- , TRAPDUMP
- OS/2 related configurations for error logging and system fixes.
- , TRACE
- Settings for debugging that configure timeouts and enable single-step execution in DR-DOS, PTS-DOS, FreeDOS, and OS/2 environments.
UTemplate:NbndZ
- Configures a specific memory segment to serve as an Upper Memory Block (UMB).
- Defines the UMB server responsible for managing upper memory allocation.
- Specifies address ranges designated as UMB RAM areas.
- Enables or disables verification of disk writes to ensure data integrity.
- Sets the reported DOS version number presented to applications.
- Controls VGA display status parameters.
- Specifies the active video mode, functioning similarly to FreeDOS's SCREEN command.
- Enables utilization of virtual Direct Memory Access (DMA).
- Manages processor Virtual Mode Extensions (VME) settings.
- Configures Virtual Device Drivers (VxD) used by Windows operating systems.
- Sets options related to Windows system support features.
- Controls relocation of the Extended BIOS Data Area (EBDA).
- Executes conditionally on systems compatible with XT architecture.
- Configures built-in Year 2000 compliance support mechanisms.
- Defines the default affirmative response character used in prompts.
- Tracks deletion events related to device drivers.
Issues
Although it is possible for a system to boot without CONFIG.SYS or AUTOEXEC.BAT files present, these components are critical for comprehensive DOS customization and ensuring compatibility with various software. Any corruption or damage to these files necessitates diagnostic efforts.
In cases where CONFIG.SYS lacks a SHELL directive or is missing/corrupted, DOS attempts to locate COMMAND.COM in the root directory of the boot drive. Early DOS releases prior to version 6.0 will fail to boot if COMMAND.COM is absent. Conversely, MS-DOS 6.0, PC DOS 6.1, and later versions prompt users to specify an alternative command processor path, allowing rudimentary shell substitution during runtime.
Due to incompatibilities between MS-DOS versions 7.0 and above COMMAND.COM and DR-DOS implementations, DR-DOS 7.02 and subsequent releases restrict bypassing SHELL directives during skip, trace, or step modes. This requires valid shell filenames before loading COMMAND.COM.
The maximum size allowed for CONFIG.SYS varies among DOS variants: MS-DOS and PC DOS impose limits of several kilobytes (with recent versions permitting up to 64 KB), whereas DR-DOS does not enforce a size restriction beyond underlying file system limitations. This difference arises from processing methods—MS-DOS compiles CONFIG.SYS into a tokenized format prior to execution, enforcing strict driver load order. In contrast, DR-DOS interprets each directive sequentially at runtime, providing greater flexibility in driver loading sequences and enabling conditional execution based on hardware detection or error conditions.
DR-DOS's line-by-line interpretation supports advanced capabilities such as incorporating non-resident software through the INSTALL directive, thereby enhancing customization options and debugging functionality.
Limits on SHELL line lengths also differ: MS-DOS/PC DOS versions 2.0 through 4.01 allow up to 31 characters, later releases extend this limit to 128 characters, while DR-DOS permits up to 255 characters. It is important to note that CONFIG.SYS directives do not support long filenames.
Dual Booting DOS and Windows 9x
During the installation of Windows 95 over a pre-existing DOS/Windows environment, the system renames CONFIG.SYS and AUTOEXEC.BAT to CONFIG.DOS and AUTOEXEC.DOS to enable dual-boot functionality. When the system boots into DOS mode, these files are temporarily reverted back to CONFIG.SYS and AUTOEXEC.BAT. Meanwhile, the Windows 95 versions are preserved under the names CONFIG.W40 and AUTOEXEC.W40.
In setups where Caldera DR-DOS 7.02/7.03 coexists with Windows 95, the Windows CONFIG.SYS and AUTOEXEC.BAT files retain their original names, whereas DR-DOS utilizes DCONFIG.SYS and AUTODOS7.BAT as its startup configuration files.
OS/2 / Windows NT
OS/2 extensively uses CONFIG.SYS to load drivers and set environment parameters prior to launching its graphical user interface.
Within the OS/2 subsystem of Windows NT, the contents traditionally found in CONFIG.SYS for OS/2 applications are instead stored within the system registry rather than as a separate file.
OS/2 includes several undocumented CONFIG.SYS commands, highlighting its intricate configuration requirements.
CONFIG.SYS continues to be employed by 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 (archived)
- PTS-DOS 2000 Pro User Guide featuring CONFIG.SYS directives (archived)
- Unofficial German PTS-DOS FAQ including CONFIG.SYS commands (archived)