BUFFERS (CONFIG.SYS directive)
| Company type | Configuration file |
|---|---|
| Industry | Operating systems |
| Founded | 1983 |
| Products | Configuration instructions for DOS and OS/2 |
CONFIG.SYS serves as the central configuration file for DOS and OS/2 operating systems. This specialized ASCII text file holds setup instructions accessible to users, which the operating system's DOS BIOS—commonly found in IBMBIO.COM or IO.SYS—interprets during the boot sequence. CONFIG.SYS was first introduced with DOS version 2.0.
Usage
Within CONFIG.SYS, directives configure DOS to manage devices, applications, and memory allocation. Once CONFIG.SYS is processed, DOS initiates the command shell specified by the SHELL directive, defaulting to COMMAND.COM if none is provided. Subsequently, this shell executes the commands in AUTOEXEC.BAT.
The file primarily contains name=value entries that set adjustable parameters, allocate memory segments, 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 boot drive.
The name CONFIG.SYS is also used by (DCP), an MS-DOS variant developed by East-German VEB Robotron.
Certain DOS distributions examine alternative filenames that can supersede CONFIG.SYS:
Earlier versions of Concurrent DOS (3.2 through 4.1) did not support CONFIG.SYS; however, later iterations—including Concurrent DOS 386/XM, Multiuser DOS, System Manager, and REAL/32—utilize CCONFIG.SYS, with some Multiuser DOS editions employing CCONFIG.INI. REAL/32 looks for a file named MCONFIG.SYS. These platforms provide enhanced configuration options saved in a binary format called CCONFIG.BIN, which can be edited using CONFIG.EXE.
Starting with DR DOS version 3.31 and subsequent releases such as PalmDOS 1.0, Novell DOS 7, OpenDOS 7.01, and DR-DOS 7.02+, the system prioritizes DCONFIG.SYS over CONFIG.SYS. This approach facilitates multi-boot configurations and addresses drive letter changes caused by disk compression drivers loading after boot. Additionally, OpenDOS 7.01 and DR-OpenDOS 7.02 recognize ODCONFIG.SYS, while select DR-DOS 7.02+ editions also check for DRCONFIG.SYS.
From DR DOS 6.0 onward, the SYS /DR:ext command enables modification of default system file extensions, permitting multiple distinct sets of system files to coexist within a single root directory and be selected via boot loaders like LOADER included with Multiuser DOS and DR-DOS 7.x. The SHELL directive supports specifying alternative AUTOEXEC.BAT filenames using /P[:filename.ext], and COMMAND.COM accepts extensions other than ".BAT" when operating in this mode (a feature also available in 4DOS). The CHAIN=filespec command allows configuration processing to continue from another file located anywhere on the boot drive; DR-DOS 7.02 and later versions add a label parameter to enable jumping to specific sections within these files.
Versions of DR-DOS starting from 7.03 support the SYS /A option to copy matching CONFIG.SYS and AUTOEXEC.BAT files alongside system files during installation.
Other systems employ similarly named configuration files: FreeDOS uses FDCONFIG.SYS; RxDOS version 7.24 and above utilize RXCONFIG.SYS; and PTS-DOS relies on CONFIG.PTS.
Although both CONFIG.SYS and AUTOEXEC.BAT exist on Windows 95 and Windows 98 boot drives due to their DOS heritage, they are generally left empty. In contrast, Windows Me does not process CONFIG.SYS at startup; instead, environment settings are loaded from the Windows Registry at HKLM\System\CurrentControlSet\Control\SessionManager\Environment.
For FlexOS, CONFIG.SYS is a binary configuration file that specifies resource managers and device drivers to be loaded during system initialization.
Example
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>
:;*?!
- Serves as a label definition within CONFIG.SYS, acting as a jump target for commands like , , , , and .
- Functions similarly to , also utilized for inline comments following other directives. (In MS-DOS/PC DOS, inline comments enclosed in double quotes are not ignored.)
- Used alongside ; to initiate inline comments.
- Prompts with a Yes/No confirmation before executing subsequent CONFIG.SYS commands. (FreeDOS does not support custom messages but allows conditional execution via boot menus.) DOS 6.0 and later versions offer a comparable feature by appending after directives (e.g., ).
- Executes the following CONFIG.SYS directive without conditions.
ATemplate:NbndC
- Determines whether programs can be interrupted upon encountering errors.
- Specifies which drives record file access timestamps within FAT file systems.
- Enables conditional execution on AT-compatible hardware.
- Boot manager utility.
- Adjusts the verbosity level of error messages.
- Alters the default serial device driver assignment (from COM1: to COM4:) for the AUX device.
- Prevents character devices from being accessible outside the virtual \DEV directory.
- Loads a base device driver into memory.
- Produces a brief beep even if audible alerts are disabled.
- Defines the operating system to boot subsequently.
- Enables or disables extended Ctrl+C checking.
- Sets the quantity of disk buffers to allocate.
- Similar to BUFFERS but loads buffers into High Memory Area or Upper Memory Blocks.
- , ,
- Configure cache size and timing parameters.
- Loads specified programs during CONFIG.SYS processing, pausing until they return control.
- Determines keyboard Caps Lock status at startup.
- ,
- Specifies CD-ROM driver name along with buffer count.
- Continues processing CONFIG.SYS from another file or label.
- , , , etc., manage system clock settings, screen clearing, OEM code pages, among others.
Additional directives handle serial port configurations (COM1-COM4), keyboard behavior adjustments, device driver loading, and conditional execution based on CPU type or system setup. These support diverse hardware environments and optimize system boot procedures for critical business applications.
DTemplate:NbndF
- Sets relocation parameters for drive descriptor tables.
- Defines memory segment address used for multi-sector disk data deblocking operations.
- Activates internal debugger features.
- Boot manager functionality.
- Loads a device driver into conventional memory.
- Loads a device driver into upper memory (equivalent to in DRDOS 5.0).
- Configures country and code page information for keyboard, screen, and printer devices.
- Adjusts cache memory sizes.
- Sets floppy disk compatibility mode.
- Specifies display font settings.
- Directs loading of DOS into high or upper memory (similar to in DRDOS 5.0).
- Loads DOS tables such as BUFFERS, FCBS, FILES, LASTDRIVE, STACKS into upper memory.
- Defines alternative search paths for DOS files.
- Specifies search path for data files.
- Describes physical parameters of disk drives.
- Sets parameters for unrecognized drives.
- Refer to .
- Enables error logging with PDUMP.nnn files and specifies drive location for logs.
- Displays messages on screen during boot or configuration.
- Shows messages incorporating ANSI escape sequences.
- Applies additional checks when launching programs.
- Assigns error or return codes for subsequent processes.
- Defines A20 gate state upon program start-up.
- Terminates CONFIG.SYS processing prior to file end (excluding SWITCHES and SHELL directives).
- Configures hash table size used for accelerated file open operations, differing from MS-DOS/PC DOS FASTOPEN driver behavior.
- Sets maximum number of cached File Control Blocks (FCBs) that can be open simultaneously (shares buffer with FILES under DR-DOS).
- {{nobold|(MS-DOS 7.0, DR-DOS 7.02+)} }
- Equivalent to FCBS but loads FCBs into upper memory space.
- Boot manager support directive.
- Specifies maximum number of files that can be open at once.
- Functions like FILES but loads file handles into upper memory areas.
- Includes execution of specified CONFIG.SYS subsections (see IGNORE).
GTemplate:NbndI
- Waits for a key press or timeout, assigning the error level to the ASCII value of the key or 1024 if timed out.
- Resumes CONFIG.SYS processing at a designated label.
- Continues nested CONFIG.SYS processing at a specified label and then returns to the previous point.
- Refer to , , or for additional details.
- Consult for further information.
- See for related commands.
- Refer to or for more context.
- See or for related usage.
- Consult for further details.
- Loads a TSR program into memory following DOS data segment relocation. Compare with INSTCDEX.
- Refer to , , or for more information.
- See for additional details.
- Refer to or as needed.
- Activates console and command line history buffers with enhanced pattern search capabilities.
- Defines the address of the HMA segment.
- Configures energy-saving options related to HLT instruction.
- Enables scanning of the boot sector for viruses.
- Loads installable file system drivers.
- Prevents execution of specified subsections within CONFIG.SYS.
- Permits certain applications to access hardware directly by modifying CPU ring levels.
- Incorporates directives from another menu block, emulated by GOSUB/RETURN in DR-DOS.
- Sets the status of keyboard Insert mode.
- Loads TSR programs into memory.
- Installs TSR programs into upper memory areas, equivalent to HIINSTALL in DR DOS 5.0.
- Loads TSR programs after relocating the DOS data segment. Compare with INSTCDEX.
- Adjusts PIC interrupt priorities to prioritize a specific IRQ number.
KTemplate:NbndM
- Defines the keyboard layout configuration.
- Specifies the location of the relocated keyboard buffer.
- Sets the maximum number of accessible drives.
- Similar to LASTDRIVE but loads Current Directory Structure (CDS) into upper memory regions.
- Designates DLL search directories.
- Manages compatibility settings for legacy applications.
- Configures the number of allowable file locks.
- Controls boot logo display using PTS-DOS boot manager functionality.
- Specifies count, sequence, I/O address, and timeout parameters for LPT1 device.[1]
- Equivalent settings as LPT1 but applied to LPT2.[1]
- Same as LPT1 configuration but for LPT3.[1]
- Enables and configures LPT4 device parameters.[1]
- Determines wait duration before elevating process priority.
- Sets memory allocation policies.
- Defines default DOS memory allocation strategy.
- Specifies available menu options.
- Sets menu color schemes (emulatable under DR-DOS).
- Defines default menu block (emulatable under DR-DOS).
- Creates a menu block (emulatable under DR-DOS).
- Enables operations on multitrack disks.
- Continues CONFIG.SYS processing in a new file after loading a device driver and setting the %NEWFILE% environment variable.[2]
NTemplate:NbndQ
- Sets the default No () character used in Yes/No/Resume prompts.
- Controls keyboard [[Num Lock|Template:Keypress]] status, turning it on or off.
- Executes commands conditionally based on the last error code, e.g., .
- Shows a message and waits for key press, similar to and commands in DR-DOS environments.
- Requires user confirmation of errors encountered in CONFIG.SYS processing.
- Adjusts buffer sizes for LPT port communications.
- Executes conditionally on PC-compatible systems only.
- Sets process scheduler priority levels.
- Assigns priority settings for disk I/O operations.
- Changes the default printer device driver among LPT1–LPT4 ports.
- Determines whether DOS applications are permitted to run.
- Loads a user interface shell program.
- Executes conditionally on IBM PS/1-compatible machines only.
- Executes conditionally on IBM PS/2-compatible machines only.
- Suppresses display output sent to STDOUT.
RTemplate:NbndT
- Automatically restarts system upon encountering errors.
- Permits inclusion of comments within CONFIG.SYS.
- Allocates drive letters for local block device drivers.
- Defines the default character for Resume () prompts in Yes/No/Resume queries.
- Returns control from nested CONFIG.SYS processing to the previous GOSUB or SWITCH point, optionally with a return code.
- Sets the size of real mode memory.
- Enables loading of programs in CONFIG.SYS simultaneously in the background, similar to INSTALL under DOS.
- Saves the first character of deleted files in the reserved FAT area.
- Determines video mode (FreeDOS) or screen access methods (PTS-DOS).
- Controls keyboard Scroll Lock state, turning it on or off.
- Establishes environment variables.
- Loads the command interpreter shell.
- Functions like SHELL but includes a pre-allocation size parameter allowing COMMAND.COM relocation into HMA or UMBs to minimize fragmentation.
- Specifies keyboard modifier key states such as Shift Lock, Num Lock, Scroll Lock, and Insert mode.
- Defines whether files close upon pressing Ctrl+Alt+Del.
- Bypasses POST during reboot.
- , STACKSIZE, STACKSHIGH
- Various stack configuration options across DOS versions tailored for hardware interrupt handling and memory management. Some parameters are disregarded in newer editions or specific systems like Embedded DOS and FreeDOS.
- , SYSBOOT, SYSGEN, SYSLOAD, SYSTOUMB
- Commands unique to PTS-DOS that manage boot options, system memory layout, and loading mechanisms including use of upper memory blocks (UMBs).
- , SUPPRESSPOPUPS, SWAPPATH, SWITCH
- Commands that control submenu behavior (DOS 6.0+), suppression of error pop-ups (OS/2), swap file directory paths, and nested CONFIG.SYS conditional processing with RETURN support (DR DOS 6.0+).
- , SWITCHES
- Define default switch characters ('/' or '-') and specialized options primarily for DOS and Novell DOS environments.
- , THREADS, TIMESLICE
- OS/2-specific settings addressing FPU bug fixes, thread concurrency limits, and scheduler time slice durations.
- , TRACE, TRACEBUF
- Manage timeouts for CONFIG.SYS commands and enable single-step execution with configurable log buffer sizes across DR-DOS, PTS-DOS, FreeDOS, and OS/2 variants.
- , TRAPDUMP
- PTS-DOS command controlling temporary file extensions and OS/2 error logging details.
UTemplate:NbndZ
- Assigns a specific memory segment as UMB (Upper Memory Block) space for DOS use.
- Configures the UMB management server.
- Defines address ranges designated as UMB RAM.
- Toggles disk write verification on or off.
- Specifies the DOS version reported to applications.
- Manages VGA display status settings.
- Sets the current video mode configuration.
- Enables virtual DMA (Direct Memory Access) capabilities.
- Disables processor Virtual Mode Extensions (VME).
- Configures VxD drivers for Windows environments.
- Sets system support parameters for Windows operation.
- Relocates the Extended BIOS Data Area (XBDA).
- Executes conditionally on XT-compatible hardware platforms.
- Enables built-in Year 2000 compliance support.
- Defines the default character used for Yes responses in prompts.
- Configures tracking of file deletions.
Issues
While the system can initiate startup without a CONFIG.SYS file present, this file along with AUTOEXEC.BAT is critical for comprehensive boot customization and meeting software prerequisites. Troubleshooting is necessary if these files are missing or corrupted.
If CONFIG.SYS lacks a SHELL directive or is damaged or absent, DOS attempts to locate COMMAND.COM in the root directory. Earlier versions prior to 6.0 fail to boot if COMMAND.COM cannot be found. From MS-DOS 6.0/PC DOS 6.1 onward and Novell DOS 7+, users are prompted to provide a valid command interpreter path if COMMAND.COM is missing, offering limited recovery without rebooting.
Due to incompatibilities between MS-DOS versions 7.0+ COMMAND.COM and DR-DOS implementations, DR-DOS version 7.02 and later restrict bypassing SHELL directives during skip, trace, or step modes. In such cases, users must specify a valid shell before loading COMMAND.COM from the root directory if no SHELL line exists.
CONFIG.SYS size restrictions vary by operating system: MS-DOS/PC DOS limits CONFIG.SYS size typically up to 64 KB, whereas DR-DOS imposes no fixed limit aside from file system constraints. MS-DOS compiles CONFIG.SYS into an internal tokenized format processed sequentially—device drivers first followed by TSRs—while DR-DOS interprets directives line-by-line allowing detailed control over loading order and conditional execution based on hardware detection or error conditions. This flexibility aids conflict resolution and debugger integration.
DR-DOS additionally supports executing non-resident software within CONFIG.SYS using the INSTALL command, providing enhanced configurability.
The maximum length of the SHELL command line is restricted to 31 characters in MS-DOS/PC DOS versions 2.0 through 4.01, extended to 128 characters in later releases, and up to 255 characters in DR-DOS. CONFIG.SYS directives do not support long filename syntax.
Dual Booting with DOS and Windows 9x
When Windows 95 is installed on top of a pre-existing DOS or Windows system, it renames the files CONFIG.SYS and AUTOEXEC.BAT to CONFIG.DOS and AUTOEXEC.DOS, enabling a dual-boot environment between Windows 9x and DOS. During a DOS boot, these files are temporarily restored to their original filenames. Additionally, backup copies of the Windows 95 configuration files are saved as CONFIG.W40 and AUTOEXEC.W40.
In cases where Caldera DR-DOS versions 7.02 or 7.03 are installed alongside Windows 95, the Windows CONFIG.SYS and AUTOEXEC.BAT remain intact without modification. Instead, DR-DOS relies on its own startup files named DCONFIG.SYS and AUTODOS7.BAT.
OS/2 and Windows NT
OS/2 heavily depends on CONFIG.SYS for setting up drivers and environment variables prior to launching its graphical user interface. Within the Windows NT OS/2 subsystem, the counterpart to CONFIG.SYS is maintained within the system registry. OS/2 supports a variety of CONFIG.SYS commands, many of which are not officially documented.
The use of CONFIG.SYS continues 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 at Computer Hope
- Overview of CONFIG.SYS directives for Windows 98 / MS-DOS 7.10 (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 containing CONFIG.SYS directives (archived)
- Unofficial German PTS-DOS FAQ (2004) including CONFIG.SYS directives (archived)