PRINTMONBUFFER (CONFIG.SYS directive)
| Company type | Configuration file |
|---|---|
| Industry | Operating systems |
| Founded | 1983 |
| Products | System configuration directives for DOS and OS/2 |
CONFIG.SYS serves as the main configuration file for the DOS and OS/2 operating system families. This plain text file, written in ASCII format, holds setup instructions accessible to users, which the operating system's DOS BIOS—usually found in IBMBIO.COM or IO.SYS—processes during the boot sequence. The CONFIG.SYS file was first introduced with DOS version 2.0.
Usage
The directives within CONFIG.SYS are used to configure DOS settings related to hardware devices, software applications, and memory allocation. Once CONFIG.SYS has been executed, DOS initiates the command interpreter specified by the SHELL directive; if none is specified, it defaults to COMMAND.COM, which then runs the AUTOEXEC.BAT script.
Typically, this file contains name=value pairs that establish system parameters or load components such as device drivers and terminate-and-stay-resident programs (TSRs) into memory.
In DOS environments, CONFIG.SYS is located in the root directory of the active boot drive.
The same filename is also utilized by (DCP), an MS-DOS variant developed by East-German VEB Robotron.
Certain DOS derivatives check for alternate filenames that take precedence over CONFIG.SYS:
Early editions of Concurrent DOS from versions 3.2 through 4.1 did not support CONFIG.SYS; however, subsequent releases—including Concurrent DOS 386, Concurrent DOS XM, Multiuser DOS, System Manager, and REAL/32—employ CCONFIG.SYS (short for "Concurrent") instead. Some Multiuser DOS variants use CCONFIG.INI, while REAL/32 looks for MCONFIG.SYS. These platforms maintain extra configuration details within a binary file named CCONFIG.BIN, typically modified using CONFIG.EXE.
In systems such as DR DOS 3.31, PalmDOS 1.0, Novell DOS 7, OpenDOS 7.01, and DR-DOS versions 7.02 and later, DCONFIG.SYS (derived from "DR DOS") overrides CONFIG.SYS. Initially associated with disk compression utilities, this filename also supports multi-boot setups. OpenDOS 7.01 and DR-OpenDOS 7.02 check for ODCONFIG.SYS, whereas some DR-DOS 7.02+ releases additionally recognize DRCONFIG.SYS.
Starting with DR DOS 6.0, the command SYS /DR:ext enables users to modify default system file extensions, allowing multiple system file sets 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 can specify alternative AUTOEXEC.BAT filenames using /P[:filename.ext], and COMMAND.COM accepts extensions beyond ".BAT" in these cases—a feature also supported by 4DOS. The CHAIN=filespec command allows continuation of processing in a different file, which may be located outside the root directory; from DR-DOS 7.02 onwards, an optional label parameter can be used to jump to specific sections within these files.
From version 7.03 onward, DR-DOS includes a SYS /A option that copies matching CONFIG.SYS and AUTOEXEC.BAT files alongside system files during setup.
FreeDOS offers a comparable functionality through FDCONFIG.SYS, while RxDOS version 7.24 and above uses RXCONFIG.SYS. The operating system PTS-DOS relies on CONFIG.PTS for configuration.
Both CONFIG.SYS and AUTOEXEC.BAT exist on the boot partitions of DOS-based systems like Windows 95 and Windows 98, though they are frequently left unused or empty.
Unlike its predecessors, Windows Me does not process CONFIG.SYS at startup; instead, it retrieves environment variables directly from the Windows Registry at:
- HKLM\System\CurrentControlSet\Control\SessionManager\Environment
In the case of FlexOS, at least in version 286 1.13 (circa 1986/1987), CONFIG.SYS is a binary configuration file that specifies 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>
:;*?!
- Used to define labels within CONFIG.SYS, serving as jump points for , , , and commands.
- Functions like , but additionally supports inline comments following other CONFIG.SYS instructions. (Note that under MS-DOS/PC DOS, inline comments inside double-quotes are not ignored.)
- Introduces inline comments alongside the ; directive.
- Prompts a Yes/No confirmation before executing subsequent CONFIG.SYS commands. (FreeDOS does not offer custom messages but allows conditional execution with boot menus.) DOS version 6.0 and later provide a similar feature using a trailing after directives.
- Executes the next CONFIG.SYS directive unconditionally.
A–C
- Determines if programs can be terminated upon encountering errors.
- Enables drives to save file access timestamps within FAT directory entries.
- Conditional execution applicable on AT-compatible systems.
- Boot management utility.
- Adjusts the level of detail shown in error messages.
- Alters the default internal serial driver for the AUX device.
- Prevents character devices from being accessible outside the phantom \DEV directory.
- Loads a base device driver into memory.
- Causes a beep sound even when audible alerts are disabled.
- Specifies which operating system to boot next.
- Enables or disables extended Ctrl+C checking.
- Allocates disk buffers.
- Similar to BUFFERS but places buffers into HMA or UMB memory areas.
- , ,
- Configure cache block allocation, timeout duration, and flush intervals.
- Loads programs during CONFIG.SYS processing and pauses further processing until return.
- Sets the Caps Lock state on the keyboard.
- ,
- Defines CD-ROM driver name and buffer count settings.
- Continues processing CONFIG.SYS from a different file or label.
- , , , etc.
- Various system parameters primarily relevant to OS/2 and PTS-DOS environments.
COM Ports
- , ..., ;
- Define quantity, logical sequence, I/O port address, and timeout values for COM port devices.
Other
- , ;, ;, ;, ;, ;, ;, ;, ;, ;, ;, etc.
- A range of directives that manage system behavior, conditional execution based on CPU type, internationalization support, comment processing, and hardware configurations across different DOS variants.
DTemplate:NbndF
- Configures relocation of drive descriptor tables in memory.
- Specifies the segment address used for multi-sector disk data deblocking operations.
- Enables support for an internal debugger.
- Boot management utility.
- 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 (KBD), screen (SCR), and printer (LPT) devices.
- Defines cache memory size parameters.
- Selects floppy disk compatibility mode.
- Specifies screen font settings.
- Controls whether DOS loads into high memory and utilizes upper memory areas.
- Loads DOS tables such as BUFFERS, FCBS, FILES, LASTDRIVE, and STACKS into upper memory segments.
- Designates an alternate path for DOS system files.
- Defines search paths for data files.
- Sets physical disk drive parameters explicitly.
- Establishes parameters for unrecognized or unknown drives.
- See .
- Enables logging of error dumps to
PDUMP.nnnfiles on a specified drive. - Displays a message directly on the screen.
- Shows messages that include ANSI escape sequences for formatting.
- Determines whether additional checks are performed when launching programs.
- Assigns a specific error or return code to be assumed next by the system.
- Controls the A20 gate state at program startup.
- Terminates CONFIG.SYS processing prematurely (with exceptions such as SWITCHES and SHELL in certain cases).
- Sets size of hash tables used to speed up file open operations—distinct from MS-DOS/PC DOS FASTOPEN driver behavior.
- Specifies number of cached File Control Blocks (FCBs) allowed simultaneously (shares buffer with FILES in DR-DOS).
- Equivalent to FCBS but loads FCBs into upper memory segments instead of conventional memory.
- Boot management utility.
- Determines maximum number of files that can be open concurrently.
- Same as FILES but loads file handles into upper memory areas.
- Includes execution of specified CONFIG.SYS subsections (refer to IGNORE).
GTemplate:NbndI
- Waits for a key press or timeout, returning the error level as the ASCII value of the key or 1024 if timed out.
- Resumes processing of CONFIG.SYS at a designated label.
- Continues nested CONFIG.SYS execution at a specified label, then returns to the previous position.
- Refer to , , or for details.
- See also .
- Refer to .
- Consult or for additional information.
- See or for further reference.
- Consult .
- Loads a TSR program into memory similar to , but after relocating the DOS data segment. Compare with INSTCDEX.
- Refer to , , or for more details.
- See also .
- Consult or for further information.
- Activates console and command line history buffers along with advanced pattern search capabilities.
- Defines the address of the HMA segment.
- Configures the HLT power-saving mode.
- Determines whether to scan for boot sector viruses during startup.
- Loads installable file system drivers.
- Prevents execution of specified CONFIG.SYS subsections.
- Permits certain applications to operate at ring 2, enabling direct hardware I/O access.
- Incorporates directives from another menu section (emulatable via GOSUB/RETURN in DR-DOS).
- Sets the keyboard's Insert mode status.
- Installs a TSR program into memory.
- Loads a TSR program into upper memory, equivalent to HIINSTALL in DR DOS 5.0.
- Installs a TSR program following relocation of the DOS data segment. Compare with INSTCDEX.
- Rotates PIC interrupt priorities to raise the priority of a specified IRQ.
KTemplate:NbndM
- Defines the keyboard layout configuration.
- Specifies the address of the relocated keyboard buffer.
- Sets the maximum number of accessible drives.
- Functions like LASTDRIVE but loads the Current Directory Structure into upper memory.
- Establishes DLL search path locations.
- Controls loading behavior for legacy programs.
- Determines the number of file locks permitted.
- Manages boot logo display alongside PTS-DOS boot manager functionality.
- Configures count, order, I/O address, and timeout parameters for LPT1 device.
- Configures count, order, I/O address, and timeout parameters for LPT2 device.
- Configures count, order, I/O address, and timeout parameters for LPT3 device.
- Enables and sets parameters for LPT4 device operation.
- Defines wait duration before increasing process priority.
- Controls memory allocation strategy settings.
- Specifies default DOS memory allocation method.
- Defines menu option entries.
- Sets menu color schemes (can be simulated under DR-DOS).
- Specifies default menu block (emulatable under DR-DOS).
- Defines multiple menu blocks (emulatable under DR-DOS).
- Enables or disables multitrack disk operations support.
- Continues processing CONFIG.SYS from a new file after driver loading and assigns %NEWFILE% environment variable.
NTemplate:NbndQ
- Sets default character interpreted as No () in Yes/No/Resume prompts.
- Turns keyboard [[Num Lock|Template:Keypress]] on or off by default.
- Executes commands conditionally based on error levels, e.g., .
- Displays text and waits for user key press, similar to and commands in DR-DOS.
- Requires user confirmation to acknowledge errors within CONFIG.SYS processing.
- Adjusts buffer size settings for LPT ports.
- Executes commands conditionally on PC-compatible machines only.
- Configures scheduler priority levels.
- Sets priority for disk I/O-related applications.
- Changes default printer driver assignment (e.g., switching from LPT1 to LPT3 or LPT4).
- Specifies whether DOS applications are allowed to run.
- Loads user interface shell environment.
- Executes commands conditionally on IBM PS/1-compatible hardware only.
- Executes commands conditionally on IBM PS/2-compatible hardware only.
- Suppresses output sent to STDOUT.
RTemplate:NbndT
- Activates automatic system reboot upon encountering errors.
- Permits inclusion of comments within CONFIG.SYS.
- Blocks local block device drivers from using a designated drive letter.
- Defines the default Resume () character displayed in command prompts.
- Returns execution from nested CONFIG.SYS processing back to the previous GOSUB or SWITCH statement, optionally passing a return code.
- Sets the size of real mode memory available.
- Allows simultaneous loading of programs in the background during CONFIG.SYS execution.
- Determines storage location for the first character of deleted files within the FAT reserved area.
- Specifies video mode settings for FreeDOS or screen access methods for PTS-DOS.
- Controls the status of the keyboard Scroll Lock key, enabling or disabling it.
- Establishes environment variables.
- Loads the command interpreter shell.
- Similar to SHELL but supports pre-allocating space to relocate COMMAND.COM into HMA or UMBs, optimizing memory usage with third-party shells.
- Sets keyboard modifier states such as Shift Lock, Num Lock, Scroll Lock, and Insert mode.
- Manages file closure behavior when pressing Ctrl+Alt+Del.
- Skips POST during reboot sequences.
- , STACKSIZE, STACKSHIGH
- Configure hardware interrupt stack sizes and buffer locations across various DOS platforms.
- , SYSBOOT, SYSGEN, SYSLOAD
- PTS-DOS commands managing boot options, system loading procedures, and memory allocation techniques.
- , SWITCH
- Enables conditional processing in CONFIG.SYS with nested blocks and label-based jumps (exclusive to DR DOS).
- , SWAPPATH, THREADS, TIMESLICE
- OS/2-specific settings controlling error logging paths, swap file locations, threading behavior, and scheduler time slices.
- , SWITCHES
- Defines default switch characters ('/' or '-') and special option flags across different DOS versions.
- , TRACE, TRACEBUF, TRAPDUMP
- OS/2 utilities for floating-point unit bug fixes, debugging CONFIG.SYS/AUTOEXEC.BAT execution flow, and error reporting.
This segment outlines configuration commands pertinent to system startup across multiple DOS variants such as DR-DOS, PTS-DOS, and OS/2. It highlights parameters that influence system operation, resource allocation, boot procedures, and error management—key factors for managing IT environments and optimizing legacy systems.
UTemplate:NbndZ
- Assigns a specific memory segment for use as Upper Memory Block (UMB).
- Selects the UMB server implementation utilized by DOS.
- Defines address ranges designated as UMB RAM.
- Enables or disables verification of disk writes.
- Specifies the DOS version number reported to applications.
- Configures VGA display status parameters.
- Sets the current video mode in use.
- Determines whether virtual DMA functionality is allowed.
- Controls deactivation of processor Virtual Mode Extensions.
- Configures VxD driver settings for Windows environments.
- Manages system support options for Windows integration.
- Handles relocation of the Extended BIOS Data Area (XBDA).
- Enables conditional execution on XT-compatible hardware platforms.
- Activates built-in Year 2000 compliance support features.
- Defines the default affirmative response character in prompts.
- Configures tracking behavior for file deletions.
Issues
While it is possible to boot a system without CONFIG.SYS or AUTOEXEC.BAT files present, these are crucial for comprehensive operating system customization and meeting software prerequisites. Any corruption or damage to these files necessitates troubleshooting efforts.
In cases where CONFIG.SYS lacks a SHELL directive or is missing or corrupted entirely, DOS attempts to locate COMMAND.COM in the root directory of the boot drive. Versions prior to 6.0 will fail to start without it. MS-DOS 6.0/PC DOS 6.1 and Novell DOS 7 and later prompt users to specify a command processor path if COMMAND.COM is absent or fails to load. This feature enables limited shell replacement at runtime without requiring a reboot.
Due to compatibility issues between MS-DOS 7.0+ COMMAND.COM and DR-DOS implementations, DR-DOS versions 7.02 and above restrict bypassing SHELL directives when using skip/trace/step modes. Recovery mechanisms permit reactivation of skip functionality to correct invalid SHELL parameters. When skipping CONFIG.SYS processing entirely, users must provide a valid shell before launching COMMAND.COM.
The maximum size of CONFIG.SYS under MS-DOS/PC DOS is limited to several kilobytes (up to 64 KB in later releases), whereas DR-DOS imposes no fixed size limit aside from file system constraints. MS-DOS processes CONFIG.SYS by compiling it into tokenized memory before executing directives in a predetermined sequence—loading device drivers prior to TSRs—while DR-DOS interprets each line sequentially. This approach allows precise control over loading order via DEVICE and INSTALL commands and supports conditional execution based on hardware detection or error states. This flexibility resolves conflicts related to load order and enhances system configuration capabilities.
Furthermore, DR-DOS’s line-by-line interpretation supports integrating non-resident software directly within CONFIG.SYS through INSTALL, further expanding customization opportunities.
In MS-DOS/PC DOS versions from 2.0 through 4.01, the length limit for SHELL command lines was restricted to 31 characters. Later editions increased this limit up to 128 characters. DR-DOS extends this capacity further by accepting up to 255 characters. It is important to note that CONFIG.SYS directives do not accommodate long filenames.
Dual Booting DOS and Windows 9x
When Windows 95 is installed over a pre-existing DOS/Windows environment, the system renames CONFIG.SYS and AUTOEXEC.BAT to CONFIG.DOS and AUTOEXEC.DOS respectively to support dual boot functionality. Selecting DOS at startup temporarily reverts these files to their original names, while the Windows 95 versions are saved as CONFIG.W40 and AUTOEXEC.W40.
In setups where Caldera DR-DOS 7.02/7.03 coexists with Windows 95, the Windows CONFIG.SYS and AUTOEXEC.BAT files remain unaltered. Instead, DR-DOS utilizes DCONFIG.SYS and AUTODOS7.BAT as its configuration scripts.
OS/2 / Windows NT
OS/2 depends extensively on CONFIG.SYS for driver loading and environment configuration prior to the graphical interface initialization. Within the OS/2 subsystem of Windows NT, the settings traditionally found in CONFIG.SYS are stored in the system registry rather than in a physical file.
OS/2 includes numerous undocumented CONFIG.SYS commands. CONFIG.SYS continues to be a fundamental component in OS/2-based systems such as eComStation and ArcaOS.
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
- Details on FreeDOS CONFIG.SYS directives
- PTS-DOS 2000 Pro User Manual with CONFIG.SYS directives overview
- German-language unofficial PTS-DOS FAQ (PTS/FAQD) including extra CONFIG.SYS directives