TRAPDUMP (CONFIG.SYS directive)
| Company type | Configuration file |
|---|---|
| Industry | Computer software |
| Founded | 1983 |
| Headquarters | N/A |
| Products | Configuration for DOS and OS/2 operating systems |
CONFIG.SYS serves as the fundamental configuration file for DOS and OS/2 operating systems. This plain text file, written in ASCII format, holds setup instructions accessible to users that are interpreted by the operating system's DOS BIOS—usually found within IBMBIO.COM or IO.SYS—during the system startup process. The CONFIG.SYS file was first introduced with DOS version 2.0.
Usage
The directives within CONFIG.SYS are responsible for configuring DOS to manage devices, applications, and memory allocation. Once CONFIG.SYS has been processed, DOS initiates the command shell specified on the SHELL line; if none is specified, it defaults to COMMAND.COM, which subsequently executes AUTOEXEC.BAT.
This file primarily consists of name=value pairs that set parameters or load components such as device drivers and terminate-and-stay-resident programs (TSRs). On DOS systems, CONFIG.SYS is located in the root directory of the boot drive.
Various DOS versions utilize alternative configuration filenames:
- Systems like Concurrent DOS 386, Concurrent DOS XM, and Multiuser DOS look for CCONFIG.SYS or CCONFIG.INI, with additional settings stored in CCONFIG.BIN, typically managed through CONFIG.EXE.
- In DR DOS starting from version 3.31, DCONFIG.SYS overrides CONFIG.SYS to facilitate multi-boot environments and disk compression configurations. Versions such as OpenDOS 7.01 also accept ODCONFIG.SYS or DRCONFIG.SYS.
- DR-DOS allows modification of default configuration file extensions using the command SYS /DR:ext, enabling multiple concurrent system files within a single folder, selectable by boot managers like LOADER.
- Advanced directives including CHAIN=filespec permit continuation of configuration processing from separate files, with label support introduced in DR-DOS 7.02 and later versions.
- Starting from DR-DOS 7.03, the command SYS /A copies both CONFIG.SYS and AUTOEXEC.BAT alongside system files.
Other DOS variants incorporate comparable features with distinct configuration filenames such as FDCONFIG.SYS in FreeDOS, RXCONFIG.SYS in RxDOS, and CONFIG.PTS in PTS-DOS.
In Windows 95 and 98—both based on DOS—CONFIG.SYS and AUTOEXEC.BAT still exist but are typically left empty. Unlike these, Windows Me does not process CONFIG.SYS during boot; instead, it relies on environment variables stored within the Windows Registry at:
- HKLM\System\CurrentControlSet\Control\SessionManager\Environment
For the FlexOS operating system, CONFIG.SYS is a binary file that specifies resource managers and device drivers loaded at startup.
Example
An example of a CONFIG.SYS file 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 commands like , , , , and .
- Functions similarly to , also used for inline comments following other instructions. (Note that MS-DOS/PC DOS does not ignore inline comments enclosed in quotes.)
- Used for inline comments alongside the ; directive.
- Prompts a Yes/No confirmation before executing subsequent CONFIG.SYS commands. (FreeDOS does not allow custom messages here but supports conditional processing via boot menus.) From DOS 6.0 onward, a comparable feature is available by appending to directives.
- Executes the next CONFIG.SYS directive without condition.
A–C
- Determines whether programs may be terminated upon encountering errors.
- Sets which drives record file access timestamps in FAT file systems.
- Enables conditional execution on AT-compatible computers.
- Manages the boot process.
- Adjusts the verbosity level of error messages.
- Changes the default serial device driver assigned to the AUX device.
- Prevents character devices from appearing outside the phantom \DEV directory.
- Loads fundamental device drivers into system memory.
- Produces a beep sound even if audible alerts are turned off.
- Specifies the operating system designated for the next boot.
- Enables or disables extended Ctrl+C detection.
- Defines the quantity of disk buffers to allocate.
- Similar to BUFFERS but loads into High Memory Area (HMA) or Upper Memory Blocks (UMB).
- , CACHETTL, CACHEFLUSH (Embedded DOS 6-XL only)
- Sets cache size and timing parameters.
- Executes programs listed in CONFIG.SYS in the foreground, pausing further processing until completion.
- Sets the Caps Lock keyboard status.
- , CDDBUFFERS (PTS-DOS only)
- Configures CD-ROM driver name and buffer size.
- Continues processing CONFIG.SYS from a new file or label.
- , CLS, CODEPAGE (PTS-DOS or OS/2)
- Controls system clock type, clears the screen, and sets OEM code pages.
- , COLOR (PTS-DOS only)
- Configures CMOS RAM address and colors for the boot menu.
- , COM2, COM3, COM4 (DR-DOS 7.02+)
- Defines count, sequence, I/O addresses, and timeouts for COM ports.
- , COMMENT/COMMENTS (various DOS versions)
- Specifies DMA buffer settings and redefines inline comment characters.
- (DOS 3.0+, DR DOS 3.31+, OS/2)
- Activates and configures international language support.
- , CPSW (DR DOS/MS-DOS legacy)
- Supports cursor positioning and codepage switching.
- Executes conditionally based on CPU type or speed.
DTemplate:NbndF
- Configures relocation of drive descriptor tables in memory.
- Defines memory segment address used for multi-sector disk data deblocking.
- Activates internal debugger support features.
- Boot manager utility for boot configuration.
- Loads device drivers into conventional memory space.
- Loads device drivers into upper memory area (equivalent to in DRDOS 5.0).
- Sets country and codepage information for keyboard, screen, and printer devices.
- Adjusts cache memory allocation sizes.
- Specifies compatibility mode for floppy disk drives.
- Selects display font used by the system.
- Controls loading of DOS into high memory and utilization of upper memory blocks.
- Loads DOS internal tables (BUFFERS, FCBS, FILES, LASTDRIVE, STACKS) into upper memory segments.
- Assigns an alternative directory path for DOS system files.
- Specifies directory search paths for data files.
- Defines parameters for physical disk drives connected to the system.
- Establishes settings for unrecognized or unknown disk drives.
- Refer to for additional information.
- Enables error logging and designates drive location for PDUMP.nnn files.
- Displays a textual message on screen during boot or configuration processing.
- Shows messages that include ANSI escape sequences for formatting purposes.
- Sets additional verification checks when launching programs.
- Defines expected error or return codes from executed programs.
- Specifies A20 gate state configuration when starting applications.
- Terminates CONFIG.SYS processing prematurely except under specific conditions involving SWITCHES and SHELL commands.
- Adjusts hash table size to optimize file open operations, differing from MS-DOS/PC DOS FASTOPEN implementation.
- Determines number of cached File Control Blocks (FCBs) that can be open simultaneously (shares buffer with FILES under DR-DOS).
- Functions like FCBS but loads FCBs into upper memory area for efficiency.
- Boot manager utility involved in boot configuration tasks.
- Sets maximum number of files that can be opened concurrently by the system.
- Functions similarly to FILES but loads file handles into upper memory segments for improved performance.
- Executes specified subsections within CONFIG.SYS during processing (see IGNORE).
GTemplate:NbndI
- Pauses for a key press or timeout, returning an error level equal to the ASCII value or 1024 if timed out.
- Resumes processing of CONFIG.SYS at the specified label.
- Continues nested CONFIG.SYS processing at a given label, with allowing return to the previous point.
- Refer to , , or for additional information.
- Consult for further details.
- See for more context.
- Refer to or as needed.
- See or for related commands.
- Consult for guidance.
- Installs a terminate-and-stay-resident (TSR) program after relocating the DOS data segment; compare with INSTCDEX.
- Refer to , , or for related usage.
- See for additional options.
- Consult or for relevant instructions.
- Activates console and command line history buffers along with enhanced pattern searching capabilities.
- Defines the High Memory Area (HMA) segment address.
- Configures power-saving mode using HLT instruction.
- Specifies whether to perform boot sector virus scanning.
- Loads installable file system drivers.
- Prevents execution of designated subsections within CONFIG.SYS.
- Permits selected programs to operate at ring 2, granting direct hardware I/O access.
- Incorporates directives from another menu block, emulated via GOSUB/RETURN in DR-DOS environments.
- Sets the status of the keyboard Insert mode.
- Loads a TSR program into memory.
- Installs TSRs into upper memory blocks, equivalent to HIINSTALL in DR DOS version 5.0.
- Loads TSR after DOS data segment relocation; see also INSTCDEX for comparison.
- Adjusts PIC interrupt priority levels to assign highest priority to a specified interrupt number.
KTemplate:NbndM
- Defines the keyboard layout configuration.
- Specifies the address location of the relocated keyboard buffer.
- Sets the maximum number of accessible drive letters.
- Functions like LASTDRIVE but loads the Current Directory Structure (CDS) into upper memory areas.
- Establishes search paths for dynamic-link libraries (DLLs).
- Manages compatibility settings for legacy applications.
- Determines the total number of file locks allowed.
- Controls display of boot logo during system startup.
- Specifies parameters including count, logical sequence, I/O port address, and timeout value for the LPT1 printer device.[1]
- Sets count, order, I/O port address, and timeout for LPT2 printer device.[1]
- Defines count, sequence, I/O port address, and timeout settings for LPT3 printer device.[1]
- Enables and configures LPT4 printer device similarly to other LPT ports.
- Specifies delay interval before increasing process priority level.
- Configures strategy for memory allocation management.
- Sets default strategy used by DOS for allocating memory resources.
- Defines available menu options within CONFIG.SYS interface.
- Specifies color scheme settings for menus (implemented via ECHO command under DR-DOS).
- Sets which menu block is loaded by default (emulated in DR-DOS).
- Defines individual menu blocks (also emulated under DR-DOS).
- Activates support for multitrack disk operations on compatible drives.
- Continues processing CONFIG.SYS within a new file after loading a device driver and setting the %NEWFILE% environment variable.[2]
NTemplate:NbndQ
- Sets default character representing "No" in prompts requiring Yes/No/Resume responses.
- Controls status of keyboard [[Num Lock|Template:Keypress]] key—enabled or disabled at startup.
- Allows conditional execution based on previous error code results, such as .
- Displays message text and waits for user key input, similar to commands like and in DR-DOS environments.
- Requires user confirmation upon encountering errors during CONFIG.SYS processing.
- Configures buffer sizes allocated to LPT port devices.
- Enables conditional execution specifically on PC-compatible systems.
- Sets parameters governing priority scheduling of processes.
- Assigns priority levels to disk I/O operations and related programs.
- Changes default printer device driver assignment (e.g., switching from LPT1 to LPT3 or LPT4).
- Determines whether DOS applications are permitted to execute under current settings.
- Loads user interface shell components during system initialization.
- Enables conditional command execution on IBM PS/1-compatible hardware configurations.
- Allows conditional execution targeting IBM PS/2-compatible machines specifically.
- Suppresses output sent to standard output stream (STDOUT).
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.
- Sets the default Resume () character displayed in prompts.
- Returns control from nested CONFIG.SYS processing to the previous GOSUB or SWITCH command, optionally passing back a return code.
- Defines the size of real mode memory available.
- Functions like CALL but initiates concurrent loading of programs within CONFIG.SYS in the background.
- Determines whether the first character of deleted filenames is saved in the FAT reserved region.
- Specifies video display modes for FreeDOS; on PTS-DOS, controls screen access methods.
- Configures keyboard Scroll Lock status as enabled or disabled.
- Sets environment variables for system use.
- Loads the command interpreter shell executable.
- Similar to SHELL but allows pre-allocating memory size to relocate COMMAND.COM into HMA or UMBs, enhancing memory handling with third-party shells.
- Defines keyboard modifier states such as Shift Lock, Num Lock, Scroll Lock, and Insert mode.
- Controls whether files are closed upon pressing Ctrl+Alt+Del.
- Enables skipping of POST routines during reboot sequences if activated.
- , STACKSIZE, STACKSHIGH
- Specify hardware interrupt stack sizes and buffer loading parameters across various DOS versions and derivatives to optimize system efficiency.
- , SYSBOOT, SYSGEN, SYSLOAD
- PTS-DOS commands that manage boot procedures, designate system memory addresses, and provide alternative DOS loading mechanisms for adaptable configurations.
- , SWITCH
- Implements conditional processing commands facilitating advanced menu systems and nested CONFIG.SYS flow control primarily supported in DOS variants except DR-DOS and FreeDOS.
- , SWAPPATH
- OS/2-specific directives that define locations for error logs and swap files to enhance system stability.
- , SWITCHES
- Establish default characters for command-line switches ('/' or '-') along with special options to tailor DOS operation across different versions.
- , TRACE
- Controls single-step timeouts and enables tracing within CONFIG.SYS to support debugging under DR-DOS, PTS-DOS, FreeDOS, and OS/2 platforms.
This segment outlines essential configuration directives for tailoring startup sequences, memory allocation, user prompt behavior, device management, and error recovery in DOS-based environments—crucial elements affecting system reliability and performance in professional computing contexts.
UTemplate:NbndZ
- Directs DOS to allocate a specific memory segment as Upper Memory Block (UMB).
- Specifies which UMB server is utilized by the system.
- Defines address ranges designated for UMB RAM usage.
- Enables or disables verification of disk write operations.
- Sets the DOS version string reported to applications.
- Configures VGA display operational status.
- Indicates current video mode similar to FreeDOS's SCREEN directive.
- Activates virtual DMA capabilities for improved data transfer.
- Manages processor Virtual Mode Extensions (VME) settings.
- Configures Virtual Device Driver (VxD) parameters for Windows environments.
- Sets up system-level support features required by Windows operating systems.
- Handles relocation settings for the Extended BIOS Data Area (XBDA).
- Enables conditional execution on XT-compatible hardware platforms.
- Configures integrated Year 2000 compliance support mechanisms.
- Defines the default affirmative response character in user prompts.
- Manages tracking of file deletion activities.
Issues
Although the system can initiate booting without CONFIG.SYS or AUTOEXEC.BAT, these files are crucial for comprehensive operating system customization and meeting specific software demands. When these files become corrupted or missing, troubleshooting is necessary.
In the absence of a SHELL directive within CONFIG.SYS, or if the file itself is damaged or absent, DOS will attempt to locate COMMAND.COM in the root directory of the boot drive. Versions prior to DOS 6.0 cannot proceed without COMMAND.COM. From MS-DOS 6.0/PC DOS 6.1 onward, as well as Novell DOS 7 and later, users receive a prompt to specify the command processor path if COMMAND.COM is missing or has been aborted. This feature enables a limited shell replacement at runtime without requiring a system reboot.
COMMAND.COM from MS-DOS 7.0 and later is not compatible with DR-DOS; however, it frequently remains in the C: root directory in dual-boot environments. Starting with DR-DOS 7.02, strict enforcement of SHELL directives occurs during skip, trace, and step modes to prevent bypassing, thereby enhancing system stability. Subsequent releases introduced mechanisms to recover from invalid SHELL parameters by prompting users for valid shell filenames before loading COMMAND.COM.
Under MS-DOS/PC DOS, CONFIG.SYS size is restricted to a few kilobytes (up to 64 KB in newer versions), whereas DR-DOS imposes no such limitation due to its distinct processing approach: MS-DOS compiles CONFIG.SYS into tokenized memory prior to execution, whereas DR-DOS processes each directive sequentially. This method grants finer control over the loading sequence of drivers and TSRs through DEVICE and INSTALL commands, facilitating resolution of conflicts and dynamic integration of non-resident software.
The maximum length for the SHELL line in MS-DOS/PC DOS versions 2.0 through 4.01 is limited to 31 characters; later iterations extend this limit to 128 characters. DR-DOS accepts up to 255 characters for this directive. It is noteworthy that CONFIG.SYS commands do not accommodate long filenames.
Dual booting DOS and Windows 9x
When Windows 95 is installed over an existing DOS or Windows setup, CONFIG.SYS and AUTOEXEC.BAT are renamed to CONFIG.DOS and AUTOEXEC.DOS respectively, enabling seamless dual booting between Windows 9x and DOS environments. During a DOS boot session, these files are temporarily restored to their original names. Additionally, backups of the Windows 95 variants are preserved as CONFIG.W40 and AUTOEXEC.W40.
For systems running Caldera DR-DOS versions 7.02 or 7.03 alongside Windows 95, the original Windows CONFIG.SYS and AUTOEXEC.BAT remain untouched; instead, DR-DOS utilizes DCONFIG.SYS and AUTODOS7.BAT to manage its startup configuration.
OS/2 / Windows NT
OS/2 relies heavily on CONFIG.SYS for setting up device drivers and environment parameters prior to initiating its graphical user interface.
Within the OS/2 subsystem integrated into Windows NT, CONFIG.SYS configurations are maintained within the system registry rather than traditional configuration files.
Numerous CONFIG.SYS directives in OS/2 lack comprehensive documentation or remain undocumented.
CONFIG.SYS continues to be employed in 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
- AUTOEXEC.BAT and CONFIG.SYS details at Computer Hope
- Overview of Windows 98 / MS-DOS 7.10 CONFIG.SYS directives (archived)
- Caldera's CONFIG.SYS Command Reference (archived) – Summary of DR-DOS 7 directives
- FreeDOS CONFIG.SYS directives description (archived)
- PTS-DOS 2000 Pro User Manual including CONFIG.SYS commands (archived)
- Unofficial German-language PTS-DOS FAQ (PTS/FAQD) covering CONFIG.SYS directives (archived)