TRACE (CONFIG.SYS directive)
| Company type | Configuration file |
|---|---|
| Industry | Computer software |
| Founded | 1983 |
| Products | Initialization commands for DOS and OS/2 startup |
CONFIG.SYS serves as the chief configuration file for DOS and OS/2 operating systems. This plain text file in ASCII format holds initialization commands that the operating system's DOS BIOS—usually found in IBMBIO.COM or IO.SYS—interprets during the startup sequence. CONFIG.SYS was first introduced with DOS version 2.0.
Usage
The directives within CONFIG.SYS are utilized to set up DOS for hardware devices, software applications, and 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 then executes AUTOEXEC.BAT.
Typically, this file consists of name=value pairs that adjust system parameters or load device drivers and terminate-and-stay-resident programs (TSRs). In DOS environments, CONFIG.SYS is located in the boot drive’s root directory.
The same filename is also employed by (DCP), an MS-DOS variant developed by the East German firm VEB Robotron.
Certain DOS versions recognize alternative filenames that can override CONFIG.SYS:
- Advanced editions of Concurrent DOS 386, Concurrent DOS XM, Multiuser DOS, and REAL/32 replace CONFIG.SYS with CCONFIG.SYS or CCONFIG.INI (in Multiuser DOS). These platforms use a binary configuration file named CCONFIG.BIN, which is modified through CONFIG.EXE.
- Under DR DOS 3.31, PalmDOS 1.0, Novell DOS 7, OpenDOS 7.01, and DR-DOS versions 7.02 and later, DCONFIG.SYS takes precedence over CONFIG.SYS to facilitate disk compression and multi-boot setups.
- OpenDOS 7.01 and DR-OpenDOS 7.02 also support ODCONFIG.SYS; some DR-DOS 7.02+ releases additionally check for DRCONFIG.SYS.
- Starting with DR DOS 6.0, users can modify the default system file extensions using SYS /DR:ext, allowing multiple system files to coexist in a single root directory and be selected via boot loaders such as LOADER.
- The SHELL command permits specifying alternative AUTOEXEC.BAT files and accepts extensions other than .BAT, functionality also available in 4DOS.
- DR-DOS includes support for CHAIN=filespec, enabling continuation of configuration processing from another file; this can include jump labels (CHAIN=filespec,label).
- From DR-DOS version 7.03 onwards, the SYS /A command copies CONFIG.SYS and AUTOEXEC.BAT alongside other system files.
Other operating systems use different configuration filenames: FDCONFIG.SYS in FreeDOS, RXCONFIG.SYS in RxDOS, and CONFIG.PTS in PTS-DOS.
In Windows 95 and Windows 98, which are based on DOS, CONFIG.SYS and AUTOEXEC.BAT reside in the root directory but are generally left empty. Windows Me does not process CONFIG.SYS during startup; instead, it loads environment variables directly from the registry.
For FlexOS, CONFIG.SYS is a binary configuration file that specifies resource managers and device drivers to be loaded at boot time.
Example
Here is a sample 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>
:;*?!
- Defines jump labels within CONFIG.SYS that serve as targets for , , , , and directives.
- Functions similarly to , but can also be used for inline comments following other commands in CONFIG.SYS. (Note that under MS-DOS/PC DOS, inline comments inside double quotes are not ignored.)
- Used at the start of inline comments to complement the ; directive.
- Prompts the user with a Yes/No question before executing subsequent CONFIG.SYS commands. (FreeDOS supports optional conditions with boot menus but does not provide optional messages.) Starting with DOS 6.0, a comparable feature exists by appending after the directive.
- Executes the following CONFIG.SYS command unconditionally.
ATemplate:NbndC
- Determines whether programs may be terminated upon encountering errors.
- Configures which drives record file access timestamps in FAT file systems.
- Enables conditional execution on AT-compatible hardware.
- Manages boot sequence settings.
- Adjusts the level of detail for error message output.
- Alters the default internal serial driver for the AUX device.
- Prevents access to character devices outside the phantom \DEV directory.
- Loads a fundamental device driver into system memory.
- Produces a brief beep even if sound notifications are disabled.
- Indicates which operating system to boot next.
- Enables or disables extended Ctrl+C interrupt checking.
- Defines the number of disk buffers to allocate.
- Similar to BUFFERS but allocates buffers within HMA or UMB memory areas.
- Maximum count of cache blocks allocated from the system pool.
- Maximum duration before unused cache blocks are returned to the system pool.
- Maximum interval before dirty cache blocks are flushed to disk storage.
- Loads programs specified in CONFIG.SYS and runs them in the foreground, pausing further processing until completion.
- Sets the Caps Lock key state on or off at startup.
- Specifies the name of the CD-ROM hardware driver.
- Defines the number of buffers allocated for CD-ROM operations.
- Continues CONFIG.SYS processing from a new file or label.
- Specifies the type of system clock in use.
- Clears the display screen during boot.
- Sets OEM codepage(s) for character encoding.
- Defines CMOS RAM address parameters.
- Specifies color settings used in boot menus.
- Defines count, sequence, I/O port address, and timeout parameters for COM ports (available from DR-DOS 7.02 onward).
- Specifies DMA buffer configurations (PTS-DOS exclusive).
- Redefines inline-comment lead characters or causes subsequent lines to be ignored, depending on OS version.
- Activates and configures internationalization support (varies by operating system).
- , CPSW, CPU-related directives manage cursor positioning, codepage switching, CPU type-based conditional execution (dependent on OS version).
DTemplate:NbndF
- Manages relocation of drive descriptor tables in memory.
- Specifies memory segment address for multi-sector disk data deblocking operations.
- Enables support for internal debugging tools.
- Controls boot manager configurations.
- Loads device drivers into system memory.
- Loads device drivers into upper memory blocks, equivalent to in DRDOS 5.0.
- Configures country-specific and codepage settings for keyboard, screen, and parallel port devices.
- Sets sizes for cache memory allocations.
- Defines compatibility mode for floppy disk drives.
- Selects display font used during operation.
- Controls loading DOS into high memory and/or usage of upper memory areas.
- Loads DOS tables such as BUFFERS, FCBS, FILES, LASTDRIVE, and STACKS into upper memory space.
- Specifies an alternative search path for DOS executable files.
- Defines search paths for data files used by DOS applications.
- Sets physical parameters for disk drives recognized by the system.
- Establishes parameters for unidentified disk drives.
- Refer to .
- Enables creation of PDUMP.nnn error log files and specifies target drive for storage.
- Displays a textual message on-screen during boot or processing.
- Outputs messages including ANSI escape sequences for formatting purposes.
- Adds extra validation checks when launching programs.
- Sets an assumed error or return code for subsequent commands executed by DOS.
- Defines A20 gate state when initiating a program execution cycle.
- Terminates CONFIG.SYS processing prematurely except for SWITCHES and SHELL directives that follow it.
- Configures hash table size to accelerate file open operations, differing from MS-DOS/PC DOS FASTOPEN driver behavior.
- Sets the number of cached File Control Blocks (FCBs) allowed open simultaneously, sharing buffer space with FILES under DR-DOS systems.
- Functions like FCBS but explicitly loads FCBs into upper memory segments.
- Boot manager directive controlling boot process behavior.
- Determines how many files can be opened concurrently by the system.
- Similar to FILES but loads file handles explicitly into upper memory regions.
- Includes execution of designated CONFIG.SYS subsections as specified (see IGNORE).
GTemplate:NbndI
- Waits for a key press or timeout, then assigns the error level to the key's 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, returning to the previous point afterward.
- Refer to , , or for additional details.
- See related information in .
- Consult for further reference.
- Refer to or for more context.
- See or for related directives.
- Consult for further explanation.
- Loads a TSR program into memory similarly to , but after relocating the DOS data segment.
- See , , or for additional information.
- Refer to for more details.
- Consult or for related commands.
- Activates console and command line history buffer with enhanced pattern search capabilities.
- Defines the memory address of the High Memory Area (HMA) segment.
- Configures the HLT mode for power saving.
- Determines whether boot sector virus scanning is performed during startup.
- Loads installable file system drivers.
- Prevents execution of specified subsections within CONFIG.SYS.
- Permits certain applications to run at ring 2, granting direct hardware I/O access.
- Incorporates directives from another menu block, emulated through GOSUB/RETURN in DR-DOS.
- Sets the Insert mode status of the keyboard.
- 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.
- Adjusts PIC interrupt priorities to prioritize a specific IRQ line.
KTemplate:NbndM
- Defines the keyboard layout configuration.
- Specifies the address where the relocated keyboard buffer resides.
- Sets the maximum number of drives accessible by the system.
- Functions like LASTDRIVE but loads the Current Directory Structure (CDS) into upper memory.
- Lists directories searched for Dynamic Link Libraries (DLLs).
- Manages compatibility settings for legacy software applications.
- Configures the number of file locks permitted simultaneously.
- Controls display settings for boot logos via PTS-DOS boot manager.
- Specifies count, order, I/O port address, and timeout parameters for LPT1 device.[1]
- Defines similar parameters—count, order, I/O address, timeout—for LPT2 device.[1]
- Sets count, order, I/O port, and timeout values for LPT3 device.[1]
- Enables and configures LPT4 device with analogous settings.
- Determines wait duration before raising process priority level.
- Establishes strategy for memory allocation management.
- Specifies default method used by DOS for memory allocation.
- Defines options available within menu configurations.
- Sets color schemes used in menus, emulatable under DR-DOS environments.
- Designates default menu block, with emulation support under DR-DOS systems.
- Defines individual menu blocks, emulatable under DR-DOS platforms.
- Enables operations on multitrack disks.
- Continues processing CONFIG.SYS commands from a new file, optionally loading a driver and setting %NEWFILE% environment variable.[2]
NTemplate:NbndQ
- Sets the default character used as "No" () response in Yes/No/Resume prompts.
- Controls keyboard [[Num Lock|Template:Keypress]] status, turning it on or off at startup.
- Enables conditional execution based on previous error codes, e.g., .
- Displays a message and waits for a key press, similar to DR-DOS's and .
- Requires user confirmation upon encountering errors within CONFIG.SYS processing.
- Configures buffer size allocated to LPT printer devices.
- Allows conditional execution restricted to PC-compatible hardware platforms.
- Sets priority level assigned to scheduler tasks.
- Determines priority assigned to disk I/O processes.
- Changes default printer device driver assignment (for example, 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.
- Enables conditional execution limited to IBM PS/1-compatible computers.
- Enables conditional execution limited to IBM PS/2-compatible computers.
- Suppresses output sent to STDOUT.
RTemplate:NbndT
- Activates automatic system reboot upon encountering errors.
- Permits inclusion of comments within CONFIG.SYS files.
- Allocates a drive letter for local block device drivers.
- Establishes the default Resume () character used in Yes/No/Resume prompts.
- Returns control from nested CONFIG.SYS processing to the previous GOSUB or SWITCH statement, optionally passing a return code.
- Specifies the size of real mode memory.
- Allows simultaneous loading of programs in CONFIG.SYS in the background.
- Saves the first character of deleted files within the FAT reserved area.
- Defines video mode for FreeDOS or screen access methods for PTS-DOS.
- Configures the keyboard Scroll Lock state to be enabled or disabled.
- Sets environment variables.
- Loads the command interpreter shell.
- Similar to SHELL but includes a size parameter to preload COMMAND.COM into HMA or UMBs, enhancing memory handling with third-party shells.
- Designates keyboard modifier states such as Shift Lock, Num Lock, Scroll Lock, and Insert mode.
- Determines whether files close upon pressing Ctrl+Alt+Del.
- Skips POST during system reboot.
- Specifies the number of stacks allocated for hardware interrupts.
- Defines default stack size for newly created threads.
- Functions like STACKS but loads buffers into upper memory areas.
- Configuration settings for boot manager.
- Reserved for internal operations.
- Controls behavior of XMS A20 gate handling.
- Defines submenu blocks that can be emulated under DR-DOS.
- Redirects error logs to a drive instead of showing popup messages.
- Sets the path location for swap files.
- Allows conditional continuation of nested CONFIG.SYS processing based on key presses, with RETURN resuming prior execution point.
- Determines the default switch character used ('/' or '-').
- Specifies special operational options.
- Enables correction for FPU rounding errors.
- Sets an alternative DOS system boot filename.
- Configures memory addresses used by DOS components.
- Loads the system from an alternate disk location.
- Defines the size of dynamic system memory pool allocations.
- Loads DOS data and code into Upper Memory Blocks (UMBs).
- Specifies the number of concurrent threads supported by the OS scheduler.
- Sets timeout durations for CONFIG.SYS single-stepping, key queries, and default prompt responses.[1]
- Configures minimum and maximum CPU time slices allocated by the scheduler.
- Defines file extension used for temporary files.
- Enables or disables single-step execution of CONFIG.SYS/AUTOEXEC.BAT, with implementations varying across OS versions.[3]
- Specifies size of TRACE log buffer for diagnostic purposes.
- Records detailed error information to assist debugging.
UTemplate:NbndZ
- Assigns a specific memory segment as UMB (Upper Memory Block) for DOS use.
- Designates the UMB server segment.
- Defines address ranges that qualify as UMB RAM areas.
- Enables or disables verification of disk write operations.
- Sets the DOS version string reported to applications.
- Configures VGA display status settings.
- Specifies the current video mode in use.
- Activates virtual DMA functionality.
- Controls processor Virtual Mode Extensions (VME) features.
- Manages VxD driver configurations for Windows environments.
- Enables system-level support for Windows operating systems.
- Handles relocation of Extended BIOS Data Area (EBDA).
- Executes conditionally on XT-class compatible machines only.
- Configures built-in Year 2000 (Y2K) compliance support.
- Sets default "Yes" character used in prompt responses.
- Tracks drivers that have been deleted.
Issues
Although the system can initiate booting without a CONFIG.SYS file or if it becomes corrupted, this file, together with AUTOEXEC.BAT, plays a crucial role in customizing the DOS startup process and meeting software prerequisites. When these files are damaged, diagnostic efforts are required.
If the CONFIG.SYS file either lacks a SHELL directive or is missing or compromised, DOS attempts to locate COMMAND.COM in the root directory of the boot drive. Versions prior to DOS 6.0 will not boot if COMMAND.COM cannot be found. Starting with MS-DOS 6.0, PC DOS 6.1, Novell DOS 7, and subsequent releases, users receive a prompt to specify an alternative command processor path if COMMAND.COM is unavailable or if the shell terminates unexpectedly. This prompt also enables limited replacement of the runtime shell without needing to reboot.
Due to incompatibilities between MS-DOS 7.0 and later versions of COMMAND.COM and DR-DOS, versions 7.02 and above of DR-DOS prevent skipping or stepping over SHELL directives during trace or step modes, enhancing stability when dual-booting. Certain key combinations restore some skip functionalities to recover from invalid shell parameters. If no SHELL directive is detected during CONFIG.SYS skipping, users are asked to enter a valid shell path before COMMAND.COM proceeds.
CONFIG.SYS file size restrictions differ: MS-DOS and PC DOS limit the file size to a few kilobytes (with recent versions allowing up to 64 KB), whereas DR-DOS imposes no fixed size limit aside from those dictated by the underlying file system. MS-DOS processes CONFIG.SYS by compiling it into a tokenized form stored in memory and executes directives in a predetermined sequence (loading drivers prior to TSRs). Conversely, DR-DOS interprets each directive sequentially as read, providing granular control over the load order using DEVICE and INSTALL commands—this flexibility aids in resolving conflicts or dynamically incorporating debuggers and temporary utilities.
In earlier MS-DOS editions, the maximum length for the SHELL command line was capped at 31 characters; later editions extended this limit up to 128 characters, while DR-DOS supports 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. This renaming facilitates dual-boot functionality between Windows 9x and DOS environments. When booting into DOS mode, these backup files are temporarily restored as CONFIG.SYS and AUTOEXEC.BAT, while copies of the Windows 95 versions are preserved under the names CONFIG.W40 and AUTOEXEC.W40.
For systems running Caldera DR-DOS versions 7.02 or 7.03 alongside Windows 95, Windows’ CONFIG.SYS and AUTOEXEC.BAT remain untouched. Instead, DR-DOS uses its own startup files named DCONFIG.SYS and AUTODOS7.BAT.
OS/2 / Windows NT
OS/2 extensively utilizes CONFIG.SYS for setting up device drivers and environment variables before launching its graphical user interface.
Within the OS/2 subsystem included in Windows NT, CONFIG.SYS is presented to OS/2 applications but is actually maintained within the Windows registry.
A number of CONFIG.SYS commands used by OS/2 have never been officially documented.
CONFIG.SYS continues to be supported 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 Windows 98 / MS-DOS 7.10 CONFIG.SYS settings (archived)
- Caldera’s CONFIG.SYS Command Reference (archived) – summary of DR-DOS 7 directives
- Guide to FreeDOS CONFIG.SYS directives
- PTS-DOS 2000 Pro User Manual covering CONFIG.SYS directives (archived)
- Unofficial German FAQ for PTS-DOS including CONFIG.SYS directives (archived)