Jump to content

KEYBUF (CONFIG.SYS directive)

From Alfawiki
Adapted from the English Wikipedia article KEYBUF (CONFIG.SYS directive), available under CC BY-SA 4.0Updated 9 August 20251 source
CONFIG.SYS
Company typeConfiguration file
IndustryComputer software
Founded1983
ProductsSystem configuration for DOS and OS/2

CONFIG.SYS serves as the essential configuration file for both DOS and OS/2 operating system platforms. This distinctive ASCII text file contains setup commands accessible to users, which the operating system's DOS BIOS—usually found in IBMBIO.COM or IO.SYS—interprets during system initialization. The CONFIG.SYS file was first introduced with DOS version 2.0.

Usage

The directives within CONFIG.SYS are responsible for configuring DOS regarding hardware devices, software applications, and memory allocation. Once CONFIG.SYS has been processed, DOS proceeds to launch the command interpreter specified by the SHELL directive; if none is specified, it defaults to COMMAND.COM, which subsequently executes AUTOEXEC.BAT.

This configuration file primarily comprises name=value entries that define adjustable settings or load components such as device drivers and terminate-and-stay-resident programs (TSRs). CONFIG.SYS is located in the boot drive’s root directory.

The filename CONFIG.SYS is also utilized by (DCP), a variant of MS-DOS developed by East-German manufacturer VEB Robotron.

Certain DOS versions recognize alternative filenames that override CONFIG.SYS:

- Advanced editions of Concurrent DOS 386, Concurrent DOS XM, Multiuser DOS, System Manager, and REAL/32 employ CCONFIG.SYS or CCONFIG.INI (in Multiuser DOS) in place of CONFIG.SYS. REAL/32 may alternatively use MCONFIG.SYS. These platforms support supplementary configuration data saved in binary files like CCONFIG.BIN, which are generally edited via CONFIG.EXE.

- From version 3.31 onward, DR DOS and its successors—including PalmDOS, Novell DOS, and DR-DOS 7.x—prioritize DCONFIG.SYS over CONFIG.SYS. Initially intended for disk compression purposes, this feature facilitates multiple configuration files useful in multi-boot setups.

- OpenDOS 7.01 and DR-OpenDOS 7.02 also check for the presence of ODCONFIG.SYS or DRCONFIG.SYS files.

Starting with DR-DOS 6.0, users can modify the default extension for configuration files using the command SYS /DR:ext, allowing simultaneous sets of system files selectable through boot loaders like LOADER found in Multiuser DOS and DR-DOS 7.x. The SHELL directive supports specifying alternate AUTOEXEC.BAT filenames via /P[:filename.ext], with COMMAND.COM accepting extensions other than .BAT under this scheme.

In DR-DOS 6.0 and later, the CHAIN=filespec command enables continuation of processing from another configuration file, optionally targeting specific labels (CHAIN=filespec,label) in versions 7.02 and above. Furthermore, DR-DOS 7.03+ introduces a SYS /A option to copy both CONFIG.SYS and AUTOEXEC.BAT alongside other system files.

Other DOS variants include FDCONFIG.SYS for FreeDOS, RXCONFIG.SYS for RxDOS, and CONFIG.PTS used by PTS-DOS.

Within the root directory of boot drives on both Windows 95 and Windows 98, CONFIG.SYS and AUTOEXEC.BAT exist but are commonly left empty. Unlike these, Windows Me does not process CONFIG.SYS during startup but instead retrieves environment variables directly from the Windows Registry at HKLM\System\CurrentControlSet\Control\SessionManager\Environment.

In the case of FlexOS, CONFIG.SYS is formatted as a binary file that specifies resource managers and device drivers to be loaded during boot time.

Example

Here 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>

:;*?!

Used to define labels within CONFIG.SYS, serving as jump points for directives such as , , , and .
Functions similarly to , also utilized for inline comments following other commands. (Note that MS-DOS/PC DOS does not disregard inline comments enclosed in double quotes.)
Introduces inline comments alongside the ; directive.
Prompts the user with a Yes/No confirmation before executing subsequent CONFIG.SYS instructions.[1] (While FreeDOS does not support optional messages, it allows conditional execution with boot menus.) Starting with DOS 6.0, similar behavior is achieved by appending after directives (for example, ).
Forces unconditional execution of the next directive.

ATemplate:NbndC

Determines whether programs can be terminated upon encountering errors.
Enables drives to record file access dates within FAT directory entries.
Executes conditionally on AT-compatible systems.
Provides boot management functionality.
Controls the verbosity level of error messages.
Alters the default internal serial device driver assignment (COM1: through COM4:) for the AUX device.
Prevents character device access outside the phantom \DEV directory.
Loads a fundamental device driver into memory.
Produces a brief beep even if notifications are suppressed via SWITCHES=/Q.
Specifies which operating system to boot next.
Enables or disables extended Ctrl+C detection.
Defines the quantity of disk buffers allocated.
Similar to BUFFERS but loads buffer memory into HMA or UMB regions.
, ,
Manage cache block allocation parameters, timeouts, and flush intervals.
Loads programs during CONFIG.SYS processing and runs them in the foreground, pausing further processing until completion.
Sets the keyboard Caps Lock state.
,
Defines CD-ROM driver name and buffer quantity.
Continues processing of CONFIG.SYS from another file or label.
, , , etc.
Various system configuration options tailored to specific OS versions and hardware setups.

[Additional directives omitted for conciseness]

DTemplate:NbndF

Adjusts relocation settings for drive descriptor tables.
Assigns memory segment addresses for multi-sector disk data deblocking operations.
Activates internal debugger capabilities.
Provides boot management features.
Loads a device driver into standard memory.
Loads a device driver into upper memory (equivalent to in DRDOS 5.0).
Configures country and codepage information relevant to KBD, SCR, and LPT devices.
Sets cache memory sizes for improved performance.
Defines floppy disk compatibility modes.
Specifies display font settings.
Controls loading of DOS into high or upper memory areas (similar to under DRDOS 5.0).
Loads DOS tables such as BUFFERS, FCBS, FILES, LASTDRIVE, and STACKS into upper memory regions.
Designates an alternative search path for DOS files.
Defines search paths for data files.
Specifies physical parameters for disk drives.
Sets parameters for drives not recognized by default configurations.
Refer to .
Enables and specifies the drive location for PDUMP.nnn error log files.
Outputs a message onto the screen.
Displays messages that include ANSI Escape sequences.
Determines whether additional verification occurs when launching programs.
Assigns an expected error or return code for subsequent commands.
Controls A20 gate state upon program startup.
Terminates CONFIG.SYS processing prior to file end (except under certain conditions involving SWITCHES and SHELL directives).
Defines hash table size to accelerate file open operations, differing from MS-DOS/PC DOS FASTOPEN driver behavior.
Specifies the number of cached File Control Blocks (FCBs) allowed open concurrently (shares buffer space with FILES under DR-DOS).
Functions like FCBS but explicitly loads FCBs into upper memory areas.
Provides boot manager capabilities.
Sets maximum number of simultaneously open files.
Similar to FILES but explicitly loads file handles into upper memory regions.
Includes execution of designated CONFIG.SYS subsections (see IGNORE).

GTemplate:NbndI

Pauses for a key press or timeout, returning error level as ASCII code or 1024 if timed out.
Resumes CONFIG.SYS processing at the indicated label.
Continues nested CONFIG.SYS processing at a specified label, restoring to the previous position.
Refer to , , or for additional details.
Consult for further information.
See for related usage.
Refer to or for more context.
See or for specifics.
Consult for guidance.
Loads a terminate-and-stay-resident (TSR) program into memory following relocation of the DOS data segment. For comparison, see INSTCDEX.
Refer to , , or for related commands.
See for additional options.
Consult or for further details.
Activates console and command line history buffer along with extended pattern search capabilities.
Defines the address of the High Memory Area (HMA) segment.
Configures energy-saving mode using the HLT instruction.
Specifies system checks for boot sector viruses during startup.
Loads installable file system drivers.
Prevents execution of designated CONFIG.SYS subsections.
Grants certain programs permission to operate at ring 2, allowing direct hardware input/output access.
Incorporates directives from another menu block, emulated through GOSUB/RETURN in DR-DOS environments.
Sets the status of the keyboard's Insert mode.
Installs a TSR program into memory.
Loads a TSR program into upper memory blocks (equivalent to HIINSTALL in DR DOS 5.0).
Installs a TSR after relocating the DOS data segment (see also INSTCDEX).
Adjusts PIC interrupt priorities to assign highest priority to a specified IRQ line.

KTemplate:NbndM

Defines the keyboard layout configuration.
Sets the address for the relocated keyboard buffer area.
Establishes the maximum number of accessible drives.
Similar to LASTDRIVE but additionally loads Current Directory Structure into upper memory space.
Lists paths used when searching for DLL files.
Manages compatibility settings for legacy software applications.
Specifies the count of file locks permitted concurrently.
Controls display of boot logos and startup messages during system initialization.
Defines count, sequence, I/O port address, and timeout parameters for the LPT1 device.
Applies the same configurations as LPT1 but targets the LPT2 device instead.
Mirrors LPT1 settings but applies them to LPT3 device configuration.
Enables and configures the LPT4 device similarly to preceding LPT devices.
Sets delay duration before increasing process priority level.
Determines memory allocation strategy settings within DOS environment.
Specifies default strategy used by DOS for memory allocation tasks.
Defines available menu options presented during boot or configuration phases.
Configures menu color schemes, with emulation support under DR-DOS systems.
Selects default menu block, with emulation capabilities under DR-DOS environments.
Establishes a menu block structure, emulated within DR-DOS implementations.
Enables disk operations across multiple tracks simultaneously.
Continues processing CONFIG.SYS directives from a new file after loading a driver and sets %NEWFILE% environment variable accordingly.

NTemplate:NbndQ

Sets the default character representing No () in Yes/No/Resume prompt dialogs.
Controls whether keyboard Num Lock is enabled or disabled on startup.
Enables conditional execution based on previous error code status, such as .
Displays text message and waits for user key press, comparable to DR-DOS's and commands.
Requires user confirmation upon encountering errors within CONFIG.SYS processing.
Configures buffer size parameters for LPT port communications.
Allows conditional execution specifically on PC-compatible hardware platforms.
Sets priority level assigned to system scheduler operations.
Determines priority level allocated for disk input/output tasks.
Changes default printer device driver assignment among LPT1 through LPT4 ports.
Specifies whether DOS programs are permitted to execute within current environment settings.
Loads a user interface shell program during system initialization phase.
Enables conditional execution exclusively on IBM PS/1-compatible machines.
Enables conditional execution exclusively on IBM PS/2-compatible machines.
Suppresses standard output display by muting STDOUT stream.

RTemplate:NbndT

Enables automatic reboot following system errors.
Permits inclusion of comments within CONFIG.SYS.
Reserves drive letters for block device drivers.
Defines the default character used by the Resume () prompt.
Allows nested CONFIG.SYS execution to return to a previous GOSUB or SWITCH point, optionally with a return code.
Sets the size of real mode memory available.
Allows multiple programs in CONFIG.SYS to load simultaneously in the background.
Stores the first character of deleted files in FAT directory entries.
Determines video mode (FreeDOS) or screen access techniques (PTS-DOS).
Controls the keyboard Scroll Lock state (on/off).
Establishes environment variables.
Loads the command interpreter shell.
Functions like SHELL but supports pre-allocating space for relocating COMMAND.COM into HMA or UMBs to minimize fragmentation.
Specifies keyboard modifier key states such as Shift Lock, Num Lock, Scroll Lock, and Insert mode.
Determines whether files close upon pressing Ctrl+Alt+Del.
Skips Power-On Self-Test during reboot.
, STACKSIZE, STACKSHIGH
Define stack size parameters across various DOS platforms and embedded systems, with some ignored under specific versions for compatibility purposes.
, SYSBOOT, SYSGEN, SYSLOAD, SYSTOUMB
PTS-DOS-specific commands managing boot procedures, alternative system loading methods, and memory allocation including loading DOS into Upper Memory Blocks (UMBs).
, SUPPRESSPOPUPS, SWAPPATH
Operating system-specific directives that handle submenu suppression, error log drive assignment, and swap file directory paths.
, SWITCHES, SWITCHAR
Control conditional processing within CONFIG.SYS using customizable switch characters such as '/' or '-'.
, THREADS, TIMESLICE
OS/2 directives addressing hardware fixes, thread concurrency management, and scheduler time slice configuration.
, TRACE, TRACEBUF
Manage timeout settings for CONFIG.SYS operations and enable or disable single-step execution with configurable log buffer sizes across DOS variants and OS/2.
, TRAPDUMP
PTS-DOS directive for specifying temporary file extensions and OS/2 directive for comprehensive error logging.

This section outlines essential CONFIG.SYS directives applicable across multiple DOS variants that enable fine-tuning of system behavior—vital for enhancing performance and reliability in business environments reliant on legacy operating systems.

UTemplate:NbndZ

Configures DOS to allocate a specific memory segment as Upper Memory Block (UMB).
Specifies which UMB server is utilized.
Defines address ranges designated as UMB RAM.
Toggles disk write verification on or off.
Sets the DOS version reported to applications.
Manages VGA display enablement status.
Specifies the active video mode.
Enables virtual DMA support.
Disables processor Virtual Mode Extensions (VME).
Configures VxD drivers for Windows environments.
Sets system support parameters for Windows operation.
Controls relocation of the Extended BIOS Data Area (XBDA).
Executes commands conditionally on XT-compatible hardware.
Enables built-in Year 2000 compliance support.
Defines the default character used for Yes responses in prompts.
Configures deletion tracking features.

Issues

Although the operating system can initiate booting without a CONFIG.SYS file, both this file and AUTOEXEC.BAT are crucial for comprehensive OS customization and meeting software prerequisites. Corruption or damage to these files requires diagnostic intervention.

When 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 fail to boot if COMMAND.COM is absent. MS-DOS 6.0/PC DOS 6.1 and Novell DOS 7 and later versions prompt users to specify an alternative command interpreter path if COMMAND.COM is missing or terminated unexpectedly, offering limited shell functionality without rebooting.

COMMAND.COM from MS-DOS 7.0 onwards is incompatible with DR-DOS systems commonly used in dual-boot configurations. DR-DOS versions 7.02 and above enforce SHELL directives during skip, trace, or step modes to prevent circumvention, thereby enhancing stability and recovery when shell arguments are incorrect.

CONFIG.SYS file size restrictions differ: MS-DOS/PC DOS limits range up to 64 KB depending on version, whereas DR-DOS imposes no effective limit due to line-by-line processing rather than tokenization. This grants DR-DOS greater flexibility in managing load order via DEVICE and INSTALL commands, facilitating conflict resolution and integration of temporary utilities into the boot sequence.

Earlier MS-DOS editions restricted SHELL command lines to 31 characters, later expanded to 128 characters. DR-DOS supports up to 255 characters per line. None of the CONFIG.SYS directives accept long filenames.

Dual booting DOS and Windows 9x

When Windows 95 is installed on top of an existing DOS or Windows environment, the files CONFIG.SYS and AUTOEXEC.BAT are renamed to CONFIG.DOS and AUTOEXEC.DOS respectively. This renaming supports dual boot functionality between Windows 9x and DOS. During a DOS boot, these files are temporarily reverted to their original filenames. Additionally, Windows 95 versions of these files are saved under the names CONFIG.W40 and AUTOEXEC.W40.

In setups where Caldera DR-DOS 7.02/7.03 coexists with Windows 95, the original CONFIG.SYS and AUTOEXEC.BAT for Windows remain unchanged, while DR-DOS utilizes DCONFIG.SYS and AUTODOS7.BAT as its startup configuration files.

OS/2 / Windows NT

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

Within the OS/2 subsystem of Windows NT, the settings traditionally stored in CONFIG.SYS are instead maintained within the system registry rather than as separate files.

OS/2 includes a variety of undocumented CONFIG.SYS commands. The use of CONFIG.SYS continues to be fundamental in OS/2-based operating systems such as eComStation and ArcaOS.

See also

External links

  • AUTOEXEC.BAT and CONFIG.SYS details at Computer Hope
  • Overview of Windows 98 / MS-DOS 7.10 CONFIG.SYS commands (archived)
  • Caldera’s CONFIG.SYS Command Reference (archived) – summary of DR-DOS 7 directives
  • FreeDOS CONFIG.SYS commands explained
  • PTS-DOS 2000 Pro User Guide including CONFIG.SYS entries
  • German-language unofficial PTS-DOS FAQ (PTS/FAQD) with extended CONFIG.SYS commands
  1. ↑ Cite error: Invalid <ref> tag; no text was provided for refs named Paul_2000_CONFIG