Jump to content

CACHESIZE (CONFIG.SYS directive)

From Alfawiki
Adapted from the English Wikipedia article CACHESIZE (CONFIG.SYS directive), available under CC BY-SA 4.0Updated 9 August 2025
CONFIG.SYS
Company typeConfiguration file
IndustryComputer software
Founded1983
Headquarters
N/A
ProductsOperating system configuration

CONFIG.SYS serves as the main configuration file utilized by DOS and OS/2 operating systems. This plain text file, written in ASCII, holds setup instructions accessible to users that are interpreted by the operating system's DOS BIOS—usually found in IBMBIO.COM or IO.SYS—during the system's startup sequence. The CONFIG.SYS file was first introduced with DOS version 2.0.

Usage

The directives within CONFIG.SYS are responsible for configuring DOS to handle devices, software applications, and memory allocation. Once CONFIG.SYS has been processed, DOS initiates the command interpreter specified on the SHELL line; if none is provided, it defaults to COMMAND.COM. Subsequently, this shell executes the commands contained in the AUTOEXEC.BAT file.

Primarily, the file comprises name=value statements that define settings or load components such as device drivers and terminate-and-stay-resident programs (TSRs).

In DOS environments, CONFIG.SYS is located in the root directory of the system’s boot drive.

The same filename is also employed by (DCP), an MS-DOS variant developed by East-German manufacturer VEB Robotron.

Certain DOS versions support alternative configuration filenames that override CONFIG.SYS:

- Advanced iterations of Concurrent DOS 386, Concurrent DOS XM, Multiuser DOS, System Manager, and REAL/32 utilize CCONFIG.SYS instead. This change corresponds to enhanced configuration options stored in CCONFIG.BIN, which are managed through CONFIG.EXE. - In DR DOS 3.31, PalmDOS 1.0, Novell DOS 7, and DR-DOS versions 7.02 and later, DCONFIG.SYS takes precedence. Originally connected to disk compression configurations, this allows multiple configuration files to coexist in multi-boot setups. - OpenDOS 7.01 and DR-OpenDOS 7.02 additionally look for ODCONFIG.SYS or DRCONFIG.SYS. - DR-DOS 6.0 and subsequent releases enable modification of default configuration file extensions using SYS /DR:ext, facilitating multiple system file sets that can be selected by boot loaders like LOADER. - The SHELL directive permits specifying alternate AUTOEXEC.BAT files via /P[:filename.ext], with COMMAND.COM accepting extensions other than .BAT under these conditions. - Starting with DR-DOS 6.0, the CHAIN=filespec command allows continuation of configuration processing from another file, with DR-DOS 7.02+ supporting label-specific chaining. - DR-DOS 7.03 and later introduce SYS /A, which copies CONFIG.SYS and AUTOEXEC.BAT alongside system files during setup.

Similar functionality exists in other DOS variants: - FDCONFIG.SYS is used by FreeDOS - RXCONFIG.SYS is employed by RxDOS version 7.24 and above - CONFIG.PTS is utilized by PTS-DOS

In Windows 95 and Windows 98—both built upon DOS—CONFIG.SYS and AUTOEXEC.BAT remain in the root directory of the boot device but are generally left empty. Windows Me no longer processes CONFIG.SYS during startup; instead, it retrieves environment variables directly from the Windows Registry at:

HKLM\System\CurrentControlSet\Control\SessionManager\Environment

For the FlexOS operating system, CONFIG.SYS is a binary file that defines resource managers and device drivers loaded during system initialization.

Example

Below is a 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 serving as jump destinations for , , , , and commands.
Functions similarly to , but also facilitates in-line commentary following other directives. (Note: MS-DOS/PC DOS does not disregard inline comments enclosed in double quotes.)
Enables addition of inline remarks alongside the ; directive.
Prompts a Yes/No confirmation before proceeding with subsequent directives. FreeDOS extends this with conditional options for boot menus (, ). DOS version 6.0 and later provide comparable functionality using syntax like .
Executes the next directive without condition.

ATemplate:NbndC

Determines whether programs can be terminated upon encountering errors.
Specifies which drives record file access timestamps on FAT file systems.
Allows conditional execution on AT-compatible computers.
Acts as a boot management utility.
Adjusts the verbosity level of error messages.
Alters the default serial device driver associated with the AUX: port.
Prevents access to character devices outside the phantom \DEV directory.
Loads a fundamental device driver into system memory.
Triggers a brief beep even if sound notifications are disabled.
Indicates which operating system should boot next.
Enables or disables extended Ctrl+C monitoring.
Defines the number of disk buffers allocated.
Similar to BUFFERS but loads buffers into HMA or UMB memory areas.
, , (Embedded DOS 6-XL only)
Controls cache block allocation and flushing intervals.
Loads executable programs within CONFIG.SYS and pauses processing until they return control.
Sets the Caps Lock state on the keyboard.
, (PTS-DOS only)
Configures CD-ROM driver name and buffer settings.
Continues processing CONFIG.SYS from a specified file or label.
, , and other directives adjust system behavior and display settings tailored to specific DOS versions.

Communication Ports

, COM2, COM3, COM4 (DR-DOS 7.02+)
Define quantity, logical sequence, I/O port addresses, and timeout durations for serial communication ports.

Comments and Internationalization

, COMMENTS (DOS 4.0+)
Allows redefining inline comment characters or ignoring entire lines.
(DOS 3.0+, DR DOS 3.31+, OS/2)
Activates support for international character sets.

CPU-Specific Directives

Directives such as CPU88, CPU86, CPU286, CPU386 (DR-DOS 7.02+), CPU486, among others, enable conditional execution based on CPU type, predominantly utilized in PTS-DOS and DR-DOS systems.

This comprehensive directive collection enhances system configuration flexibility across various DOS platforms, accommodating diverse hardware environments and improving boot-time adaptability essential for enterprise IT infrastructures.

DTemplate:NbndF

Adjusts relocation parameters for drive descriptor tables.
Specifies memory segment address used for multi-sector disk data deblocking operations.
Activates internal debugger features.
Functions as a boot management tool.
Loads device drivers into conventional memory.
Loads device drivers into upper memory blocks (equivalent to in DRDOS 5.0).
Sets country and codepage information for keyboard, screen, and printer devices.
Configures sizes of cache memory segments.
Defines compatibility mode for floppy drives.
Specifies font used for display output.
Controls loading of DOS into high or upper memory areas (similar to in DRDOS 5.0).
Loads DOS configuration tables such as BUFFERS, FCBS, FILES, LASTDRIVE, STACKS into upper memory regions.
Designates an alternate path for locating DOS files.
Sets search paths for data files used by DOS utilities.
Defines physical parameters for disk drives.
Specifies parameters for drives not natively recognized by the system.
See .
Enables specifying drive letters when generating PDUMP.nnn error logs.
Controls whether messages are displayed on screen during processing.
Displays messages including ANSI escape sequences if enabled.
Activates additional validation checks when launching programs.
Defines assumed error or return codes for subsequent commands or operations.
Sets the state of the A20 gate during program startup procedures.
Terminates CONFIG.SYS processing early except for SWITCHES and SHELL directives under certain conditions.
Configures hash table size to optimize file open operations, differing from MS-DOS/PC DOS FASTOPEN driver behavior.
Specifies the maximum number of cached File Control Blocks (FCBs) that can be opened simultaneously (shares buffer with FILES under DR-DOS).
Similar to FCBS but explicitly loads FCB buffers into upper memory areas.
Acts as a boot manager utility.
Sets maximum allowed concurrently open files count.
Similar to FILES but explicitly loads file handle buffers into upper memory segments.
Forces execution of designated CONFIG.SYS subsections (refer to IGNORE directive).

GTemplate:NbndI

Waits for a key press or timeout, setting the error level to the ASCII value of the key or 1024 if timed out.
Resumes processing of CONFIG.SYS at the designated label.
Continues nested CONFIG.SYS processing at the specified label, then returns to the prior location.
Refer to , , or for additional details.
Consult for more information.
See for related commands.
Refer to or as applicable.
See or for further reference.
Consult for related usage.
Loads a TSR program into memory similarly to , but after relocating the DOS data segment. Compare with INSTCDEX.
See , , or for related functions.
Refer to for additional context.
Consult or as needed.
Activates console and command line history buffer with enhanced pattern searching capabilities.
Defines the segment address for HMA.
Configures power-saving mode using HLT instruction.
Determines whether boot sector virus checks are performed by the system.
Loads installable file system drivers.
Prevents execution of specified CONFIG.SYS subsections.
Permits designated programs to execute at ring 2, allowing direct hardware I/O access.
Incorporates directives from another menu block (emulated by GOSUB/RETURN in DR-DOS).
Sets the Insert mode status of the keyboard.
Installs TSR programs into memory.
Loads TSR programs into upper memory areas (equivalent to HIINSTALL in DR DOS 5.0).
Installs TSR programs post DOS data segment relocation (compare with INSTCDEX).
Adjusts PIC interrupt priority levels to give precedence to a specified IRQ number.

KTemplate:NbndM

Defines the keyboard layout configuration.
Specifies the address of the relocated keyboard buffer in memory.
Sets the maximum number of drives accessible by the system.
Similar to LASTDRIVE but also loads the Current Directory Structure (CDS) into upper memory regions.
Lists directories searched for DLL files.
Manages compatibility with legacy software applications.
Configures the number of file locks allowed concurrently.
Enables boot logo display and controls startup message visibility.
Specifies count, order, I/O port address, and timeout settings for LPT1 device configuration.
Applies identical settings as LPT1 for LPT2 device configuration.
Mirrors LPT1 settings for LPT3 device configuration.
Enables and configures LPT4 device similarly to previous LPT devices.
Sets delay before increasing process priority during execution.
Determines strategy for allocating memory resources.
Defines default DOS memory allocation method.
Establishes menu option parameters.
Sets menu color schemes (emulated via ECHO command in DR-DOS).
Specifies default menu block selection (emulated through TIMEOUT and SWITCH commands in DR-DOS).
Defines individual menu blocks (emulated using ECHO and SWITCH commands in DR-DOS).
Enables support for multitrack disk operations.
Continues processing CONFIG.SYS from a different file, optionally loading a device driver and setting the %NEWFILE% environment variable.

NTemplate:NbndQ

Defines default No () character response in Yes/No/Resume prompts.
Sets keyboard [[Num Lock|Template:Keypress]] status either enabled or disabled at startup.
Executes commands conditionally based on previous error code, e.g., .
Displays a message and waits for a key press, similar to and under DR-DOS functionality.
Requires user confirmation when errors occur during CONFIG.SYS processing.
Configures buffer size allocated to LPT ports for printing devices.
Enables conditional execution on PC-compatible hardware systems.
Sets scheduling priority levels for processes.
Adjusts priority assigned to disk input/output operations.
Changes default printer device driver assignment (for example, switching from LPT1 to LPT3 or 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 sent to STDOUT.

RTemplate:NbndT

Activates automatic system reboot upon encountering errors.
Permits inclusion of comments within CONFIG.SYS (ignored by PTS-DOS).
Reserves a drive letter for local block device drivers.
Defines the default Resume () character displayed in prompts.
Returns control from nested CONFIG.SYS processing to the previous GOSUB or SWITCH statement, optionally passing a return code.
Sets the size of real mode memory.
Enables concurrent loading of programs in CONFIG.SYS, functioning similarly to CALL or INSTALL commands in DOS environments.
Saves the initial character of deleted files in the FAT reserved area.
Determines video mode under FreeDOS or specifies screen access methods for PTS-DOS.
Controls the keyboard Scroll Lock key state (on or off).
Assigns environment variables.
Loads the command interpreter shell.
Functions like SHELL but includes a SIZE parameter to pre-allocate the resident portion of COMMAND.COM in HMA or UMBs, minimizing fragmentation with third-party shells.
Specifies keyboard modifier states such as Shift Lock, Num Lock, Scroll Lock, and Insert mode.
Indicates whether files should close when pressing Ctrl+Alt+Del.
Bypasses POST during system reboot.
, STACKSIZE, STACKSHIGH
Define stack-related parameters across various DOS platforms and versions, influencing interrupt handling and memory allocation techniques.
, SYSBOOT, SYSGEN, SYSLOAD
PTS-DOS commands that manage boot configurations and specify memory locations for system components.
, SWITCH, SWITCHES
Control conditional execution or submenu blocks within CONFIG.SYS scripts, enhancing modularity depending on DOS version.
, SWAPPATH, THREADS, TIMESLICE
OS/2 directives managing error logging paths, swap file locations, thread concurrency, and scheduler time slices.
, TRACE, TRACEBUF
Set prompt timeouts, enable single-step execution of CONFIG.SYS and AUTOEXEC.BAT scripts, and configure trace buffer sizes—key tools for debugging startup processes.
Additional directives such as TMPEXT (temporary file extensions), TRAPDUMP (error logging), and SXFAKEHWFPU (FPU bug workaround) define specialized behaviors primarily under OS/2 or PTS-DOS environments.

UTemplate:NbndZ

Directs DOS to use a specified segment as Upper Memory Block (UMB) memory.
Configures which UMB server is utilized.
Defines address ranges designated as UMB RAM.
Enables or disables verification of disk writes.
Sets the DOS version reported to applications.
Manages VGA display status settings.
Specifies the active video mode.
Enables usage of virtual DMA operations.
Controls processor Virtual Mode Extensions (VME).
Configures VxD driver parameters for Windows environments.
Sets system support options for Windows operating systems.
Manages relocation of the Extended BIOS Data Area (XBDA).
Enables conditional execution on XT-compatible hardware platforms.
Activates built-in Year 2000 compliance support.
Defines the default affirmative character used in prompts.
Configures tracking for file deletions.

Issues

Although the system may boot without a CONFIG.SYS file or if it is damaged, this file together with AUTOEXEC.BAT is crucial for comprehensive DOS startup and customization. These configuration files define essential system and application requirements that are critical in business settings relying on tailored environments. When these files become corrupted, troubleshooting is necessary.

In cases where CONFIG.SYS lacks a SHELL directive or is missing/corrupted, DOS attempts to locate COMMAND.COM in the root directory of the boot drive. Versions prior to 6.0 will not boot without this file. However, MS-DOS 6.0/PC DOS 6.1 and Novell DOS 7 and later versions prompt users to specify a command interpreter path, offering limited recovery options without restarting. Since MS-DOS 7.0+ COMMAND.COM does not work with DR-DOS systems, DR-DOS 7.02 and newer enforce SHELL directives during skip/trace/step modes to prevent conflicts in dual-boot configurations.

CONFIG.SYS file size constraints vary by system: MS-DOS and PC DOS limit this to 64 KB in recent releases, whereas DR-DOS imposes no fixed size limit beyond that of the underlying file system. This flexibility arises from DR-DOS’s line-by-line directive processing approach, allowing precise control over loading order of drivers and TSRs—important for resolving conflicts or debugging—and enabling dynamic flow adjustments based on hardware detection or errors. Additionally, the INSTALL directive facilitates incorporation of non-resident software within CONFIG.SYS workflows.

The maximum length of the SHELL command line was originally capped at 31 characters in early MS-DOS versions but later expanded up to 128 characters. DR-DOS supports even longer lines up to 255 characters. It is important to note that CONFIG.SYS directives do not accept long filename formats.

Dual Booting with 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, enabling dual boot functionality between Windows 9x and DOS. Selecting the DOS boot option temporarily restores these original filenames. Additionally, Windows 95 configuration files are saved as CONFIG.W40 and AUTOEXEC.W40.

In cases where Caldera DR-DOS versions 7.02 or 7.03 coexist with Windows 95, the Windows CONFIG.SYS and AUTOEXEC.BAT files remain unaltered. Instead, DR-DOS manages its startup settings through DCONFIG.SYS and AUTODOS7.BAT.

OS/2 and Windows NT

OS/2 extensively utilizes CONFIG.SYS to set up drivers and environment variables before launching its graphical user interface.

Within the OS/2 subsystem of Windows NT, CONFIG.SYS is presented to OS/2 applications but is actually maintained within the system registry.

OS/2 employs several undocumented CONFIG.SYS commands.

CONFIG.SYS continues to be a fundamental component in OS/2-based systems such as eComStation and ArcaOS.

See also

External links

  • Comprehensive details 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) – partial list of DR-DOS 7 directives
  • Documentation of FreeDOS CONFIG.SYS commands
  • User manual for PTS-DOS 2000 Pro including partial CONFIG.SYS directives
  • German-language unofficial PTS-DOS FAQ (archived) – additional CONFIG.SYS commands