Jump to content

CACHETTL (CONFIG.SYS directive)

From Alfawiki
Adapted from the English Wikipedia article CACHETTL (CONFIG.SYS directive), available under CC BY-SA 4.0Updated 9 August 2025
CONFIG.SYS
Company typeConfiguration file
IndustryComputer software
Founded1983
Headquarters
N/A
ProductsConfiguration settings for DOS and OS/2 operating systems

CONFIG.SYS serves as the central configuration file for the DOS and OS/2 operating system families. This plain text file, written in ASCII, contains setup commands accessible to users, which are interpreted by the operating system's DOS BIOS during the startup sequence. CONFIG.SYS was first introduced with DOS version 2.0.

Usage

The directives within CONFIG.SYS tailor DOS to manage hardware devices, software applications, and memory allocation. Once CONFIG.SYS has been processed, DOS initiates the command interpreter designated by the SHELL directive; if none is specified, it defaults to COMMAND.COM, which subsequently executes AUTOEXEC.BAT.

CONFIG.SYS primarily comprises name=value entries that set configurable options or load files—mainly device drivers and terminate-and-stay-resident programs (TSRs)—into system memory. This file is located in the root directory of the bootable drive.

Certain DOS variants prioritize alternative filenames over CONFIG.SYS: - Advanced editions of Concurrent DOS 386, Concurrent DOS XM, Multiuser DOS, and REAL/32 employ CCONFIG.SYS or CCONFIG.INI (in Multiuser DOS) and MCONFIG.SYS (in REAL/32). These platforms support enhanced configuration data stored in binary formats such as CCONFIG.BIN, typically managed through CONFIG.EXE. - In DR DOS versions 3.31 onward, including PalmDOS 1.0, Novell DOS 7, and OpenDOS 7.x, DCONFIG.SYS supersedes CONFIG.SYS and is commonly used alongside disk compression utilities or multi-boot configurations. OpenDOS 7.01 and DR-OpenDOS 7.02 recognize ODCONFIG.SYS, while some DR-DOS releases also check for DRCONFIG.SYS. - Starting with DR-DOS 6.0, users can modify default system file extensions via the SYS /DR:ext command to maintain several sets of system files concurrently within one root directory, selectable through boot loaders like LOADER. The SHELL statement supports specifying alternate AUTOEXEC.BAT files using /P[:filename.ext]. - The CHAIN=filespec command allows continuation of configuration processing in a different file, which may be located outside the root folder; DR-DOS 7.02 and later versions enable jumping to specific labels within these chained files. - From DR-DOS 7.03 onward, the SYS /A option facilitates copying CONFIG.SYS and AUTOEXEC.BAT alongside other system files.

Comparable capabilities exist in other DOS-like operating systems: - FreeDOS utilizes FDCONFIG.SYS. - RxDOS version 7.24 and above uses RXCONFIG.SYS. - PTS-DOS relies on CONFIG.PTS.

In Windows versions built on DOS (such as Windows 95/98), CONFIG.SYS and AUTOEXEC.BAT files remain present but are generally left empty. Windows Me does not process CONFIG.SYS at startup; instead, it loads environment variables directly from the Windows Registry at HKLM\System\CurrentControlSet\Control\SessionManager\Environment.

For FlexOS, CONFIG.SYS is a binary file that specifies resource managers and device drivers 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>

:;*?!

Establishes labels within CONFIG.SYS to serve as jump points for , , , , and commands.
Functions similarly to , but is also utilized for inline comments following other directives. (In MS-DOS/PC DOS, quoted inline comments are not disregarded.)
Introduces inline comments in conjunction with the ; directive.
Prompts a Yes/No confirmation before executing subsequent CONFIG.SYS commands. (FreeDOS does not support custom messages but allows conditional execution using boot menus.) DOS 6.0 and later versions provide comparable functionality by appending after directives.
Forces the immediate execution of the next CONFIG.SYS command without conditions.

ATemplate:NbndC

Determines whether programs can be terminated upon encountering errors.
Configures which drives record file access timestamps within FAT file systems.
Executes commands conditionally on AT-compatible hardware.
Manages boot menu functionality.
Controls the verbosity level of error messages.
Changes the default serial port driver (COM1 through COM4) assigned to the AUX device.
Disables character devices located outside the virtual \DEV directory.
Loads a fundamental device driver into system memory.
Produces an audible beep even if notification sounds are disabled.
Specifies the operating system to boot next.
Enables or disables enhanced Ctrl+C detection.
Sets the quantity of disk buffers allocated by the system.
Similar to BUFFERS but allocates buffers in HMA or UMB memory regions.
Defines the maximum number of cache blocks drawn from the system pool.
Specifies the maximum duration before unused cache blocks return to the system pool.
Sets the maximum interval before dirty cache blocks are flushed to disk storage.
Loads executable programs during CONFIG.SYS processing, pausing further processing until completion.
Defines the keyboard Caps Lock status on startup.
Assigns a name to the CD-ROM device driver.
Determines the number of buffers allocated for CD-ROM operations.
Continues processing CONFIG.SYS commands from another file or label reference.
Specifies the type of system clock in use.
Clears the display screen.
Assigns OEM code pages for character encoding.
Indicates CMOS RAM address locations.
Configures color settings for boot menus.
, ;, ;, ;

Sets count, sequence, I/O port addresses, and timeout values for COM ports (available in DR-DOS 7.02 and later).

Defines buffer size for DMA operations (PTS-DOS).
Redefines characters initiating inline comments or causes subsequent lines to be ignored (behavior varies across operating systems).
Enables internationalization features and configures related parameters (implementation varies by OS).
Positions cursor on screen for configuration menus (DR DOS 6.0 and newer).
Supports codepage switching (MS-DOS versions 4.00-4.01, ignored in DR-DOS 7.02 and above).

Conditional CPU execution directives (in PTS-DOS and DR-DOS) specify processor types such as CPU88 or CPU386+ for conditional command execution.

DTemplate:NbndF

Adjusts relocation settings for drive descriptor tables.
Defines memory segment address used for multi-sector disk data deblocking operations.
Activates internal debugger capabilities.
Controls boot menu management functions.
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.
Establishes compatibility mode settings for floppy disk drives.
Selects display font used by DOS interface.
Manages loading of DOS into high or upper memory areas (similar to in DRDOS 5.0).
Loads DOS internal tables such as BUFFERS, FCBS, FILES, LASTDRIVE, and STACKS into upper memory segments.
Specifies alternate search paths for locating DOS executable files.
Defines search paths used for data files accessed by DOS programs.
Describes physical characteristics of disk drives connected to the system.
Sets parameters applicable to unidentified or unsupported drives.
Refer to .
Enables error logging with PDUMP.nnn files and assigns target drive location.
Outputs a text message on screen during processing.
Displays message text incorporating ANSI escape sequences for formatting effects.
Specifies additional validation checks when launching programs.
Sets an assumed error or return code for subsequent operations.
Controls A20 gate state when initiating program execution.
Terminates CONFIG.SYS processing prematurely, except that SWITCHES and SHELL directives may continue under certain conditions.
Configures hash table size to optimize file open operations (differs from MS-DOS/PC DOS FASTOPEN driver implementation).
Determines number of cached File Control Blocks that can be open simultaneously (shares buffer space with FILES directive under DR-DOS).
Similar to FCBS but explicitly loads these structures into upper memory areas.
Manages boot menu functions related to device selection or configuration.
Sets maximum number of files that can be opened concurrently by DOS processes.
Similar to FILES but forces file handle tables into upper memory regions explicitly.
Includes execution of specified subsections within CONFIG.SYS files (see IGNORE directive).

GTemplate:NbndI

Waits for a key press or timeout, then sets the error level to the ASCII value of the key or 1024 if timed out.
Resumes CONFIG.SYS execution at a designated label.
Continues nested CONFIG.SYS processing at a specified label, then returns to the previous point.
Refer to , , or for related information.
See also .
Refer to .
Consult or for further details.
Consult or for additional information.
See .
Loads a TSR program into memory following DOS data segment relocation. Compare with INSTCDEX.
See , , or for related commands.
Refer to .
See or for more details.
Activates console and command line history buffer with advanced pattern searching capabilities.
Sets the address of the High Memory Area (HMA) segment.
Configures the HLT (halt) mode for power saving.
Enables scanning of the boot sector for viruses.
Loads installable file system drivers.
Prevents execution of specific CONFIG.SYS sections.
Permits certain programs to operate at ring 2, allowing direct hardware I/O access.
Includes directives from another menu block, emulated via GOSUB/RETURN in DR-DOS.
Toggles the keyboard’s Insert mode status.
Installs a TSR program into memory.
Installs a TSR program into upper memory, equivalent to HIINSTALL in DR DOS 5.0.
Loads a TSR program after relocating the DOS data segment; see also INSTCDEX.
Rotates PIC interrupt priorities to give precedence to a specified IRQ.

KTemplate:NbndM

Defines the keyboard layout configuration.
Specifies the address of the relocated keyboard buffer area.
Sets the maximum number of accessible drives.
Similar to LASTDRIVE but also loads the Current Directory Structure into upper memory.
Defines search paths for DLL files.
Handles compatibility settings for legacy applications.
Sets the number of allowable file locks.
Configures boot logo display when using PTS-DOS boot manager.
Defines count, sequence, I/O address, and timeout values for LPT1 device.
Defines count, sequence, I/O address, and timeout values for LPT2 device.
Defines count, sequence, I/O address, and timeout values for LPT3 device.
Enables and configures LPT4 printer port device settings.
Sets delay time before increasing process priority level.
Configures memory allocation policies.
Specifies default DOS memory allocation strategy parameters.
Defines options available in menus.
Sets color schemes for menus (can be emulated under DR-DOS).
Specifies default menu block (emulatable under DR-DOS).
Defines individual menu blocks (emulatable under DR-DOS).
Enables multitrack disk operation functionality.
Continues processing CONFIG.SYS in a new file after loading a device driver and setting %NEWFILE% environment variable.

NTemplate:NbndQ

Sets default No () character used in Yes/No/Resume prompts.
Controls keyboard [[Num Lock|Template:Keypress]] state—on or off at startup.
Enables conditional execution based on the last error code, e.g., .
Displays text and waits for a key press, similar to and commands in DR-DOS environments.
Requires user confirmation of errors encountered during CONFIG.SYS processing.
Configures buffer size settings for LPT ports.
Enables conditional execution on PC-compatible systems only.
Sets parameters for priority scheduling of processes.
Adjusts disk input/output priority levels for applications.
; Changes default printer device driver assignment (e.g., switching from LPT1 to LPT4).
; Controls whether DOS applications are permitted to run on the system.
; Loads a user interface shell environment during startup.
; Enables conditional execution on IBM PS/1-compatible machines only.
; Enables conditional execution on IBM PS/2-compatible machines only.
; Suppresses output display sent to STDOUT.

RTemplate:NbndT

Activates automatic system reboot upon encountering errors.
Permits inclusion of comments within CONFIG.SYS (ignored by PTS-DOS).
Allocates a drive letter for local block device drivers.
Sets the default Resume () character displayed in prompts.
Returns nested CONFIG.SYS processing to the previous GOSUB or SWITCH point, optionally passing a return code.
Specifies the size of real mode memory.
Allows programs in CONFIG.SYS to load simultaneously in the background, similar to CALL or INSTALL commands in other DOS versions.
Determines whether the first character of deleted files is recorded in FAT directory entries.
Defines video mode under FreeDOS or screen access method under PTS-DOS.
Controls the state of the keyboard Scroll Lock key (on/off).
Sets environment variables.
Loads the command interpreter shell.
Similar to SHELL but supports pre-allocating space for relocating COMMAND.COM into HMA or UMBs, optimizing memory with third-party shells.
Defines keyboard modifier key statuses such as Shift Lock and Num Lock.
Specifies file closure behavior triggered by Ctrl+Alt+Del.
Skips Power-On Self-Test (POST) during reboot sequences.
, STACKSIZE, STACKSHIGH
Configure hardware interrupt stack sizes and buffer locations across various DOS releases to enhance system stability and memory efficiency.
, SYSBOOT, SYSGEN, SYSLOAD
Directives in PTS-DOS for managing boot options, alternative OS loading, and memory placement of DOS components to allow flexible system configurations.
, SWITCH
Enables conditional nested processing within CONFIG.SYS using label-based branching to dynamically adjust boot behavior (unsupported in some DOS variants).
, SWAPPATH
OS/2 feature specifying paths for error logs and swap files to improve system management.
, SWITCHES
Define default switch characters ('/' or '-') and special command-line parsing options across different DOS versions.
, TRACEBUF
Controls logging of single-step execution for CONFIG.SYS and AUTOEXEC.BAT scripts to assist debugging (availability varies by OS).
, THREADS, TIMESLICE
OS/2-specific parameters adjusting error log verbosity, number of concurrent threads, and scheduler time slices to optimize multitasking performance.

UTemplate:NbndZ

Configures DOS to use a designated segment as Upper Memory Block (UMB) space.
Specifies which UMB server is utilized.
Defines address ranges allocated as UMB RAM.
Enables or disables verification of disk writes.
Sets the DOS version reported to software applications.
Controls VGA display status settings.
Specifies the current video mode in use.
Enables virtual DMA functionality.
Manages processor Virtual Mode Extensions settings.
Configures VxD drivers for Windows environments.
Sets up Windows system support parameters.
Adjusts relocation of the Extended BIOS Data Area (EBDA).
Allows conditional execution based on XT-compatible hardware detection.
Configures built-in Year 2000 compliance support.
Defines the default affirmative response character for prompts.
Manages tracking of file deletions.

Issues

Although the system can start without CONFIG.SYS or if it is damaged, both this file and AUTOEXEC.BAT are crucial for a full DOS boot sequence. They tailor the operating system and specify necessary software components. If either file is corrupted, troubleshooting becomes necessary.

When CONFIG.SYS lacks a SHELL directive or is missing/corrupt, DOS attempts to locate COMMAND.COM in the root directory of the boot drive. Versions earlier than 6.0 will fail to boot without this file. MS-DOS 6.0/PC DOS 6.1, Novell DOS 7, and later versions prompt users to input a command interpreter path if COMMAND.COM is missing or aborted. This prompt enables limited shell replacement during runtime without requiring a reboot.

Since MS-DOS 7.0 and later COMMAND.COM versions are incompatible with DR-DOS but commonly found in dual-boot environments, DR-DOS 7.02 and newer disallow bypassing SHELL directives when using skip/trace/step modes (e.g., (Ctrl+)F5/F7/F8). Subsequent versions introduced (Ctrl+)F6 to restore skip functionality for recovery from invalid SHELL arguments. If no SHELL directive is detected during skipped CONFIG.SYS processing, users are prompted for a valid shell filename before loading COMMAND.COM from the root directory; pressing Enter defaults to COMMAND.COM.

CONFIG.SYS file size limitations differ among systems: MS-DOS/PC DOS restricts it to several kilobytes up to 64 KB in later releases, whereas DR-DOS imposes no size restrictions beyond those of the underlying file system. MS-DOS processes CONFIG.SYS by compiling it into an in-memory tokenized format that executes directives sequentially—device drivers before TSRs. In contrast, DR-DOS parses directives line-by-line, allowing precise control over loading order through DEVICE and INSTALL commands. This approach facilitates resolving driver conflicts and integrating temporary software via INSTALL, improving customization and troubleshooting capabilities.

In MS-DOS/PC DOS versions 2.0 through 4.01, SHELL command lines were limited to 31 characters; later releases expanded this limit up to 128 characters, while DR-DOS supports up to 255 characters. CONFIG.SYS directives do not accommodate long filenames.

Dual Booting DOS and Windows 9x

When Windows 95 is installed over a pre-existing DOS or Windows environment, the system renames CONFIG.SYS and AUTOEXEC.BAT to CONFIG.DOS and AUTOEXEC.DOS to enable dual boot functionality between Windows 9x and DOS. Selecting the DOS boot option temporarily restores these original filenames. Meanwhile, the Windows 95 versions are preserved under the names CONFIG.W40 and AUTOEXEC.W40.

In cases where Caldera DR-DOS 7.02/7.03 is installed alongside Windows 95, the Windows CONFIG.SYS and AUTOEXEC.BAT files remain intact and unchanged. Instead, DR-DOS employs its own startup scripts named DCONFIG.SYS and AUTODOS7.BAT.

OS/2 and Windows NT

OS/2 extensively utilizes CONFIG.SYS for driver configuration and environment setup prior to launching its graphical user interface.

Within the OS/2 subsystem of Windows NT, the CONFIG.SYS file that OS/2 applications interact with is actually maintained within the system registry.

A number of CONFIG.SYS commands used by OS/2 are either undocumented or lack comprehensive documentation.

The use of CONFIG.SYS persists in OS/2-based operating systems such as eComStation and ArcaOS.

See also

External links

  • Information on AUTOEXEC.BAT and CONFIG.SYS 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 directive descriptions
  • PTS-DOS 2000 Pro User Manual with CONFIG.SYS directives
  • German-language unofficial PTS-DOS FAQ (PTS/FAQD) including additional CONFIG.SYS directives