CPOS (CONFIG.SYS directive)
| Company type | Configuration file |
|---|---|
| Industry | Operating systems |
| Founded | 1983 |
| Headquarters | N/A |
| Products | Configuration commands for DOS and OS/2 |
CONFIG.SYS serves as the main configuration file for DOS and OS/2 operating systems. This dedicated ASCII text document includes setup commands accessible to users, which are interpreted by the operating system's DOS BIOS—commonly found in IBMBIO.COM or IO.SYS—during the startup process. CONFIG.SYS was first introduced with DOS version 2.0.
Usage
The directives within CONFIG.SYS are responsible for configuring DOS to manage devices, applications, and memory allocation. Once CONFIG.SYS has been processed, DOS initiates the command shell designated in the SHELL instruction; if none is specified, it defaults to COMMAND.COM. Subsequently, the shell executes the commands listed in the AUTOEXEC.BAT file.
Typically, this file consists of name=value entries that set adjustable parameters or load essential components like device drivers and terminate-and-stay-resident programs (TSRs). In DOS systems, CONFIG.SYS is located in the boot drive’s root directory.
The same filename is also utilized by (DCP), an MS-DOS variant produced by East-German manufacturer VEB Robotron.
Certain DOS distributions prioritize alternative filenames over CONFIG.SYS:
- Advanced editions of Concurrent DOS 386, Concurrent DOS XM, Multiuser DOS, and REAL/32 search for CCONFIG.SYS or CCONFIG.INI first. These operating systems support extended configuration options stored in binary formats such as CCONFIG.BIN, which are usually edited using CONFIG.EXE.
- Versions like DR DOS 3.31, PalmDOS 1.0, Novell DOS 7, OpenDOS 7.01, and DR-DOS 7.02+ give precedence to DCONFIG.SYS over CONFIG.SYS. This setup aids disk compression and multi-boot scenarios by allowing multiple configuration files.
- OpenDOS 7.01 and DR-OpenDOS 7.02 also examine ODCONFIG.SYS, while some DR-DOS releases check for DRCONFIG.SYS.
- Starting with DR DOS 6.0, the SYS /DR:ext command enables renaming of system files and configuration extensions to support several simultaneous boot setups within a single root directory, selectable through boot loaders such as LOADER provided with Multiuser DOS and DR-DOS.
- Enhanced SHELL commands permit specifying alternate AUTOEXEC.BAT files using /P[:filename.ext], accommodating extensions beyond .BAT (a feature also found in 4DOS).
- From DR-DOS 6.0 onward, the CHAIN=filespec directive allows continuation to another configuration file located outside the root directory; DR-DOS 7.02+ extends this with CHAIN=filespec,label, enabling jumps to particular labels within config files.
- DR-DOS 7.03+ introduced the SYS /A option to duplicate CONFIG.SYS and AUTOEXEC.BAT alongside system files.
Other DOS variants offer comparable capabilities: for instance, FreeDOS uses FDCONFIG.SYS, RxDOS employs RXCONFIG.SYS, and PTS-DOS utilizes CONFIG.PTS.
In Windows 95 and Windows 98 environments, both CONFIG.SYS and AUTOEXEC.BAT exist in the root directory of the boot drive but are generally left empty. In contrast, Windows Me does not process CONFIG.SYS during startup; instead, it retrieves environment variables directly from the Windows Registry.
Within FlexOS, CONFIG.SYS is a binary configuration file that specifies resource managers and device drivers loaded during system initialization.
Example
An example 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>
:;*?!
- Marks labels within CONFIG.SYS serving as jump points for , , , , and commands.
- Functions like , but additionally supports in-line comments following other statements. (Note: MS-DOS/PC DOS does not ignore inline comments enclosed in quotes.)
- Used to introduce inline remarks alongside the ; directive.
- Prompts a Yes/No confirmation before executing subsequent CONFIG.SYS commands. (FreeDOS supports conditional execution with boot menus such as but lacks custom prompt messages.)
- Executes the following CONFIG.SYS command without conditions.
ATemplate:NbndC
- Determines whether programs can be aborted upon encountering errors.
- Sets which drives record file access timestamps within FAT file systems.
- Enables conditional execution on AT-compatible hardware.
- Acts as a boot manager.
- Adjusts the level of detail for error messages.
- Changes the default serial driver assigned to the AUX: device.
- Prevents access to character devices outside the virtual \DEV directory.
- Loads a base device driver into memory.
- Produces a brief beep sound even if audible alerts are disabled.
- Defines the operating system to boot next.
- Enables or disables extended Ctrl+C checking functionality.
- Sets the quantity of disk buffers allocated.
- Similar to BUFFERS but loads buffers into High Memory Area (HMA) or Upper Memory Blocks (UMB).
- , , (Embedded DOS 6-XL only)
- Configure cache block allocation and flushing intervals.
- Loads programs during CONFIG.SYS processing, executes them in foreground, and pauses further processing until completion.
- Specifies keyboard Caps Lock state.
- , (PTS-DOS only)
- Defines CD-ROM driver name and buffer quantity.
- Continues processing CONFIG.SYS from a new file or label reference.
- , , and other PTS-DOS-specific commands manage hardware clock settings, screen clearing, color configurations, and buffer adjustments.
These directives collectively optimize system operation, memory utilization, device management, and boot sequencing across various DOS versions, thereby enhancing performance and customization essential for enterprise IT infrastructure.
DTemplate:NbndF
- Adjusts relocation of drive descriptor tables in memory.
- Specifies segment address for multi-sector disk data deblocking routines.
- Activates internal debugger support features.
- Functions as a boot manager utility.
- Loads device drivers into conventional memory space.
- Loads device drivers into upper memory areas (equivalent to in DRDOS 5.0).
- Configures country code and codepage settings for keyboard, screen, and printer devices.
- Sets cache memory size parameters.
- Defines floppy disk compatibility modes.
- Selects display font used by the system.
- Controls loading of DOS into high memory and utilization of upper memory blocks (similar behavior to in DRDOS 5.0).
- Loads DOS configuration tables such as BUFFERS, FCBS, FILES, LASTDRIVE, and STACKS into upper memory regions.
- Specifies an alternative directory path for DOS system files.
- Defines search paths for data files used by DOS applications.
- Provides physical disk drive parameters configuration.
- Specifies settings for drives not natively recognized by the system.
- Refer to .
- Enables creation of PDUMP.nnn error log files on specified drives.
- Outputs a message directly to the display screen.
- Displays messages including ANSI escape sequences for formatting control.
- Determines whether additional validation checks occur during program startup.
- Sets an assumed error or return code for subsequent operations.
- Configures A20 gate state upon program launch.
- Terminates CONFIG.SYS processing prematurely except for SWITCHES and SHELL commands.
- Defines hash table size used to accelerate file open operations, differing from MS-DOS/PC DOS FASTOPEN driver implementation.
- Sets number of cached File Control Blocks (FCBs) allowed simultaneously (shares buffer with FILES under DR-DOS).
- Similar to FCBS but explicitly loads these into upper memory areas.
- Boot manager utility command.
- Specifies maximum number of files that can be opened concurrently.
- Equivalent to FILES but loads file handles explicitly into upper memory blocks.
- Includes execution of specified subsections within CONFIG.SYS (refer to IGNORE).
GTemplate:NbndI
- Waits for a key press or timeout, setting the error level to the ASCII value (or 1024 if timed out).
- Resumes processing of CONFIG.SYS at the indicated label.
- Continues nested CONFIG.SYS processing at the given label, then returns with .
- Refer to , , or for additional details.
- Consult for further information.
- See for related commands.
- Refer to or for more context.
- See or for associated options.
- Consult for relevant instructions.
- Loads a TSR program into memory following DOS data segment relocation.
- Refer to , , or for supplementary guidance.
- See for additional usage.
- Consult or for extended functionality.
- Activates console and command line history buffers along with enhanced pattern searching.
- Defines the segment address for HMA.
- Configures power-saving mode using HLT instruction.
- Performs boot sector virus scanning.
- Loads installable file system drivers.
- Prevents execution of specified CONFIG.SYS subsections.
- Permits select programs to operate at ring 2, allowing direct hardware access.
- Incorporates directives from a different menu block (simulated by GOSUB/RETURN in DR-DOS).
- Sets the keyboard Insert mode status.
- Installs a TSR program into memory.
- Loads TSR program into upper memory area (equivalent to HIINSTALL in DR DOS 5.0).
- Installs TSR program after relocating DOS data segment.
- Adjusts PIC interrupt priority levels to elevate designated IRQs.
KTemplate:NbndM
- Defines the keyboard layout configuration.
- Specifies the address 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.
- Establishes search paths for dynamic link libraries (DLLs).
- Handles compatibility settings for legacy applications.
- Determines the number of allowable file locks.
- Configures boot logo presentation when using PTS-DOS boot manager.
- Sets parameters such as count, order, I/O address, and timeout for LPT1 device.
- Applies the same configuration as LPT1 to the LPT2 device.
- Mirrors LPT1 settings for the LPT3 device.
- Enables and configures LPT4 device similarly to others.
- Defines wait duration before raising process priority level.
- Configures strategy for memory allocation management.
- Specifies default DOS memory allocation method.
- Defines options available within menus.
- Sets menu color schemes (can be emulated under DR-DOS).
- Establishes default menu block (emulatable under DR-DOS).
- Creates a menu block definition (emulatable under DR-DOS).
- Enables or disables multitrack disk operation support.
- Continues CONFIG.SYS processing from a new file, optionally loading a device driver and assigning %NEWFILE% environment variable.
NTemplate:NbndQ
- Defines default No () character used in Yes/No/Resume prompts.
- Specifies status of keyboard Num Lock key at startup.
- Executes conditionally based on last error code, e.g., .
- Displays text and waits for keypress, similar to DR-DOS's and .
- Requires user confirmation of errors detected in CONFIG.SYS processing.
- Sets buffer size parameters for LPT ports.
- Executes conditionally on PC-compatible systems only.
- Configures scheduler priority levels.
- Sets priority specifically for disk I/O programs.
- Changes default printer device driver assignment (from LPT1 to LPT3 or LPT4).
- Defines whether DOS applications are allowed to run.
- Loads a user interface shell environment.
- Executes conditionally on IBM PS/1-compatible machines only.
- Executes conditionally on IBM PS/2-compatible machines only.
- Suppresses output sent to STDOUT display.
RTemplate:NbndT
- Activates automatic system reboot upon encountering errors.
- Permits inclusion of comments within CONFIG.SYS files.
- Allocates a drive letter for local block device drivers.
- Defines the default Resume () character displayed in command prompts.
- Returns control from nested CONFIG.SYS processing to the prior GOSUB or SWITCH statement, optionally passing a return code.
- Sets the size of real mode memory available.
- Allows programs specified in CONFIG.SYS to load simultaneously in the background, functioning similarly to CALL or INSTALL commands in DOS/OS2 environments.
- Saves the initial character of deleted files in the reserved FAT area.
- Determines video mode settings (FreeDOS) or screen access methodologies (PTS-DOS).
- Configures the status of the keyboard Scroll Lock key.
- Establishes environment variables.
- Loads the command interpreter shell.
- Functions like SHELL but supports preloading COMMAND.COM into High Memory Area (HMA) or Upper Memory Blocks (UMBs) to minimize fragmentation, particularly helpful with certain third-party shells.
- Sets keyboard modifier states such as Shift Lock, Num Lock, Scroll Lock, and Insert mode.
- Controls whether files are closed when Ctrl+Alt+Del is pressed.
- Specifies if Power-On Self-Test (POST) should be bypassed during reboot.
- , STACKSIZE, STACKSHIGH
- Configure hardware interrupt stack sizes and buffer locations across various DOS versions and operating systems.
- , SYSBOOT, SYSGEN, SYSLOAD, SYSTOUMB
- Directives specific to PTS-DOS that manage boot processes, system loading, and memory utilization including UMBs.
- , SWITCH, SWITCHES
- Manage submenu blocks and conditional nested processing within CONFIG.SYS using key-dependent branching on different DOS platforms.
- , SWAPPATH, THREADS, TIMESLICE
- OS/2-specific parameters that control error logging paths, swap file directories, concurrent thread management, and scheduler time slices.
- , TRACE, TRACEBUF
- Facilitate timeout control and single-step execution logging during CONFIG.SYS processing under various DOS variants such as DR-DOS and PTS-DOS.
- , TRAPDUMP
- Designates temporary file extensions in PTS-DOS and detailed error logging options under OS/2.
UTemplate:NbndZ
- Configures a particular memory segment to serve as Upper Memory Block (UMB) space for DOS.
- Specifies the UMB server configuration.
- Defines address ranges allocated as UMB RAM areas.
- Enables or disables verification of disk writes.
- Sets the DOS version number reported to applications.
- Controls VGA display status parameters.
- Indicates the active video mode, comparable to SCREEN in FreeDOS.
- Activates virtual DMA functionality.
- Toggles Virtual Mode Extensions (VME) on the processor.
- Configures Virtual Device Driver (VxD) settings for Windows environments.
- Manages Windows system support features.
- Relocates the Extended BIOS Data Area (XBDA).
- Enables conditional execution specific to XT-compatible machines.
- Configures Year 2000 compliance support options.
- Assigns the default affirmative response character in prompts.
- Sets parameters for file deletion tracking.
Issues
Although it is possible for the system to boot without CONFIG.SYS or AUTOEXEC.BAT files present, these files are vital for comprehensive customization and meeting software prerequisites. Any corruption or damage to these files requires diagnostic intervention.
In cases where CONFIG.SYS lacks a SHELL directive or if it is missing or corrupted, DOS attempts to locate COMMAND.COM in the root directory of the boot drive. While earlier DOS releases will fail to boot if COMMAND.COM is absent, MS-DOS 6.0/PC DOS 6.1 and Novell DOS 7 and later will prompt users to specify the command interpreter's location. This prompt also appears if the primary shell terminates unexpectedly or is exited intentionally, allowing temporary shell replacement without restarting.
COMMAND.COM from MS-DOS 7.0 onward is not compatible with DR-DOS but often remains located at C:\ in dual-boot configurations. DR-DOS versions 7.02 and later enforce SHELL directives during skip, trace, and step modes—with some modes restoring earlier skip behaviors to recover from invalid shell parameters. If a SHELL directive is missing during CONFIG.SYS skipping, the system requests a valid shell filename before loading COMMAND.COM and defaults if none is provided.
The maximum size of CONFIG.SYS under MS-DOS/PC DOS is limited to a few kilobytes (up to 64 KB in recent editions), whereas DR-DOS imposes no explicit size restriction beyond filesystem limits. MS-DOS processes CONFIG.SYS by compiling it into tokenized memory before executing directives sequentially—loading device drivers prior to TSRs. Conversely, DR-DOS interprets each directive line-by-line, enabling precise control over load order as well as conditional execution based on hardware presence or error conditions—facilitating resolution of driver conflicts and dynamic inclusion of debuggers or temporary utilities.
The length of the SHELL command line is restricted to 31 characters in MS-DOS/PC DOS versions 2.0 through 4.01, increased to 128 characters in subsequent versions. DR-DOS supports up to 255 characters for this directive. It should be noted that CONFIG.SYS commands 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, enabling a dual-boot configuration between Windows 9x and DOS. During a DOS boot, these files temporarily revert to their original names, CONFIG.SYS and AUTOEXEC.BAT. Backup copies of Windows 95 configuration files are saved as CONFIG.W40 and AUTOEXEC.W40.
If Caldera DR-DOS versions 7.02 or 7.03 are installed alongside Windows 95, the original CONFIG.SYS and AUTOEXEC.BAT from Windows remain unaltered. Instead, DR-DOS creates its own startup files named DCONFIG.SYS and AUTODOS7.BAT.
OS/2 / Windows NT
The OS/2 operating system relies heavily on CONFIG.SYS for setting up device drivers and environment variables prior to launching its graphical user interface.
Within the OS/2 subsystem of Windows NT, instead of using a physical CONFIG.SYS file, configuration data for OS/2 applications is maintained in the system registry.
OS/2 utilizes a variety of undocumented CONFIG.SYS commands unique to its environment.
CONFIG.SYS continues to be a fundamental component 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) – guide to DR-DOS 7 directives
- FreeDOS CONFIG.SYS directive descriptions
- User manual for PTS-DOS 2000 Pro including CONFIG.SYS directives
- Unofficial German PTS-DOS FAQ (archived) covering CONFIG.SYS directives