LOGO (CONFIG.SYS directive)
| Company type | Configuration file |
|---|---|
| Industry | Operating systems |
| Founded | 1983 |
| Headquarters | N/A |
| Products | Configuration for DOS and OS/2 startup |
CONFIG.SYS serves as the main configuration file for DOS and OS/2 operating systems. This plain text ASCII file holds setup commands that the operating system's DOS BIOS interprets during the startup process. 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 initiates the command shell specified by the SHELL directive; if none is provided, it defaults to COMMAND.COM, which then executes AUTOEXEC.BAT.
Typically, the file contains name=value pairs that set adjustable parameters or load device drivers and TSRs (terminate-and-stay-resident programs). CONFIG.SYS is located in the root directory of the bootable drive.
Certain DOS variants check for alternative filenames that take precedence over CONFIG.SYS. For instance, advanced iterations of Concurrent DOS 386, Concurrent DOS XM, Multiuser DOS, and REAL/32 utilize CCONFIG.SYS or CCONFIG.INI (in Multiuser DOS) and MCONFIG.SYS (in REAL/32). These platforms support extended configuration options stored in binary files such as CCONFIG.BIN, which are generally edited using CONFIG.EXE.
In versions of DR DOS starting from 3.31, including PalmDOS 1.0, Novell DOS 7, and DR-DOS 7.02+, the DCONFIG.SYS file supersedes CONFIG.SYS. This allows support for disk compression drivers and facilitates multi-boot setups. Similarly, OpenDOS 7.01 and DR-OpenDOS 7.02 recognize ODCONFIG.SYS, while some DR-DOS editions also look for DRCONFIG.SYS. The command SYS /DR:ext enables customization of default file extensions, permitting concurrent sets of system files to coexist and enabling multi-boot configurations managed by boot loaders like LOADER.
DR-DOS extends the functionality of the SHELL command by allowing specification of alternative AUTOEXEC.BAT files with non-.BAT extensions—a capability also supported by 4DOS. The CHAIN=filespec directive allows continuation of configuration processing in separate files, with optional label parameters available in DR-DOS 7.02 and later.
FreeDOS uses FDCONFIG.SYS, while RxDOS version 7.24 and above employs RXCONFIG.SYS, and PTS-DOS utilizes CONFIG.PTS.
In Windows 95 and Windows 98, both CONFIG.SYS and AUTOEXEC.BAT exist but are generally left empty due to their DOS heritage. However, Windows Me no longer processes CONFIG.SYS during startup; instead, it retrieves environment variables from the Windows Registry at:
- HKLM\System\CurrentControlSet\Control\SessionManager\Environment
For FlexOS, CONFIG.SYS is a binary configuration file that specifies resource managers and device drivers loaded during system initialization.
Example
Below is a sample CONFIG.SYS file for MS-DOS version 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>
:;*?!
- Defines labels within CONFIG.SYS that serve as jump destinations for directives such as , , , and .
- Functions similarly to , but can be placed inline following other CONFIG.SYS commands to add comments. Note that under MS-DOS/PC DOS, inline comments enclosed in double quotes are not ignored.
- Used at the start of inline comments alongside ;.
- Prompts a Yes/No confirmation with an optional message before executing subsequent CONFIG.SYS commands. FreeDOS supports conditional execution with boot menus but lacks optional messages. DOS versions 6.0 and later provide a comparable feature by appending after a directive, e.g., or .
- Forces unconditional execution of the next CONFIG.SYS directive.
ATemplate:NbndC
- Determines whether programs can be terminated upon encountering errors.
- Sets which drives record file access timestamps in FAT file systems.
- Enables conditional execution on AT-compatible hardware.
- Manages boot options.
- Adjusts the detail level of error message output.
- Alters the default serial port driver (COM1 through COM4) assigned to the AUX device.
- Restricts character device availability to the \DEV directory only.
- Loads the fundamental device driver into system memory.
- Produces a brief beep even if sound alerts are disabled.
- Defines the next operating system to boot.
- Enables or disables extended Ctrl+C interrupt checking.
- Sets the quantity of disk buffers allocated.
- Similar to BUFFERS but loads buffers into HMA or UMB areas.
- , CACHETTL, CACHEFLUSH (Embedded DOS 6-XL only)
- Adjust cache block allocation timing and flushing intervals.
- Executes programs listed in CONFIG.SYS, pausing until completion.
- (DR-DOS 7.02+)
- Controls Caps Lock keyboard status.
- , CDDBUFFERS (PTS-DOS only)
- Specifies CD-ROM driver designation and buffer quantity.
- (DR DOS 5.0+, Embedded DOS)
- Continues processing CONFIG.SYS from a new file or label point.
- , CLS (PTS-DOS, DR DOS 6.0+)
- Defines clock type and clears screen commands.
- , COUNTRY (OS/2, DOS)
- Sets OEM codepages and internationalization support parameters.
- , COM2, COM3, COM4 (DR-DOS 7.02+)
- Configures serial port count, sequence, I/O addresses, and timeout durations.
- , COMMENTS (DOS 4.0+)
- Redefines inline comment characters or ignores the subsequent line.
Additional CPU-specific directives such as CPU88, CPU86, CPU286, CPU386, etc., conditionally execute based on processor model or speed, primarily utilized in PTS-DOS and DR-DOS systems.
This set of directives emphasizes important configuration options that influence system performance tuning and hardware compatibility within DOS-based platforms, thereby affecting software deployment strategies and operational effectiveness in corporate IT infrastructures.
DTemplate:NbndF
- Adjusts relocation settings for drive descriptor tables.
- Defines memory segment address used for multi-sector disk data deblocking operations.
- Activates internal debugger functionality.
- Boot management utility.
- Loads device drivers directly into memory.
- Loads device drivers into upper memory blocks (equivalent to in DRDOS 5.0).
- Configures country and codepage settings for keyboard, screen, and printer devices.
- Sets cache memory capacity parameters.
- Specifies compatibility mode for floppy disk drives.
- Determines display font selection.
- Controls whether DOS is loaded into high memory or uses upper memory areas (similar to in DRDOS 5.0).
- Loads DOS tables such as BUFFERS, FCBS, FILES, LASTDRIVE, STACKS into upper memory space.
- Defines an alternative search path for DOS system files.
- Specifies search directories for data files.
- Sets physical disk drive characteristics.
- Defines parameters for unknown or unsupported drives.
- See .
- Enables PDUMP.nnn error logging and specifies target drive location.
- Outputs a message on screen display.
- Displays messages including ANSI escape sequences for formatting.
- Adds extra validation checks when launching programs.
- Assigns an assumed error or return code for subsequent commands.
- Sets the A20 address line gate state during program startup.
- Terminates CONFIG.SYS processing prior to reaching end of file (excluding SWITCHES and SHELL directives).
- Configures hash table size used for accelerating file open operations (differs from MS-DOS/PC DOS FASTOPEN driver).
- Determines number of cached File Control Blocks open at once (shares buffer space with FILES under DR-DOS).
- Similar to FCBS but explicitly loads into upper memory area.
- Boot management tool.
- Specifies maximum number of files that can be opened simultaneously.
- Equivalent to FILES but loads file handles explicitly into upper memory blocks.
- Enables execution of specified CONFIG.SYS subsections (refer to IGNORE directive).
GTemplate:NbndI
- Waits for a key press or timeout, then assigns the error level to the ASCII value or 1024 if timed out.
- Resumes CONFIG.SYS processing at a designated label.
- Continues nested CONFIG.SYS processing at a specified label, returning afterward to the previous point.
- Refer to , , or for additional information.
- Consult for further details.
- See for more context.
- Refer to or as applicable.
- Consult or for related commands.
- See for relevant information.
- Loads a TSR program following relocation of the DOS data segment. Compare with INSTCDEX.
- Refer to , , or for supplementary commands.
- See for additional guidance.
- Refer to or as necessary.
- Activates the console and command line history buffer, enabling extended pattern search functionality.
- Defines the address of the High Memory Area (HMA) segment.
- Sets up HLT instruction energy-saving configuration.
- Determines whether the system should check the boot sector for viruses.
- Loads installable file system drivers.
- Prevents execution of certain CONFIG.SYS subsections. See for explanation.
- Permits specified applications to operate at CPU ring 2, allowing direct hardware I/O access.
- Incorporates directives from another menu block (implemented via GOSUB/RETURN emulation in DR-DOS).
- Sets the status of the keyboard Insert mode.
- Installs a TSR program into conventional memory.
- Installs a TSR into upper memory, equivalent to HIINSTALL in DR DOS 5.0.
- Installs TSR after relocating the DOS data segment. Compare with INSTCDEX.
- Adjusts PIC interrupt priorities by assigning highest priority to a specified IRQ number.
KTemplate:NbndM
- Defines the keyboard layout configuration.
- Specifies the location of the relocated keyboard buffer in memory.
- Sets the maximum number of accessible drive letters.
- Functions like LASTDRIVE but loads Current Directory Structure (CDS) into upper memory instead.
- Lists paths where DLL files are searched for.
- Handles compatibility settings for legacy software applications.
- Specifies the number of allowable file locks.
- Configures boot logo display and startup messages when using PTS-DOS boot manager.
- Defines count, order, I/O port address, and timeout parameters for LPT1 printer device.
- Applies identical settings as LPT1 to LPT2 device.
- Mirrors LPT1 configuration for LPT3 device.
- Enables and configures LPT4 device similarly to other LPT ports.
- Sets delay before increasing process priority during boot or runtime.
- Configures method for memory allocation management.
- Determines default DOS memory allocation strategy.
- Defines options available in system menus.
- Sets color schemes for menus, emulatable under DR-DOS environments.
- Identifies default menu block, with DR-DOS emulation support.
- Defines individual menu blocks, emulated in DR-DOS systems.
- Enables operations involving multitrack disk devices.
- Continues CONFIG.SYS processing from a new file, optionally after loading a device driver and setting the %NEWFILE% environment variable.
NTemplate:NbndQ
- Sets the default "No" character used in Yes/No/Resume prompts (e.g., ).
- Specifies whether keyboard [[Num Lock|Template:Keypress]] is enabled or disabled at startup.
- Executes commands conditionally based on the last error code (e.g., ).
- Displays text and waits for key input, similar to and commands in DR-DOS systems.
- Requires user confirmation upon encountering errors during CONFIG.SYS processing.
- Configures buffer size parameters for LPT parallel ports.
- Executes commands conditionally on PC-compatible hardware platforms only.
- Adjusts scheduler priority settings within the operating system environment.
- Sets priority levels specifically for disk I/O-related programs and processes.
- Changes the default printer device driver assignment among LPT1 through LPT4 ports.
- Determines whether DOS applications are permitted to run under current configuration settings.
- Loads a user interface shell program during system startup or runtime initialization.
- Executes commands conditionally on IBM PS/1-compatible machines only.
- Executes commands conditionally on IBM PS/2-compatible machines only.
- Suppresses output directed to STDOUT (standard output stream).
RTemplate:NbndT
- Activates automatic system reboot upon encountering errors.
- Permits inclusion of comments within CONFIG.SYS.
- Allocates drive letters reserved by local block device drivers.
- Establishes the default Resume () character used in Yes/No/Resume prompts.
- Returns control from nested CONFIG.SYS processing to the prior GOSUB or SWITCH point, optionally passing a return code.
- Specifies the size of real mode memory.
- Executes programs listed in CONFIG.SYS simultaneously in the background.
- Saves the initial character of deleted files within the FAT reserved area.
- Defines video mode under FreeDOS or screen access methods under PTS-DOS.
- Sets the status of the keyboard Scroll Lock key.
- Declares environment variables.
- Loads the command interpreter shell.
- Similar to SHELL but includes support for pre-allocating space to relocate COMMAND.COM into HMA or UMBs, minimizing fragmentation.
- Configures keyboard modifier states such as Shift Lock, Num Lock, Scroll Lock, and Insert mode.
- Determines whether files close upon pressing Ctrl+Alt+Del.
- Skips Power-On Self-Test (POST) during reboot sequences.
- , STACKSIZE, STACKSHIGH
- Manage hardware interrupt stack sizes and buffer placements across various DOS versions, with some options ignored depending on compatibility requirements.
- , SYSBOOT, SYSGEN, SYSLOAD, SYSTOUMB
- PTS-DOS-specific parameters handling boot processes, system loading locations, and memory management including upper memory blocks (UMBs).
- , SWITCH, SWITCHES
- Directives for conditional processing of nested configurations or special options across DOS variants, with noted restrictions per system type.
- , SWAPPATH
- OS/2 configuration for specifying error log drive and swap file directory paths.
- , THREADS, TIMESLICE
- OS/2 parameters for addressing FPU bugs, setting concurrency thread counts, and defining scheduler time slices.
- , TRACE, TRACEBUF
- Control execution timeouts during CONFIG.SYS processing and enable tracing or logging features with differences between DOS and OS/2 implementations.
- , TRAPDUMP
- PTS-DOS option designating temporary file extensions and managing error dump logs in OS/2.
UTemplate:NbndZ
- Assigns a specific segment to function as an Upper Memory Block (UMB) within DOS.
- Configures the UMB server settings.
- Defines address ranges allocated for UMB RAM usage.
- Enables or disables verification of disk writes.
- Sets the DOS version reported to applications.
- Controls VGA display state configuration.
- Specifies the current video mode similarly to FreeDOS's SCREEN command functionality.
- Enables virtual DMA (Direct Memory Access) operations.
- Manages processor Virtual Mode Extensions (VME) settings.
- Configures Windows VxD drivers parameters.
- Controls system support features for Windows environments.
- Handles relocation of the Extended BIOS Data Area (XBDA).
- Allows conditional execution on XT-compatible hardware platforms.
- Configures built-in Year 2000 compliance support mechanisms.
- Sets the default affirmative response character in prompt dialogs.
- Manages file deletion tracking behavior.
Issues
While the system can initiate booting without CONFIG.SYS or AUTOEXEC.BAT present, these files are critical for complete operating system customization and meeting software demands. Their corruption or absence necessitates diagnostic intervention.
If the SHELL directive is missing from CONFIG.SYS or if CONFIG.SYS itself is absent or corrupted, DOS attempts to locate COMMAND.COM in the root directory of the boot drive. Versions before DOS 6.0 will fail to boot if COMMAND.COM is not found. However, MS-DOS 6.0, PC DOS 6.1, and Novell DOS 7 and later will prompt users for a command processor path. This prompt also appears if COMMAND.COM terminates unexpectedly or aborts during execution, enabling limited shell substitution at runtime without requiring a reboot.
Due to incompatibility issues between MS-DOS versions 7.0 and above COMMAND.COM and DR-DOS systems, DR-DOS versions 7.02 and later enforce SHELL directives during boot skip or trace modes to avoid conflicts in dual-boot environments. When skipping CONFIG.SYS processing without a valid SHELL directive present, users are prompted to enter a valid shell filename.
The maximum size allowed for CONFIG.SYS varies by operating system: MS-DOS and PC DOS limit it to several kilobytes—up to 64 KB in recent releases—whereas DR-DOS imposes no practical size restriction by interpreting each directive sequentially instead of compiling them all at once. This approach grants precise control over driver and TSR load order as well as conditional execution based on hardware detection, user input, error states, or software return codes. Such flexibility proves valuable when resolving conflicts or integrating debugging tools.
For MS-DOS/PC DOS versions from 2.0 through 4.01, SHELL command lines are limited to a maximum length of 31 characters. Later versions increase this limit up to 128 characters, while DR-DOS accepts lines up to 255 characters long. It is important to note that CONFIG.SYS directives do not support long filenames.
Dual Booting DOS and Windows 9x
When Windows 95 is installed over a preexisting DOS or Windows system, the files CONFIG.SYS and AUTOEXEC.BAT are renamed to CONFIG.DOS and AUTOEXEC.DOS to enable dual-boot functionality between Windows 9x and DOS. During a DOS boot, these renamed files are temporarily reverted to CONFIG.SYS and AUTOEXEC.BAT. Additionally, Windows 95 versions of these files are saved under the names CONFIG.W40 and AUTOEXEC.W40.
In setups where Caldera DR-DOS 7.02 or 7.03 coexists with Windows 95, the original CONFIG.SYS and AUTOEXEC.BAT files used by Windows remain intact. Instead, DR-DOS operates using alternative startup scripts named DCONFIG.SYS and AUTODOS7.BAT.
OS/2 and Windows NT
OS/2 relies heavily on CONFIG.SYS for loading drivers and setting environment parameters prior to launching its graphical user interface.
Within the OS/2 subsystem integrated into Windows NT, the CONFIG.SYS configuration accessed by OS/2 applications is maintained within the system registry rather than as a physical file.
There exists a range of undocumented CONFIG.SYS commands specific to OS/2.
CONFIG.SYS continues to be utilized 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
- Information on AUTOEXEC.BAT and CONFIG.SYS 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
- FreeDOS CONFIG.SYS directive descriptions
- PTS-DOS 2000 Pro User Manual including details on CONFIG.SYS directives
- Unofficial German PTS-DOS FAQ (2004) featuring additional CONFIG.SYS commands