DISKCACHE (CONFIG.SYS directive)
| Company type | Configuration file |
|---|---|
| Industry | Computer software |
| Founded | 1983 (introduced in DOS version 2.0) |
| Products | System configuration for DOS and OS/2 |
CONFIG.SYS serves as the central configuration file for DOS and OS/2 operating systems. This plain ASCII text document contains setup instructions that the OS's DOS BIOS interprets during the startup process. CONFIG.SYS was first introduced in DOS version 2.0.
Usage
The directives within CONFIG.SYS are used to set up DOS for hardware devices, software applications, and memory management utilities. Once CONFIG.SYS has been processed, DOS launches the command interpreter specified in the SHELL directive; if none is specified, it defaults to COMMAND.COM, which then executes commands from AUTOEXEC.BAT.
Typically, the file consists of name=value statements that define configurable parameters or load device drivers and terminate-and-stay-resident (TSR) programs. It is located in the root directory of the system's boot drive.
Certain DOS variants look for alternative filenames that override CONFIG.SYS:
- More recent editions of Concurrent DOS 386, Concurrent DOS XM, Multiuser DOS, and REAL/32 prioritize CCONFIG.SYS or CCONFIG.INI, with settings maintained in a binary file named CCONFIG.BIN, usually edited through CONFIG.EXE.
- From DR DOS 3.31 onward (including PalmDOS 1.0, Novell DOS 7, OpenDOS 7.01), DCONFIG.SYS supersedes CONFIG.SYS. This feature facilitates disk compression and multi-boot configurations by managing multiple configuration files simultaneously.
- OpenDOS 7.01 and DR-DOS 7.02 also check for the presence of ODCONFIG.SYS, and occasionally DRCONFIG.SYS.
Starting with DR DOS 6.0, users can alter default system file extensions using SYS /DR:ext, allowing multiple sets of system files to coexist and be selected via boot loaders such as LOADER. The SHELL command supports specifying alternate AUTOEXEC.BAT files using /P[:filename.ext]. Additionally, the CHAIN=filespec instruction enables continuation of configuration parsing from other files, with label support introduced in DR-DOS 7.02 and later.
From DR-DOS 7.03 onward, the SYS /A command copies CONFIG.SYS and AUTOEXEC.BAT along with system files.
Other DOS variants offer comparable functionality: FDCONFIG.SYS in FreeDOS, RXCONFIG.SYS in RxDOS, and CONFIG.PTS in PTS-DOS.
In Windows 95 and Windows 98, CONFIG.SYS and AUTOEXEC.BAT remain present in the root of the boot drive but are generally left blank. In contrast, Windows Me does not parse CONFIG.SYS during startup; instead, it retrieves environment variables directly from the Windows Registry.
Within FlexOS, CONFIG.SYS takes the form of a binary file that specifies resource managers and device drivers.
Example
An MS-DOS 5 example CONFIG.SYS: <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 serving as jump points for , , , , and commands.
- Functions similarly but also allows inline comments following other directives. (Note: In MS-DOS/PC DOS, inline comments inside quotation marks are not ignored.)
- Used to start inline comments alongside the ; directive.
- Prompts a Yes/No confirmation before executing subsequent directives. (FreeDOS does not support custom messages but includes conditional processing with boot menus.)
- Executes the next directive unconditionally.
ATemplate:NbndC
- Determines if programs should be terminated upon encountering errors.
- Sets which drives record file access timestamps within FAT file systems.
- Enables conditional execution specifically on AT-compatible hardware.
- Manages the boot process.
- Adjusts the verbosity level of error messages.
- Changes the default serial driver assigned to the AUX device.
- Prevents access to character devices outside the virtual \DEV directory.
- Loads a fundamental device driver into memory.
- Produces an audible beep even when notifications are disabled.
- Indicates the operating system designated for the next boot cycle.
- Enables or disables extended Ctrl+C detection.
- Defines the number of disk buffers allocated.
- Similar to BUFFERS but allocates buffers within HMA or UMB memory areas.
- , ,
- Parameters for managing cache behavior.
- Loads programs listed in CONFIG.SYS and pauses processing until completion.
- Sets the keyboard's Caps Lock state.
- ,
- Configures CD-ROM driver parameters and buffer sizes.
- Continues processing CONFIG.SYS from a different file or label.
- , , , etc., control system display settings, codepage configurations, and boot menu options.
- , ...,
- Manages serial COM port settings including quantity, sequence, I/O addresses, and timeout durations.
Additional commands allow for detailed configuration of device buffers, CPU-specific conditional execution (such as CPU386), internationalization support (COUNTRY), cursor positioning (CPOS), and keyboard status control (CAPSLOCK). These facilitate precise system tuning to enhance performance and ensure compatibility across various hardware platforms.
DTemplate:NbndF
- Adjusts relocation settings for drive descriptor tables.
- Defines the memory segment limit for multi-sector disk data deblocking operations.
- Activates internal debugging capabilities.
- Controls boot management functions.
- Loads a device driver into standard memory.
- Loads a device driver into upper memory areas (equivalent to in DRDOS 5.0).
- Sets country and codepage parameters for keyboard, screen, and printer devices.
- Configures cache memory allocation sizes.
- Specifies compatibility modes for floppy disk drives.
- Selects the display font used by the system.
- Determines whether DOS is loaded into high memory and/or utilizes upper memory blocks (similar to in DRDOS 5.0).
- Loads DOS tables such as BUFFERS, FCBS, FILES, LASTDRIVE, and STACKS into upper memory regions.
- Defines an alternate directory path for DOS system files.
- Specifies search directories for data files.
- Details physical characteristics of disk drives.
- Establishes parameters for drives not recognized by default settings.
- Refer to .
- Enables error logging via PDUMP.nnn files on a specified drive.
- Outputs a message on the display screen.
- Displays messages incorporating ANSI escape codes.
- Controls whether additional verification occurs when launching programs.
- Sets a predefined error or return code for subsequent operations.
- Configures the A20 gate state during program startup.
- Terminates CONFIG.SYS processing before reaching the file’s end, except under certain conditions involving SWITCHES and SHELL commands.
- Defines hash table size used to accelerate file opening—distinct from the external MS-DOS/PC DOS FASTOPEN utility.
- Specifies how many File Control Blocks (FCBs) can be opened concurrently (FCBS and FILES share internal buffers in DR-DOS).
- Functions like FCBS but explicitly loads FCBs into upper memory space.
- Boot manager utility command.
- Sets the maximum number of simultaneously open files allowed by the system.
- Operates like FILES but ensures file handles are loaded into upper memory explicitly.
- Executes designated subsections within CONFIG.SYS (see IGNORE).
GTemplate:NbndI
- Waits for a key press or timeout, then assigns the error level to the ASCII value or 1024 if timed out.
- Resumes processing of CONFIG.SYS at a given label.
- Continues nested CONFIG.SYS processing at a specified label, returning afterward to the previous point.
- Refer to , , or for additional details.
- See also .
- Consult .
- Refer to or for further information.
- See or for related commands.
- Consult .
- Loads a TSR program into memory following DOS data segment relocation. Compare with INSTCDEX.
- See , , or for more information.
- Refer to .
- See or for additional context.
- Activates console and command line history buffer with enhanced pattern searching capabilities.
- Defines the HMA segment address.
- Configures the HLT power-saving mode.
- Performs boot sector virus scanning during startup.
- Loads installable file system drivers.
- Prevents execution of specified subsections within CONFIG.SYS.
- Permits designated programs to execute at ring 2, allowing direct hardware I/O access.
- Incorporates directives from another menu block (simulated by GOSUB/RETURN in DR-DOS).
- Sets the keyboard Insert mode status.
- Loads a TSR program into memory.
- Installs a TSR program into upper memory (similar to HIINSTALL in DR DOS 5.0).
- Loads a TSR program after relocating the DOS data segment, akin to INSTALL.
- Adjusts PIC controller interrupt priorities to prioritize a specified IRQ number.
KTemplate:NbndM
- Defines the keyboard layout configuration.
- Sets the address for the relocated keyboard buffer.
- Specifies the maximum number of accessible drives.
- Functions like LASTDRIVE but loads Current Directory Structure into upper memory.
- Lists paths for DLL searches.
- Manages compatibility settings for legacy applications.
- Determines the number of file locks allowed.
- Enables boot logo support and startup messages with PTS-DOS boot manager integration.
- Configures count, order, I/O address, and timeout parameters for LPT1 device.
- Same configuration as LPT1 but applied to LPT2 device.
- Same as LPT1 but targeting LPT3 device.
- Enables and configures LPT4 device similarly to others.
- Sets delay before increasing process priority level.
- Configures strategies for memory allocation management.
- Specifies default methods for DOS memory allocation.
- Defines menu option settings.
- Sets color schemes for menus (can be emulated in DR-DOS).
- Specifies default menu block (emulatable in DR-DOS).
- Defines menu blocks (can be emulated in DR-DOS).
- Enables or disables multitrack disk read/write operations.
- Continues processing CONFIG.SYS from a new file, optionally after loading a device driver and setting %NEWFILE% variable.
NTemplate:NbndQ
- Sets default No () character used in Yes/No/Resume prompts.
- Controls keyboard Num Lock state (on or off).
- Enables conditional execution depending on last error code, e.g., .
- Shows a message and waits for user key press, similar to and commands in DR-DOS.
- Requires user confirmation of errors encountered in CONFIG.SYS processing.
- Configures buffer size settings for LPT ports.
- Allows conditional execution on PC-compatible systems.
- Sets scheduler priority levels.
- Defines priority for disk I/O-related programs.
- Changes default printer device driver from LPT1 to either LPT3 or LPT4.
- Specifies whether DOS applications are permitted to run.
- Loads user interface shell program.
- Enables conditional execution on IBM PS/1-compatible hardware.
- Enables conditional execution on IBM PS/2-compatible hardware.
- Suppresses output display directed to STDOUT.
RTemplate:NbndT
- Activates automatic system reboot upon encountering errors.
- Permits inclusion of comments within CONFIG.SYS (not processed by PTS-DOS).
- Allocates drive letters for local block device drivers.
- Sets the default Resume () response character in Yes/No/Resume prompts.
- Returns control from nested CONFIG.SYS processing back to the previous GOSUB or SWITCH location, optionally providing a return code.
- Defines the amount of real mode memory available.
- Loads applications in the background during CONFIG.SYS execution, functioning similarly to CALL or INSTALL commands under DOS.
- Determines whether the initial character of deleted files is preserved in the FAT reserved area.
- Specifies video mode settings (in FreeDOS) or screen access methods (in PTS-DOS).
- Sets the Scroll Lock key status on the keyboard to either on or off.
- Establishes environment variables for the system session.
- Loads the command interpreter shell.
- Similar to SHELL but includes a size parameter to pre-allocate COMMAND.COM into HMA or UMBs, thereby minimizing memory fragmentation.
- Defines keyboard modifier key states such as Shift Lock and Num Lock.
- Controls whether files are closed automatically when Ctrl+Alt+Del is pressed.
- Skips the Power-On Self-Test (POST) during reboot sequences.
- , STACKSIZE, STACKSHIGH, STACK
- Various stack-related parameters across DOS versions primarily for compatibility with hardware interrupts and thread stack management.
- , SYSBOOT, SYSGEN, SYSLOAD, SYSTOUMB
- Directives unique to PTS-DOS managing boot configurations, system memory placement, and loading modules into upper memory blocks (UMBs).
- , SWITCH
- Control flow commands for nested CONFIG.SYS processing with conditional jumps based on key input (specific to DR-DOS).
- , SWAPPATH, THREADS, TIMESLICE
- OS/2 directives handling error popup behavior, swap file locations, thread concurrency levels, and scheduler time slicing.
- , SWITCHES
- Define the system’s switch characters ('/' or '-') and special options applicable to DOS variants other than PTS-DOS.
- , TRAPDUMP
- OS/2 Warp fixes addressing FPU bugs and enabling detailed error logging capabilities.
- , TRACE, TRACEBUF
- Configure timeouts for steps within CONFIG.SYS processing and activate trace logging features across DR-DOS, PTS-DOS, FreeDOS, and OS/2 platforms with variant-specific implementations.
- , SAVENAME
- Specifies temporary file extensions (PTS-DOS) and governs file deletion policies related to FAT file system management.
This segment details essential CONFIG.SYS directives utilized for configuring system behavior across various DOS platforms including DR-DOS, PTS-DOS, FreeDOS, Novell DOS, MS-DOS, and OS/2. These commands provide enterprises with tools to tailor boot sequences, memory allocation strategies, device prioritization, error recovery procedures, shell initialization methods, and hardware compatibility—vital for optimizing legacy systems in embedded or specialized computing scenarios.
UTemplate:NbndZ
- Assigns a specific memory segment as an Upper Memory Block (UMB) for DOS usage.
- Configures the Upper Memory Block server functionality.
- Defines address ranges designated as UMB RAM areas.
- Enables or disables verification of disk writes.
- Sets the DOS version string reported to applications.
- Manages VGA display operational status.
- Specifies current video mode settings comparable to FreeDOS’s SCREEN directive.
- Controls usage of virtual DMA channels.
- Manages processor Virtual Mode Extensions (VME) features.
- Configures VxD drivers for Windows environments.
- Sets system support parameters for Windows integration.
- Handles relocation of the Extended BIOS Data Area (XBDA).
- Executes conditionally on XT-class compatible machines.
- Enables built-in Year 2000 compliance support mechanisms.
- Defines default affirmative response character in prompt dialogs.
- Controls tracking behavior for file deletions.
Challenges
Although the operating system can start without CONFIG.SYS or AUTOEXEC.BAT, these files are crucial for comprehensive OS customization and meeting software demands. If these files become damaged or corrupted, diagnosing and resolving issues is necessary.
In cases where CONFIG.SYS does not contain a SHELL directive or if the file 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 if COMMAND.COM is not found, whereas MS-DOS 6.0, PC DOS 6.1, and Novell DOS 7 and later will prompt the user to specify a command processor path. This prompt also appears if COMMAND.COM terminates unexpectedly or is intentionally exited, enabling a limited shell substitution during runtime without requiring a reboot.
COMMAND.COM from MS-DOS 7.0 and newer is incompatible with DR-DOS but is commonly located in C:\ within dual-boot environments. Starting with DR-DOS 7.02, SHELL directives are strictly enforced during skip, trace, and step modes to avoid circumvention. Certain keys restore previous skip behavior to recover from invalid SHELL parameters. If no valid SHELL directive is detected during skip processing, users must input a correct shell filename before COMMAND.COM loads.
The maximum CONFIG.SYS file size depends on the operating system version: MS-DOS and PC DOS limit it to several kilobytes (up to 64 KB in later releases), while DR-DOS imposes no practical size restriction due to its line-by-line parsing method. MS-DOS converts CONFIG.SYS into a tokenized format that processes directives in a fixed sequence—loading drivers before TSRs—whereas DR-DOS executes commands sequentially, providing enhanced control over the order of driver and TSR loading as well as supporting conditional operations based on hardware detection, user input, error states, or return values. This adaptability allows for the integration of temporary external utilities through INSTALL.
Early versions of MS-DOS restricted the length of the SHELL command line to 31 characters; subsequent versions increased this limit 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 Between DOS and Windows 9x
When Windows 95 is installed over an existing DOS or Windows configuration, it renames CONFIG.SYS and AUTOEXEC.BAT to CONFIG.DOS and AUTOEXEC.DOS respectively to enable dual-boot functionality between Windows 9x and DOS environments. During a DOS boot, these files are temporarily renamed back to their original filenames, while the Windows 95 versions are preserved under the names CONFIG.W40 and AUTOEXEC.W40.
In systems where Caldera DR-DOS 7.02 or 7.03 coexists with Windows 95, Windows’ CONFIG.SYS and AUTOEXEC.BAT remain unaltered. Instead, DR-DOS employs DCONFIG.SYS and AUTODOS7.BAT for its startup configuration.
OS/2 and Windows NT
OS/2 relies heavily on CONFIG.SYS for driver setup and environment configuration prior to launching its graphical user interface. Within the OS/2 subsystem on Windows NT, the equivalent configuration data is maintained in the system registry rather than in a traditional CONFIG.SYS file.
There exists a variety of undocumented CONFIG.SYS commands used specifically for OS/2 setups. CONFIG.SYS continues to play a vital role in OS/2-based 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 available at Computer Hope
- Overview of Windows 98 / MS-DOS 7.10 CONFIG.SYS commands (archived)
- Caldera’s CONFIG.SYS Command Guide (archived) – summary of DR-DOS 7 instructions
- Details on FreeDOS CONFIG.SYS commands
- User Manual for PTS-DOS 2000 Pro including CONFIG.SYS command descriptions
- Unofficial German-language PTS-DOS FAQ (archived) featuring CONFIG.SYS information