DOSDIR (CONFIG.SYS directive)
| Company type | Configuration file |
|---|---|
| Industry | Computer software |
| Founded | 1983 |
| Headquarters | N/A |
| Products | Configuration settings for DOS and OS/2 |
CONFIG.SYS serves as the chief configuration file for DOS and OS/2 operating systems. This plain text file, written in ASCII, holds setup commands accessible to users that the operating system's DOS BIOS (commonly found in IBMBIO.COM or IO.SYS) interprets during system startup. The CONFIG.SYS file first appeared with DOS version 2.0.
Usage
The directives within CONFIG.SYS are responsible for configuring DOS to support various devices and applications, including memory management utilities. Once CONFIG.SYS has been processed, DOS launches the command interpreter indicated by the SHELL directive; if none is specified, it defaults to COMMAND.COM, which subsequently executes the AUTOEXEC.BAT script.
This file primarily contains name=value instructions that define settings or load components such as device drivers and terminate-and-stay-resident programs (TSRs). CONFIG.SYS is located in the boot drive’s root directory.
Certain DOS versions recognize alternative filenames that override CONFIG.SYS. For instance, later releases of Concurrent DOS 386, Concurrent DOS XM, Multiuser DOS, and REAL/32 utilize CCONFIG.SYS or CCONFIG.INI, with supplementary configurations stored in a binary file named CCONFIG.BIN, typically managed through CONFIG.EXE.
In the case of DR DOS starting from version 3.31 and its successors such as PalmDOS, Novell DOS, and DR-DOS 7.x, the file DCONFIG.SYS takes priority over CONFIG.SYS. This naming convention facilitates disk compression scenarios where drive letters may shift after loading compression drivers. Versions like OpenDOS 7.01 also check for files named ODCONFIG.SYS or DRCONFIG.SYS.
Beginning with DR-DOS 6.0, the SYS /DR:ext command allows modification of system and configuration file extensions, enabling multiple sets of boot files to coexist within a single root directory. These can be selected using boot loaders such as LOADER included with Multiuser DOS and DR-DOS 7.x. The SHELL directive supports specifying alternative AUTOEXEC.BAT files via /P[:filename.ext], and COMMAND.COM can execute files with extensions other than ".BAT" in this mode.
From DR-DOS 6.0 onward, a CHAIN=filespec command exists to continue processing an additional configuration file, which may reside outside the root directory; DR-DOS 7.02 introduced an optional label parameter (CHAIN=filespec,label) for targeted jumps within these files. DR-DOS 7.03 added a SYS /A option that copies CONFIG.SYS and AUTOEXEC.BAT alongside system files during installation.
FreeDOS employs FDCONFIG.SYS, while RxDOS version 7.24 and later use RXCONFIG.SYS. The PTS-DOS operating system uses CONFIG.PTS as its configuration file.
In Windows 95 and 98, which are DOS-based systems, CONFIG.SYS and AUTOEXEC.BAT exist but are frequently left empty. Windows Me does not process CONFIG.SYS at boot time; instead, it loads environment variables directly from the Windows Registry.
Within the FlexOS environment, CONFIG.SYS is a binary-format file that specifies resource managers and device drivers loaded during system initialization.
Example
Sample CONFIG.SYS 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>
:;*?!
- Establishes labels within CONFIG.SYS to serve as jump points for , , , , and commands.
- Functions similarly to , permitting inline comments following directives. (In MS-DOS/PC DOS, inline comments behave differently when enclosed in quotes.)
- Used to initiate inline comments alongside the ; command.
- Prompts Yes/No confirmation before executing subsequent CONFIG.SYS commands. (FreeDOS adds optional conditional support with boot menus.) DOS 6.0 and later versions offer comparable functionality by appending to directives.
- Forces unconditional execution of the next CONFIG.SYS command.
ATemplate:NbndC
- Determines whether programs can be interrupted upon encountering errors.
- Sets drives to record file access timestamps within FAT file systems.
- Enables conditional execution on AT-compatible hardware.
- Boot management utility.
- Adjusts verbosity level of error messages.
- Alters the default serial device driver assigned to the AUX device.
- Restricts access to character devices outside the phantom \DEV directory.
- Loads core device drivers into memory.
- Produces a brief beep even if sound notifications are disabled.
- Defines the subsequent operating system for booting.
- Enables or disables extended Ctrl+C interrupt checking.
- Allocates a specified number of disk buffers.
- Similar to BUFFERS but loads buffers into High Memory Area (HMA) or Upper Memory Blocks (UMB).
- , ,
- Controls allocation and flushing timing of cache blocks.
- Executes programs during CONFIG.SYS processing, pausing until they return control.
- Sets Caps Lock key status on the keyboard.
- ,
- Designates CD-ROM driver name and buffer quantity.
- Continues processing CONFIG.SYS from another file or label.
- , , and other device/system configurations fine-tune hardware and interface operations to enhance performance across various DOS platforms.
These directives exemplify essential configuration parameters across DOS systems, which are critical for organizations maintaining legacy infrastructures or embedded setups requiring precise system tuning and customization.
DTemplate:NbndF
- Configures relocation of drive descriptor tables in memory.
- Defines memory segment address used for multi-sector disk data deblocking processes.
- Activates internal debugger functionality.
- Boot management component.
- Loads device drivers into conventional memory space.
- Loads device drivers into upper memory areas (equivalent to in DRDOS 5.0).
- Sets country and codepage parameters for keyboard, screen, and printer devices.
- Adjusts cache memory size allocations.
- Specifies compatibility mode for floppy disk drives.
- Selects display font settings.
- Controls loading of DOS into high or upper memory (similar to in DRDOS 5.0).
- Loads DOS-related tables (BUFFERS, FCBS, FILES, LASTDRIVE, STACKS) into upper memory regions.
- Specifies an alternate directory path for DOS system files.
- Defines search paths for data files.
- Sets physical parameters for disk drives.
- Establishes configuration for unknown or unrecognized drives.
- See .
- Enables specifying drives for PDUMP.nnn error logging files.
- Displays informational messages on screen output devices.
- Displays messages utilizing ANSI escape codes for enhanced formatting.
- Adds extra program startup verification steps.
- Sets expected error or return codes for subsequent commands executed.
- Manages A20 gate status during program initiation sequences.
- Terminates CONFIG.SYS processing prematurely (excluding SWITCHES and SHELL directives).
- Adjusts hash table size to optimize file open operations (differs from MS-DOS/PC DOS FASTOPEN implementation).
- Specifies number of cached File Control Blocks that can be open simultaneously (shares buffer resources with FILES under DR-DOS).
- Similar to FCBS but loads these structures into upper memory areas.
- Boot management utility component.
- Defines maximum number of files that can be opened concurrently.
- Same as FILES but loads file handles into upper memory space.
- Includes execution of particular CONFIG.SYS subsections (refer to IGNORE).
GTemplate:NbndI
- Waits for a keystroke or timeout, setting the error level to the ASCII value of the key pressed or 1024 if timed out.
- Resumes CONFIG.SYS processing at a designated label.
- Continues nested CONFIG.SYS processing at a specified label and returns to the previous point afterward.
- Refer to , , or for additional details.
- Consult for further information.
- See for related commands.
- Refer to or for more context.
- Consult or for further guidance.
- See for additional reference.
- Loads a TSR program into memory similarly to , but after relocating the DOS data segment. Compare with INSTCDEX.
- Refer to , , or for related utilities.
- See for further details.
- Consult or for additional options.
- Activates console and command line history buffers with enhanced pattern search capability.
- Defines the address of the High Memory Area (HMA) segment.
- Configures energy-saving mode using HLT instruction.
- Enables system checks for boot sector viruses during startup.
- Loads installable file system drivers.
- Prevents execution of certain CONFIG.SYS subsections.
- Permits programs to operate at ring 2, allowing direct hardware input/output access.
- Incorporates directives from another menu block (can be emulated via GOSUB/RETURN in DR-DOS).
- Sets the keyboard's Insert mode status.
- Installs a TSR program into conventional memory.
- Loads a TSR program into upper memory, equivalent to HIINSTALL in DR DOS 5.0.
- Installs a TSR after relocating the DOS data segment (see also INSTCDEX).
- Adjusts PIC interrupt priorities to assign highest priority to a specified IRQ number.
KTemplate:NbndM
- Defines the keyboard layout configuration.
- Sets the address of the relocated keyboard buffer in memory.
- Specifies the maximum number of accessible drive letters.
- Similar to LASTDRIVE but also loads Current Directory Structure into upper memory regions.
- Lists directories where DLLs are searched for.
- Manages compatibility settings for legacy applications.
- Determines the number of file locks allowed simultaneously.
- Controls display of boot logos and startup messages when using PTS-DOS boot manager.
- Configures count, sequence, I/O port address, and timeout parameters for LPT1 device.[1]
- Equivalent configuration settings as LPT1 but applied to LPT2.[1]
- Same as LPT1 configuration but targeting LPT3.[1]
- Enables and configures LPT4 device similarly to other parallel ports.
- Sets delay interval before increasing process priority levels.
- Adjusts memory allocation methods used by the system.
- Defines default policy for DOS memory allocation strategies.
- Specifies options presented within menus.
- Sets color schemes for menus (can be emulated under DR-DOS).
- Assigns default menu block (emulatable in DR-DOS environments).
- Defines individual menu blocks (emulatable under DR-DOS).
- Enables support for multitrack disk operations.
- Continues processing CONFIG.SYS commands from a different file, optionally loading device drivers and setting %NEWFILE% environment variable.[2]
NTemplate:NbndQ
- Defines default character representing No () option in Yes/No/Resume prompts.
- Sets keyboard [[Num Lock|Template:Keypress]] state as enabled or disabled on startup.
- Executes commands conditionally based on previous error code, such as .
- Displays message and waits for key press, similar in function to DR-DOS's and .
- Requires user acknowledgment of errors encountered in CONFIG.SYS processing.
- Configures buffer sizes assigned to LPT ports.
- Enables conditional execution on PC-compatible hardware platforms only.
- Adjusts priority settings within the system scheduler.
- Sets priority levels specifically for disk input/output operations.
- Switches default printer device driver from one port (e.g., LPT1) to another (e.g., LPT4).
- Specifies whether DOS programs are permitted to run within the environment.
- Loads a user interface shell program during startup.
- Allows conditional execution on IBM PS/1-compatible systems only.
- Enables conditional execution on IBM PS/2-compatible machines exclusively.
- Silences output directed to standard output (STDOUT).
RTemplate:NbndT
- Activates automatic system reboot when errors occur.
- Inserts annotations within CONFIG.SYS files.
- Allocates drive letters for local block device drivers.
- Sets the default character for Resume () prompts.
- Returns execution from nested CONFIG.SYS to the prior GOSUB or SWITCH point, optionally providing a return code.
- Specifies the amount of real mode memory available.
- Allows simultaneous loading of programs in the background during CONFIG.SYS processing.
- Determines whether the first character of deleted files is saved in the FAT reserved area.
- Defines video mode for FreeDOS or screen access methods for PTS-DOS.
- Controls the keyboard Scroll Lock state, turning it on or off.
- Assigns environment variables.
- Loads the command interpreter shell.
- Similar to SHELL but includes a size parameter to pre-allocate COMMAND.COM into HMA or UMBs, enhancing memory efficiency with third-party shells.
- Sets keyboard modifier states such as Shift Lock, Num Lock, Scroll Lock, and Insert mode.
- Determines whether files close upon pressing Ctrl+Alt+Del.
- Controls skipping of POST during reboot sequences.
- , STACKSIZE, STACKSHIGH
- Configure hardware interrupt stack sizes and buffer locations across multiple DOS versions and derivatives, considering compatibility nuances.
- , SYSBOOT, SYSGEN, SYSLOAD, SYSTOUMB
- Directives unique to PTS-DOS that manage boot options, system memory arrangement, and loading processes to boost performance and adaptability.
- , SUPPRESSPOPUPS, SWAPPATH, SWITCH
- Various OS-specific commands that handle blocking user interface pop-ups, error logging paths, swap file locations, and conditional flow control within CONFIG.SYS.
- , SWITCHES
- Define system switch characters ('/' or '-') and other special options across DOS variants to ensure consistent command line parsing behavior.
- , THREADS, TIMESLICE
- OS/2 exclusive settings addressing hardware floating-point bug fixes, thread concurrency management, and scheduler time slice adjustments for optimized system performance.
- , TMPEXT
- Manages timeout values for CONFIG.SYS commands and temporary file extensions in DR-DOS and PTS-DOS environments to streamline automation and file management.
- , TRACEBUF, TRAPDUMP
- Enable comprehensive logging and error data capture to facilitate debugging of CONFIG.SYS and AUTOEXEC.BAT processes across various DOS platforms.
UTemplate:NbndZ
- Designates a specific memory segment for use as Upper Memory Block (UMB) by DOS management.
- Specifies which UMB server is utilized.
- Defines address ranges allocated as UMB RAM.
- Enables or disables verification of disk write operations.
- Sets the DOS version number reported to applications.
- Configures VGA display status parameters.
- Indicates the current video mode in use.
- Determines whether virtual DMA functionality is permitted.
- Controls deactivation of processor Virtual Mode Extensions.
- Configures Virtual Device Driver (VxD) settings for Windows environments.
- Adjusts system support parameters for Windows compatibility.
- Manages relocation settings for the Extended BIOS Data Area (EBDA).
- Enables conditional execution tailored for XT-compatible machines.
- Sets up integrated Year 2000 compliance features.
- Defines the default affirmative response character in queries.
- Configures tracking of file deletions.
Challenges
Although the system can initiate startup without CONFIG.SYS or AUTOEXEC.BAT, these configuration files are crucial for comprehensive operating system customization and meeting software prerequisites. Any corruption or damage to these files requires diagnostic efforts.
In cases where CONFIG.SYS either lacks a SHELL directive or is missing/corrupted, DOS attempts to locate COMMAND.COM in the root directory of the boot drive. Earlier versions prior to 6.0 will fail to boot if COMMAND.COM is absent, whereas MS-DOS 6.0/PC DOS 6.1 and Novell DOS 7 and later versions prompt the user to specify a command processor path. This recovery prompt also appears if the main command interpreter terminates unexpectedly or exits intentionally, enabling limited shell substitution during runtime without needing a reboot.
COMMAND.COM from MS-DOS 7.0 onward is not compatible with DR-DOS, although it is often found on drive C: in dual-boot configurations. Starting with DR-DOS 7.02, enforcement of SHELL directives occurs during skip, trace, and step modes, preventing earlier versions’ common bypass techniques. Subsequent updates reintroduced some skip functionality to recover from invalid shell parameters by prompting users for valid shell filenames before loading COMMAND.COM when skipping CONFIG.SYS processing.
CONFIG.SYS file size restrictions differ across operating systems: MS-DOS and PC DOS limit it to a few kilobytes (up to 64 KB in later releases), while DR-DOS imposes no effective size constraint beyond the file system’s limits. MS-DOS processes CONFIG.SYS by tokenizing it into memory and sorting directives—loading drivers prior to TSRs—whereas DR-DOS interprets each directive sequentially, offering fine-grained control over load order and conditional execution based on hardware detection or error conditions. This approach supports sophisticated scenarios such as loading debuggers before device drivers or incorporating temporary utilities via INSTALL.
The maximum length for the SHELL line in MS-DOS/PC DOS versions 2.0 through 4.01 is limited to 31 characters; this was extended to 128 characters in later editions. DR-DOS allows up to 255 characters for this directive. Notably, CONFIG.SYS commands do not accommodate long file names.
Dual Booting DOS with Windows 9x
During installation of Windows 95 over an existing DOS/Windows environment, the original CONFIG.SYS and AUTOEXEC.BAT files are renamed CONFIG.DOS and AUTOEXEC.DOS respectively, enabling dual-boot functionality between Windows 9x and DOS environments. When booting into DOS mode, these original filenames are temporarily restored. Copies of the Windows 95 versions are preserved as CONFIG.W40 and AUTOEXEC.W40.
When 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 employs DCONFIG.SYS and AUTODOS7.BAT as its initialization scripts.
OS/2 and Windows NT
OS/2 relies heavily on CONFIG.SYS for driver setup and environment configuration prior to launching its graphical user interface.
Within the OS/2 subsystem of Windows NT, CONFIG.SYS appears as a conventional file to OS/2 applications but is actually maintained within the system registry.
A variety of undocumented CONFIG.SYS directives exist specifically for OS/2 systems.
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 available 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
- User Manual for PTS-DOS 2000 Pro including details on CONFIG.SYS directives
- Unofficial German FAQ for PTS-DOS (2004) featuring extra CONFIG.SYS directives