CPU486+ (CONFIG.SYS directive)
| Company type | Configuration file |
|---|---|
| Industry | Operating systems |
| Founded | 1983 |
| Products | Configuration for DOS and OS/2 |
CONFIG.SYS serves as the central configuration file for DOS and OS/2 operating systems. This plain text file, written in ASCII, holds setup commands that the operating system's DOS BIOS—commonly found in IBMBIO.COM or IO.SYS—interprets during the boot process. CONFIG.SYS was first introduced with DOS version 2.0.
Usage
The directives within CONFIG.SYS tailor DOS settings for hardware devices, software applications, and memory management. Once these instructions are executed, DOS launches the command interpreter defined by the SHELL directive; if none is specified, it defaults to COMMAND.COM, which subsequently runs the AUTOEXEC.BAT script.
CONFIG.SYS predominantly contains name=value statements that configure system parameters or load files such as device drivers and terminate-and-stay-resident programs (TSRs). This file is located in the boot drive’s root directory.
The same filename is utilized by (DCP), a variant of MS-DOS developed by East-German company VEB Robotron.
Certain DOS derivatives check for alternative configuration filenames that override CONFIG.SYS:
Advanced editions of Concurrent DOS 386, Concurrent DOS XM, Multiuser DOS, System Manager, and REAL/32 search for CCONFIG.SYS instead of CONFIG.SYS. Multiuser DOS may also use CCONFIG.INI. These platforms support enhanced configuration options stored in a binary file called CCONFIG.BIN, usually edited via CONFIG.EXE.
In DR DOS 3.31 and subsequent releases, including PalmDOS and Novell DOS, DCONFIG.SYS takes priority over CONFIG.SYS. Originally linked to disk compression utilities, this file also enables multiple configuration profiles for multi-boot environments. OpenDOS versions 7.01 and DR-OpenDOS 7.02 look for ODCONFIG.SYS, while some DR-DOS 7.02+ editions recognize DRCONFIG.SYS.
Starting with DR DOS 6.0, the SYS /DR:ext command allows renaming of system and configuration files to accommodate several parallel configurations within a single root directory, selectable through boot managers like LOADER included in Multiuser DOS and DR-DOS 7.x releases. The SHELL directive supports specifying alternative AUTOEXEC.BAT scripts using /P[:filename.ext], a feature accepted by COMMAND.COM and enhanced command processors such as 4DOS. The CHAIN=filespec instruction permits loading additional configuration files from locations outside the root directory, with optional labels supported in DR-DOS versions 7.02 and later.
From DR-DOS 7.03 onward, the SYS /A option enables copying both CONFIG.SYS and AUTOEXEC.BAT alongside system files.
FreeDOS utilizes FDCONFIG.SYS, whereas RxDOS version 7.24 and above uses RXCONFIG.SYS. The operating system PTS-DOS employs a configuration file named CONFIG.PTS.
Both CONFIG.SYS and AUTOEXEC.BAT reside in the root directory of boot drives used by Windows 95 and Windows 98, but these files are generally left empty. In contrast, 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 context of FlexOS, CONFIG.SYS is a binary-format file that specifies resource managers and device drivers loaded at 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>
:;*?!
- Marks labels within CONFIG.SYS to serve as jump destinations for , , , and commands.
- Functions similarly to , but can also be utilized for inline comments following other directives. (Note that in MS-DOS/PC DOS, inline comments enclosed in double quotes are not ignored.)
- Used to initiate inline comments alongside the ; directive.
- Prompts a Yes/No confirmation before executing subsequent directives.[1] (FreeDOS supports conditional execution with boot menus via and , although it lacks optional messages.) Starting with DOS 6.0, a comparable feature is implemented by appending after the directive, e.g., .
- Forces immediate execution of the next CONFIG.SYS command without conditions.
ATemplate:NbndC
- Determines whether programs can be interrupted upon encountering errors.
- Defines which drives record file access timestamps in FAT file systems.
- Enables conditional execution on AT-compatible hardware.
- Boot management utility.
- Adjusts the verbosity level of error messages.
- Alters the default serial driver assigned to the AUX device.
- Prevents character devices from being recognized outside the phantom \DEV directory.
- Loads fundamental device drivers into memory.
- Produces a beep sound even if notification sounds are disabled.
- Specifies the operating system to boot subsequently.
- Enables or disables extended Ctrl+C interrupt checking.
- Sets the quantity of disk buffers to allocate.
- Similar to BUFFERS but loads buffers into HMA or UMB areas.
- , , (Embedded DOS 6-XL only)
- Manage cache block allocation and flushing parameters.
- Executes programs within CONFIG.SYS, pausing processing until they return control.
- (DR-DOS 7.02+)
- Defines keyboard Caps Lock status at startup.
- , (PTS-DOS only)
- Configures CD-ROM driver name and buffer quantity.
- (DR DOS 5.0+, Embedded DOS)
- Continues processing CONFIG.SYS from another file or label.
- , , and additional directives customize system operations specific to various DOS versions and derivatives.
COM Ports
Commands such as ;COM1 through ;COM4 (introduced in DR-DOS 7.02+) specify count, sequence, I/O addresses, and timeout settings for serial port devices.
COMMENT
The COMMENT directive (available since DOS 4.0) redefines characters used for inline comments or causes lines to be ignored entirely, though some DOS variants do not recognize it.
COUNTRY
Activates internationalization features and sets codepage configurations, varying across different DOS editions.
Processor-specific commands (e.g., CPU88, CPU386) execute instructions conditionally based on CPU type or capabilities (found in PTS-DOS, DR-DOS).
DTemplate:NbndF
- Adjusts relocation of drive descriptor tables in memory.
- Sets memory segment limits for multi-sector disk data unblocking.
- Enables support for an internal debugger.
- Boot management functionality.
- Loads device drivers into conventional memory.
- Loads device drivers into upper memory areas (equivalent to in DRDOS 5.0).
- Configures country settings and codepages for keyboard, screen, and printer devices.
- Sets cache memory sizes for improved performance.
- Defines compatibility mode for floppy disk drives.
- Specifies display font selection.
- Controls loading of DOS into high memory and/or upper memory blocks.
- Loads DOS tables such as BUFFERS, FCBS, FILES, LASTDRIVE, STACKS into upper memory regions.
- Defines an alternative search path for DOS system files.
- Sets search paths for data files used by DOS utilities.
- Describes physical parameters of disk drives for proper operation.
- Provides parameters for unrecognized or generic drives.
- See .
- Enables designation of drive locations for PDUMP.nnn error log files.
- Controls display of messages on screen during boot or operation.
- Allows display of messages including ANSI escape codes for enhanced formatting.
- Activates additional validation checks when launching programs.
- Specifies error or return codes to assume following execution steps.
- Sets A20 gate status when starting applications to enable addressing beyond 1MB.
- Terminates CONFIG.SYS processing early except under certain conditions affecting SWITCHES and SHELL directives.
- Defines size of hash tables used to accelerate file open operations, differing from MS-DOS/PC DOS FASTOPEN driver behavior.
- Specifies maximum number of cached File Control Blocks (FCBs) that can be open simultaneously (shares buffer space with FILES under DR-DOS).
- Similar to FCBS but explicitly loads these into upper memory areas.
- Boot management utility functionality.
- Defines maximum number of files that can be opened concurrently by the system.
- Equivalent to FILES but loads file handles into upper memory explicitly.
- Includes execution of specified CONFIG.SYS subsections as defined by IGNORE directive.
GTemplate:NbndI
- Waits for a key press or timeout, setting the error level to the key's ASCII code or 1024 if timed out.
- Resumes processing of CONFIG.SYS at the indicated label.
- Continues nested CONFIG.SYS execution at a specified label, then returns to the original point.
- Refer to , , or for more details.
- See also .
- Consult .
- Refer to or for additional information.
- See or for further reference.
- Consult .
- Loads a TSR program into memory after relocating the DOS data segment. Compare with INSTCDEX.
- Refer to , , or as needed.
- See .
- Consult or for related commands.
- Activates console and command line history buffers along with extended pattern searching.
- Defines the address of the HMA segment.
- Sets the HLT instruction's power-saving mode.
- Enables system checks for boot sector viruses.
- Loads installable file system drivers.
- Prevents execution of certain CONFIG.SYS subsections.
- Permits specific programs to execute at ring 2, allowing direct hardware I/O access.
- Incorporates directives from another menu block (simulated by GOSUB/RETURN in DR-DOS).
- Sets the keyboard's Insert mode on or off.
- Loads a TSR program into memory.
- Installs a TSR program into upper memory, similar to HIINSTALL in DR DOS 5.0.
- Places a TSR program into memory following DOS data segment relocation. Compare with INSTCDEX.
- Adjusts PIC interrupt priorities so that a specified IRQ number has the highest priority.
KTemplate:NbndM
- Defines the keyboard layout configuration.
- Specifies the location of the relocated keyboard buffer.
- Sets the maximum number of accessible drives.
- Functions like LASTDRIVE but loads Current Directory Structure (CDS) into upper memory.
- Lists directories searched for DLL files.
- Handles compatibility settings for legacy applications.
- Determines the quantity of file locks allowed.
- Controls boot logo display alongside PTS-DOS boot manager functionality.
- , , ,
- Configure count, logical sequence, I/O address, and timeout parameters for LPT devices respectively.
- Defines wait time before elevating process priority during waits.
- Sets strategy for memory allocation management.
- Specifies default DOS memory allocation parameters.
- Defines menu option entries.
- Sets color schemes for menus (can be emulated in DR-DOS).
- Indicates default menu block (emulatable under DR-DOS).
- Defines an individual menu block (emulatable under DR-DOS).
- Enables multitrack operations on disks.
- Continues CONFIG.SYS processing from a new file after loading a device driver and setting the %NEWFILE% environment variable.
NTemplate:NbndQ
- Sets the default No () character used in Yes/No/Resume prompts.
- Determines whether keyboard [[Num Lock|Template:Keypress]] is enabled or disabled at startup.
- Executes conditionally based on the previous error code, such as .
- Shows a message and waits for user key press, similar to commands found in DR-DOS.
- Requires user confirmation upon encountering errors in CONFIG.SYS processing.
- Configures buffer sizes for LPT ports.
- Executes conditionally on PC-compatible systems only.
- Sets priority levels within the scheduler system.
- Assigns priority specifically for disk I/O related programs.
- Changes default printer device driver assignment among LPT1 through LPT4 ports.
- Specifies whether DOS applications are permitted to run.
- Loads a user interface shell environment.
- Executes conditionally on IBM PS/1-compatible hardware only.
- Executes conditionally on IBM PS/2-compatible hardware only.
- Suppresses output to STDOUT display.
RTemplate:NbndT
- Activates automatic system reboot following errors.
- Permits inclusion of comments within CONFIG.SYS files.
- Allocates a drive letter for block device drivers.
- Defines the default character for Resume () prompts.
- Returns control from nested CONFIG.SYS processing to the prior GOSUB or SWITCH point, optionally passing a return code.
- Sets the size of real mode memory available.
- Loads programs asynchronously during CONFIG.SYS execution, functioning similarly to INSTALL or CALL commands.
- Saves the initial character of deleted files within the FAT reserved sector.
- Designates video mode in FreeDOS and screen access methods in PTS-DOS environments.
- Controls the Scroll Lock key status on the keyboard (enabled or disabled).
- Assigns environment variables.
- Loads the command interpreter shell.
- Functions like SHELL but includes a SIZE parameter to pre-allocate COMMAND.COM in HMA or UMBs, enhancing memory efficiency when using third-party shells.
- Sets keyboard modifier keys such as Shift Lock, Num Lock, Scroll Lock, and Insert mode states.
- Determines whether files are closed upon a Ctrl+Alt+Del system interrupt.
- Bypasses Power-On Self Test (POST) during reboot sequences.
- , STACKSIZE, STACKSHIGH
- Various stack size configurations implemented across DOS versions for handling hardware interrupts and thread stacks, with some options disregarded in newer releases or specific platforms.
- , SYSBOOT, SYSGEN, SYSLOAD, SYSTOUMB
- Commands unique to PTS-DOS for boot management and system memory setup, supporting alternative boot files, memory organization, and loading into upper memory blocks (UMBs).
- , SUPPRESSPOPUPS, SWAPPATH
- OS-specific directives managing menu block displays, error log drive assignments, and swap file locations primarily under OS/2 systems.
- , SWITCHES, SWITCHAR
- Controls conditional processing flow within CONFIG.SYS and defines default switch characters ('/' or '-') across multiple DOS variants including DR-DOS, Novell DOS, PTS-DOS, and FreeDOS.
- , THREADS, TIMESLICE
- OS/2 parameters addressing FPU bug workarounds, number of concurrent threads allowed, and scheduler time slice durations.
- , TRACE, TRACEBUF
- Manages timeout intervals for CONFIG.SYS operations and enables or disables single-step tracing with configurable log buffer sizes across DR-DOS, PTS-DOS, and OS/2 platforms.
- , TRAPDUMP
- In PTS-DOS, sets temporary file extensions; in OS/2, provides detailed error logging capabilities.
UTemplate:NbndZ
- Configures DOS to utilize a specified segment as Upper Memory Block (UMB) space.
- Selects the UMB server implementation to be used.
- Defines address ranges allocated as UMB RAM areas.
- Enables or disables verification of disk write operations.
- Specifies which DOS version is reported to applications.
- Manages VGA display configuration status.
- Sets the active video mode similarly to FreeDOS's SCREEN command.
- Determines whether virtual DMA support is permitted.
- Controls deactivation of processor Virtual Mode Extensions (VME).
- Configures Virtual Device Driver (VxD) settings for Windows environments.
- Adjusts system-level support parameters for Windows operation.
- Sets relocation options for the Extended BIOS Data Area (XBDA).
- Enables conditional execution specifically on XT-compatible hardware platforms.
- Activates built-in Year 2000 compliance support features.
- Defines the default affirmative response character in prompts.
- Configures tracking behavior for file deletions.
Issues
Although the system is capable of booting without CONFIG.SYS or AUTOEXEC.BAT files, these components remain crucial for tailoring the operating system and loading necessary software. When these files become damaged or corrupted, troubleshooting is required.
In cases where CONFIG.SYS is missing a SHELL directive or is absent or corrupted, DOS attempts to locate COMMAND.COM in the root directory of the boot drive. Older DOS versions (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 similar variants will prompt the user to specify a valid command processor path. This recovery prompt also appears if the primary shell terminates unexpectedly or exits intentionally, offering a limited shell replacement during runtime without needing to reboot.
Due to compatibility issues between MS-DOS 7.0+ COMMAND.COM and DR-DOS, versions of DR-DOS from 7.02 onwards enforce the presence of SHELL directives when operating in skip/trace/step modes, blocking bypass methods that were possible in earlier releases. Later enhancements reintroduced skip functionality for invalid shell arguments, requiring users to input correct shell filenames before COMMAND.COM loads.
The size of CONFIG.SYS is restricted to a few kilobytes (up to 64 KB) in MS-DOS and PC DOS environments but remains unrestricted under DR-DOS, limited only by the file system's capacity. MS-DOS processes CONFIG.SYS by converting it into a tokenized form and then executing directives in a predetermined sequence, prioritizing device drivers before TSRs. Conversely, DR-DOS reads CONFIG.SYS sequentially line-by-line, granting more precise control over the order of loading drivers and TSRs through DEVICE and INSTALL commands. This approach enables better resolution of loading conflicts and facilitates dynamic integration of temporary programs during startup.
MS-DOS/PC DOS versions from 2.0 through 4.01 restrict the SHELL line length to 31 characters; subsequent versions expand this limit up to 128 characters, while DR-DOS supports lengths 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/Windows configuration, the original CONFIG.SYS and AUTOEXEC.BAT files are renamed to CONFIG.DOS and AUTOEXEC.DOS respectively to enable dual-boot functionality. During a DOS boot session, these files are temporarily restored under their original names, while Windows 95 backups 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 retain their original filenames, whereas DR-DOS uses alternative startup configuration files named DCONFIG.SYS and AUTODOS7.BAT.
OS/2 / Windows NT
OS/2 depends extensively on CONFIG.SYS for configuring system settings, loading drivers, and establishing environment variables before launching its graphical user interface.
Within the OS/2 subsystem integrated into Windows NT, CONFIG.SYS configurations are represented as registry entries rather than conventional configuration files.
A variety of undocumented CONFIG.SYS directives exist for OS/2 systems and continue 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 available at Computer Hope
- Overview of CONFIG.SYS directives for Windows 98 / MS-DOS 7.10 (archived)
- Caldera's CONFIG.SYS Command Reference (archived) – summary of DR-DOS 7 directives
- Details on FreeDOS CONFIG.SYS commands
- PTS-DOS 2000 Pro User Guide featuring an overview of CONFIG.SYS directives
- German-language unofficial PTS-DOS FAQ (PTS/FAQD) including extra CONFIG.SYS directive information
- ↑ Cite error: Invalid
<ref>tag; no text was provided for refs namedPaul_2000_CONFIG