TRACEBUF (CONFIG.SYS directive)
| Company type | Configuration file |
|---|---|
| Industry | Operating systems |
| Founded | 1983 |
| Products | Configuration commands 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 configuration commands that the operating system's DOS BIOS reads during the startup process. CONFIG.SYS was first introduced with DOS version 2.0.
Usage
The directives within CONFIG.SYS customize DOS settings for hardware devices, software applications, and memory allocation. Once CONFIG.SYS has been processed, DOS initiates the command interpreter specified by the SHELL directive; if none is provided, it defaults to COMMAND.COM, which subsequently runs AUTOEXEC.BAT.
Typically, the file contains name=value pairs that set adjustable parameters or load device drivers and TSR (terminate-and-stay-resident) programs. In DOS systems, CONFIG.SYS is located in the root directory of the bootable drive.
Certain DOS variants prioritize alternate filenames over CONFIG.SYS. For instance, advanced editions of Concurrent DOS 386, Concurrent DOS XM, Multiuser DOS, and REAL/32 search for CCONFIG.SYS or CCONFIG.INI, while storing supplementary configuration data in a binary file named CCONFIG.BIN, which is usually managed through CONFIG.EXE.
In DR DOS version 3.31 and subsequent releases, including Novell DOS 7 and DR-DOS 7.02+, the file DCONFIG.SYS overrides CONFIG.SYS to support multi-boot environments and integration with disk compression utilities. Additionally, OpenDOS 7.01 and DR-OpenDOS 7.02 recognize ODCONFIG.SYS, whereas some DR-DOS editions employ DRCONFIG.SYS. The command SYS /DR:ext enables users to modify default extensions, allowing multiple system files with different names to coexist in a single root directory, thereby increasing boot configuration flexibility.
Starting with DR-DOS 6.0, the CHAIN=filespec command permits continuation of processing another configuration file, optionally specifying a label for targeted execution points. From DR-DOS 7.03 onward, SYS /A copies matching CONFIG.SYS and AUTOEXEC.BAT files alongside system files during setup.
Equivalent configuration files exist in other systems: FDCONFIG.SYS for FreeDOS, RXCONFIG.SYS for RxDOS, and CONFIG.PTS for PTS-DOS.
In Windows 95 and Windows 98, both CONFIG.SYS and AUTOEXEC.BAT reside in the boot drive’s root directory but typically contain no active commands. Conversely, Windows Me does not process CONFIG.SYS at startup; instead, environment variables are loaded from the Windows Registry.
Within the FlexOS operating system, CONFIG.SYS is a binary file that specifies resource managers and device drivers to be loaded during system initialization.
Example
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>
:;*?!
- Defines labels within CONFIG.SYS that serve as jump destinations for , , , and commands.
- Functions like , but allows inline comments after other directives in CONFIG.SYS. (Note: Under MS-DOS/PC DOS, inline comments inside double quotes are not ignored.)
- Introduces inline comments similar to ;.
- Presents a Yes/No prompt along with an optional message to obtain user confirmation before executing subsequent CONFIG.SYS commands. (FreeDOS supports conditional boot menus defined by and .) Starting with DOS 6.0, a similar feature can be triggered by appending after a directive, for example, or .
- Forces unconditional execution of the next CONFIG.SYS command.
ATemplate:NbndC
- 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 hardware.
- Manages boot options.
- Adjusts the level of detail in error message output.
- Selects the default serial device driver for the AUX: port.
- Prevents character devices from being accessible outside the phantom \DEV directory.
- Loads the fundamental device driver into system memory.
- Produces a brief beep even if sound notifications are globally disabled.
- Designates the operating system to boot on the next startup.
- Activates or deactivates extended Ctrl+C interrupt checking.
- Configures the quantity of disk buffers to reserve.
- Similar to BUFFERS but allocates buffers within HMA or UMB memory areas.
- Defines the maximum count of cache blocks allocated dynamically.
- Sets the maximum duration before idle cache blocks are released back to the system pool.
- Specifies maximum time before modified cache blocks are flushed to disk storage.
- Executes programs listed in CONFIG.SYS in the foreground, pausing further processing until they complete.
- Adjusts the Caps Lock key status on the keyboard.
- Names the CD-ROM hardware driver to be used.
- Determines how many buffers are used for CD-ROM access operations.
- Continues processing CONFIG.SYS directives from a new file or label reference.
- Defines the type of system clock in use.
- " Clears the display screen.
- Specifies one or more OEM codepages for character encoding.
- Indicates CMOS RAM address locations.
- Sets color schemes for boot menus.
- , ;, ;, ;
Each entry defines count, priority, I/O port address, and timeout settings for individual COM ports (applicable from DR-DOS 7.02 onwards).
- (PTS-DOS)
- Specifies buffer allocation for DMA transfers.
Reassigns characters that denote inline comments or causes subsequent lines to be ignored, depending on OS version variations.
Enables and configures internationalization support (available since DOS 3.0+, DR DOS, and OS/2).
Positions the display cursor within configuration menus (introduced in DR DOS 6.0+).
Supports codepage switching functionality (applicable to MS-DOS versions 4.00-4.01). Conditional execution commands such as CPU88, CPU88+, CPU86, CPU86+, CPU286, CPU286+, CPU386, CPU386+, CPU486, and CPU486+ allow execution based on processor type, primarily used in PTS-DOS and DR-DOS environments.
DTemplate:NbndF
- Adjusts relocation settings for drive descriptor tables.
- Defines memory segment address utilized for multi-sector disk data deblocking processes.
- Activates internal debugger capabilities.
- Manages boot options and configurations.
- 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.
- Configures sizes of cache memory allocations.
- Specifies compatibility modes for floppy disk drives.
- Selects font used for display output.
- Controls loading of DOS kernel into high or upper memory segments (similar to in DRDOS 5.0).
- Loads DOS system tables such as BUFFERS, FCBS, FILES, LASTDRIVE, and STACKS into upper memory regions.
- Provides an alternative directory path for DOS system files.
- Defines search paths for data files.
- Establishes physical parameters for disk drives.
- Sets configuration parameters for unidentified or unsupported drives.
- See .
- Enables error logging with PDUMP.nnn files and specifies target drive location for logs.
- Outputs a text message on screen during processing.
- Displays messages incorporating ANSI escape sequences for formatting control.
- Applies additional validation checks when launching programs.
- Assigns expected error or return codes for subsequent commands execution flow control.
- Configures A20 gate state at program startup time.
- Terminates CONFIG.SYS processing prematurely except for directives like SWITCHES and SHELL that must still execute.
- Determines size of hash table used to accelerate file open operations (differs from MS-DOS/PC DOS FASTOPEN utility).
- Specifies number of File Control Blocks cached simultaneously (shares buffer space with FILES directive in DR-DOS).
- Functions like FCBS but loads these structures into upper memory areas instead of conventional memory.
- Boot management utility or directive.
- Sets maximum simultaneous open file handles allowed by system configuration.
- Functions similarly to FILES but allocates open file handles within upper memory regions rather than conventional memory space.
- Allows execution of specific CONFIG.SYS subsections as specified by IGNORE directive usage.
GTemplate:NbndI
- Waits for a key press or timeout, setting the error level to the corresponding ASCII value 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 previous position.
- Refer to , , or for related commands.
- See for additional information.
- Consult for further details.
- Refer to or for related usage.
- See or for more context.
- Consult for relevant information.
- Loads a TSR program into memory similarly to , but after relocating the DOS data segment.
- Refer to , , or for related commands.
- See for additional context.
- Consult or for further details.
- Activates console and command line history buffers with enhanced pattern search capabilities.
- Specifies the segment address of the High Memory Area (HMA).
- Configures power-saving settings related to the HLT instruction.
- Enables system scanning for boot sector viruses.
- Loads installable file system drivers.
- Prevents execution of certain CONFIG.SYS subsections as specified.
- Permits designated programs to execute at ring 2, allowing 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.
- Installs a TSR program into memory.
- Loads TSR programs into upper memory, equivalent to HIINSTALL in DR DOS 5.0.
- Installs TSR programs after relocating the DOS data segment.
- Adjusts PIC interrupt priorities to prioritize a specified IRQ number.
KTemplate:NbndM
- Defines the keyboard layout configuration.
- Specifies the memory address of the relocated keyboard buffer.
- Sets the maximum number of accessible drives allowed by the system.
- Functions similarly to LASTDRIVE but loads Current Directory Structure (CDS) into upper memory regions.
- Lists directories searched for dynamic-link libraries (DLLs).
- Manages compatibility handling for legacy software applications.
- Specifies the quantity of file locks permitted concurrently.
- Configures whether a boot logo is displayed during system startup.
- Defines parameters including count, order, I/O address, and timeout for the LPT1 port device.
- Sets count, order, I/O address, and timeout values for LPT2 port device similarly.
- Establishes count, order, I/O address, and timeout settings for LPT3 port device.
- Enables and configures LPT4 device with similar parameters as other LPT ports.
- Determines wait duration before increasing process priority levels.
- Configures strategies for memory allocation management.
- Sets default DOS memory allocation strategy preferences.
- Defines selectable menu options within CONFIG.SYS interface.
- Specifies menu color schemes, with emulation support under DR-DOS systems.
- Sets default active menu block, emulatable in DR-DOS environments.
- Defines individual menu blocks, supported via emulation in DR-DOS.
- Enables or disables multitrack disk operations functionality.
- Continues processing CONFIG.SYS from an alternate file after loading a device driver and assigning %NEWFILE% environment variable.
NTemplate:NbndQ
- Specifies the default character used for No () responses in Yes/No/Resume prompts.
- Sets keyboard [[Num Lock|Template:Keypress]] status either enabled or disabled at startup.
- Enables conditional execution based on the last error code returned, such as .
- Displays a message and waits for a key press, similar to and commands found in DR-DOS systems.
- Requires user acknowledgment when errors occur during CONFIG.SYS processing.
- Configures buffer sizes used by LPT port devices.
- Allows conditional execution specifically on PC-compatible hardware platforms.
- Sets scheduler priority levels for processes or tasks.
- Adjusts priority settings assigned to disk I/O-related programs or drivers.
- Changes default printer device driver assignment (e.g., switching from LPT1 to LPT3 or LPT4).
- Specifies whether DOS applications are permitted to execute on the system.
- Loads a user interface shell environment during startup sequence.
- Enables conditional execution targeted at IBM PS/1-compatible machines only.
- Supports conditional execution specifically on IBM PS/2-compatible hardware platforms.
- Suppresses STDOUT output display by muting it.
RTemplate:NbndT
- Activates automatic system reboot upon encountering errors.
- Permits inclusion of comments within CONFIG.SYS.
- Allocates drive letters for local block device drivers.
- Defines the default character for Resume () queries.
- Returns control from nested CONFIG.SYS processing to the preceding GOSUB or SWITCH statement, optionally passing a return code.
- Specifies the size of real mode memory.
- Enables concurrent loading of programs within CONFIG.SYS in the background.
- Manages storage of the first character of deleted files in the FAT reserved area.
- Determines video mode settings under FreeDOS or screen access methods for PTS-DOS.
- Sets the Scroll Lock key status on the keyboard to enabled or disabled.
- Establishes environment variables.
- Loads the command interpreter shell.
- Functions similarly to SHELL but includes a size parameter for pre-allocating memory in HMA or UMBs, optimizing memory usage with third-party shells.
- Defines keyboard modifier states such as Shift Lock, Num Lock, Scroll Lock, and Insert mode.
- Controls whether files are closed when pressing Ctrl+Alt+Del.
- Skips POST during system reboot.
- , STACKSIZE, STACKSHIGH
- Configure hardware interrupt stack sizes and buffer locations across various DOS versions and embedded systems.
- , SYSBOOT, SYSGEN, SYSLOAD, SYSTOUMB
- PTS-DOS options managing boot processes, system loading, and memory allocation into upper memory blocks (UMBs).
- , SWITCH
- Enables conditional processing blocks within CONFIG.SYS with varying support across DOS versions.
- , SWAPPATH, THREADS, TIMESLICE
- OS/2-specific settings for error logging paths, swap file directories, concurrency threads, and scheduler time slices.
- , TRACE
- Controls CONFIG.SYS execution timeouts and single-step tracing capabilities in DR-DOS, PTS-DOS, FreeDOS, and OS/2 environments.
- , TRAPDUMP
- Configures temporary file extensions (PTS-DOS) and error logging procedures (OS/2).
UTemplate:NbndZ
- Directs DOS to utilize a designated segment as Upper Memory Block (UMB) memory.
- Specifies which UMB server is employed.
- Defines address ranges allocated as UMB RAM.
- Enables or disables verification of disk writes.
- Reports a specific DOS version to applications.
- Configures VGA display status parameters.
- Sets the current video mode.
- Determines whether virtual DMA usage is permitted.
- Enables or disables processor Virtual Mode Extensions.
- Configures Virtual Device Driver (VxD) settings for Windows environments.
- Adjusts system support parameters for Windows operation.
- Manages relocation of the Extended BIOS Data Area (XBDA).
- Executes conditionally on XT-compatible hardware only.
- Implements built-in Year 2000 compliance support.
- Sets the default affirmative response character in prompts.
- Configures tracking of file deletions.
Issues
Although the system can initiate startup without CONFIG.SYS, this file along with AUTOEXEC.BAT is crucial for comprehensive DOS customization and meeting software prerequisites. If these files are damaged or corrupted, troubleshooting becomes necessary.
In cases where CONFIG.SYS lacks a SHELL directive or is missing or corrupted, DOS attempts to locate COMMAND.COM in the root directory of the boot drive. Versions prior to 6.0 will fail to boot if COMMAND.COM is absent. However, MS-DOS 6.0/PC DOS 6.1 and Novell DOS 7 and later will prompt users to specify a command processor path. This prompt also appears if the primary command interpreter terminates unexpectedly or exits intentionally, providing a limited shell replacement during runtime without requiring a reboot.
Due to incompatibilities between MS-DOS versions 7.0 and above COMMAND.COM and DR-DOS implementations, DR-DOS version 7.02 and later restrict bypassing SHELL directives during skip/trace/step modes. This prevents issues in dual-boot configurations. Recovery mechanisms include prompting users to enter a valid shell filename before loading COMMAND.COM.
CONFIG.SYS file size limitations differ depending on the operating system: MS-DOS and PC DOS impose limits up to approximately 64 KB, whereas DR-DOS does not enforce a practical size restriction because it interprets the file line-by-line rather than tokenizing it. This approach grants DR-DOS full control over driver and TSR loading order through DEVICE and INSTALL commands, facilitating conflict resolution and integration of non-resident software during boot.
MS-DOS/PC DOS versions from 2.0 through 4.01 restrict SHELL command lines to a maximum of 31 characters. Later releases expand this limit up to 128 characters, while DR-DOS supports lines as long as 255 characters. Notably, CONFIG.SYS directives do not accommodate long filenames.
Dual Booting DOS and Windows 9x
When Windows 95 is installed over a pre-existing DOS/Windows environment, the files CONFIG.SYS and AUTOEXEC.BAT are renamed to CONFIG.DOS and AUTOEXEC.DOS respectively to enable dual boot functionality between Windows 9x and DOS. Selecting the DOS boot option temporarily restores these original filenames, while the versions used by Windows 95 are backed up as CONFIG.W40 and AUTOEXEC.W40.
In setups where Caldera DR-DOS 7.02 or 7.03 coexists with Windows 95, the original Windows CONFIG.SYS and AUTOEXEC.BAT files remain intact. DR-DOS instead utilizes DCONFIG.SYS and AUTODOS7.BAT to manage its boot configuration.
OS/2 / Windows NT
OS/2 depends extensively on CONFIG.SYS for configuring system parameters, loading drivers, and setting environment variables before its graphical user interface starts.
Within the OS/2 subsystem on Windows NT, the CONFIG.SYS file is emulated inside the system registry rather than existing as a physical file.
There are numerous undocumented CONFIG.SYS commands specific to OS/2 setups.
CONFIG.SYS continues to be employed 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
- AUTOEXEC.BAT and CONFIG.SYS details – Computer Hope
- Overview of Windows 98 / MS-DOS 7.10 CONFIG.SYS directives (archived)
- CONFIG.SYS command reference – Caldera (archived; DR-DOS 7 directives)
- FreeDOS CONFIG.SYS directives explained
- PTS-DOS 2000 Pro User Guide with CONFIG.SYS directives summary
- German-language unofficial PTS-DOS FAQ (archived; includes CONFIG.SYS directives)