Jump to content

CONFIG.SYS

From Alfawiki
CONFIG.SYS
Company typeConfiguration file
IndustryComputer software
Founded1983
ProductsConfiguration file for DOS and OS/2 operating systems

CONFIG.SYS serves as the chief configuration file for DOS and OS/2 operating systems. This plain text file, written in ASCII, includes setup instructions that 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

The directives within CONFIG.SYS tailor DOS to manage hardware devices, software applications, and memory allocation. Once CONFIG.SYS has been processed, DOS initiates the command interpreter specified by the SHELL entry or defaults to COMMAND.COM, which subsequently runs the AUTOEXEC.BAT script.

This configuration file primarily holds name=value pairs that set adjustable parameters or load components such as device drivers and terminate-and-stay-resident programs (TSRs) into system memory.

In DOS environments, CONFIG.SYS is located in the root directory of the active boot partition.

The same filename is also employed by (DCP), an MS-DOS variant developed by East-German manufacturer VEB Robotron.

Certain DOS derivatives prioritize alternative configuration filenames over CONFIG.SYS:

Concurrent DOS 386, XM, along with Multiuser DOS, System Manager, and REAL/32, utilize CCONFIG.SYS instead of CONFIG.SYS. Some editions of Multiuser DOS use CCONFIG.INI, whereas REAL/32 searches for MCONFIG.SYS. These platforms support extra settings saved in binary files like CCONFIG.BIN, typically edited through CONFIG.EXE.

Starting from DR DOS 3.31 and including versions such as PalmDOS 1.0 and Novell DOS 7, DCONFIG.SYS is given precedence over CONFIG.SYS. Originally associated with disk compression utilities, this naming convention facilitates multi-boot configurations. OpenDOS 7.01 and DR-OpenDOS 7.02 also look for ODCONFIG.SYS, while some DR-DOS releases check for DRCONFIG.SYS.

Beginning with DR DOS 6.0, the SYS /DR:ext command allows customization of default file extensions, enabling multiple system files to coexist in a single root directory and be selected via boot loaders such as LOADER included with Multiuser DOS and DR-DOS 7.x. The SHELL directive supports specifying alternate AUTOEXEC.BAT files using /P[:filename.ext], and COMMAND.COM can recognize different extensions—capabilities also available in 4DOS. The CHAIN=filespec command permits continuation of processing within another file, optionally targeting specific labels (CHAIN=filespec,label) starting from DR-DOS 7.02. Additionally, DR-DOS 7.03 introduces a SYS /A option to copy CONFIG.SYS and AUTOEXEC.BAT alongside system files.

Variants such as FreeDOS, RxDOS, and PTS-DOS use alternative filenames: FDCONFIG.SYS, RXCONFIG.SYS, and CONFIG.PTS, respectively.

Although both CONFIG.SYS and AUTOEXEC.BAT exist in the root directories of Windows 95 and Windows 98 boot drives, they are generally left empty. In contrast, Windows Me does not process CONFIG.SYS during startup; instead, it loads environment variables directly from the Windows Registry at HKLM\System\CurrentControlSet\Control\SessionManager\Environment.

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

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>

:;*?!

Marks labels in CONFIG.SYS to serve as jump targets for , , , and commands.
Functions similarly to , also utilized for inline comments following other CONFIG.SYS entries. (Note: MS-DOS/PC DOS does not ignore inline comments enclosed in double quotes.)
Used together with the ; directive to introduce inline comments.
Prompts a Yes/No confirmation before executing subsequent CONFIG.SYS commands. (FreeDOS supports conditional execution with boot menus.) DOS 6.0 and later versions allow similar functionality by appending after commands.
Forces unconditional execution of the next CONFIG.SYS command.

ATemplate:NbndC

Determines whether programs can be aborted upon encountering errors.
Defines which drives record file access timestamps within FAT file systems.
Enables conditional execution on AT-compatible hardware.
Boot manager functionality.
Adjusts the detail level of error messages displayed.
Changes the default internal serial port driver (COM1–COM4) assigned to the AUX device.
Prevents access to character devices outside the virtual \DEV directory.
Loads a base device driver into memory.
Produces a beep sound even if audio alerts are suppressed via SWITCHES=/Q.
Specifies which operating system to boot next.
Enables or disables extended Ctrl+C checking.
Sets the number of disk buffers allocated.
Similar to BUFFERS but loads buffers into High Memory Area or Upper Memory Blocks.
, , (Embedded DOS 6-XL only)
Configure cache block size, timeout duration, and flush intervals.
Executes programs within CONFIG.SYS, pausing processing until completion.
Sets the keyboard's Caps Lock state.
, (PTS-DOS only)
Defines CD-ROM driver name and buffer count.
Continues processing CONFIG.SYS in a new file or label.
, , and related directives control system behavior and display settings depending on operating system specifics.
(OS/2)
Defines OEM codepage(s).
, ..., (DR-DOS 7.02+)
Configures COM port quantity, sequence, I/O addresses, and timeouts.
, also called COMMENTS (DOS 4.0+), reassigns inline comment characters or ignores subsequent lines based on OS behavior.
, (DOS 3.0+, DR-DOS 3.31+, OS/2)
Activates and configures international language support.
CPU-specific commands (CPU88, CPU86, CPU286, CPU386, CPU486 variants) permit conditional execution depending on processor type (PTS-DOS, DR-DOS).

DTemplate:NbndF

Adjusts relocation settings for drive descriptor tables.
Specifies memory segment address used for multi-sector disk data deblocking.
Enables built-in debugger support.
Boot manager functionality.
Loads device drivers into memory.
Loads device drivers into upper memory area (equivalent to in DRDOS 5.0).
Configures country and codepage parameters for keyboard, screen, and printer devices.
Sets cache memory sizes.
Defines floppy disk compatibility mode.
Specifies display font settings.
Controls loading DOS into high memory and usage of upper memory blocks (similar to in DRDOS 5.0).
Loads DOS tables (BUFFERS, FCBS, FILES, LASTDRIVE, STACKS) into upper memory space.
Specifies an alternative path for DOS system files.
Defines search paths for data files.
Details physical parameters of disk drives.
Establishes parameters for unrecognized drives.
See .
Enables error logging with PDUMP.nnn files on specified drive.
Displays a plain text message on screen.
Displays a message including ANSI escape codes.
Adds extra validation checks when launching programs.
Sets error or return codes for subsequent operations.
Controls A20 line gate status when starting programs.
Terminates CONFIG.SYS processing before reaching end of file (except for certain directives).
Adjusts hash table size to accelerate file open operations, differing from MS-DOS/PC DOS FASTOPEN driver implementation.
Specifies number of cached File Control Blocks (FCBs) that can be opened simultaneously (shares buffer space with FILES under DR-DOS).
Same as FCBS but loads FCBs into upper memory area.
Boot manager function.
Defines maximum number of open files allowed concurrently.
Same as FILES but loads file handles into upper memory blocks.
Executes specified subsections within CONFIG.SYS (refer to IGNORE).

GTemplate:NbndI

Waits for a key press or times out, setting the error level to the ASCII code 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, then returns to the previous point.
Refer to , , or for additional details.
Consult .
See .
Refer to or for further information.
See or for more context.
Consult .
Loads a terminate-and-stay-resident (TSR) program into memory following DOS data segment relocation. Compare with INSTCDEX.
See , , or for related commands.
Consult .
Refer to or for related usage.
Activates console and command line history buffers with enhanced pattern searching capabilities.
Defines the address of the High Memory Area (HMA) segment.
Configures energy-saving settings using the HLT instruction.
Enables scanning for boot sector viruses.
Loads installable file system drivers.
Prevents execution of specified CONFIG.SYS subsections.
Permits designated programs to execute at ring 2, allowing direct hardware I/O access.
Includes directives from another menu section (emulated via GOSUB/RETURN in DR-DOS).
Sets the status of keyboard Insert mode.
Installs a TSR program into memory.
Installs a TSR program into upper memory area (equivalent to HIINSTALL in DR DOS 5.0).
Loads a TSR program after relocating the DOS data segment. Compare with INSTCDEX.
Adjusts PIC interrupt priorities to assign highest priority to a specified IRQ number.

KTemplate:NbndM

Defines the keyboard layout in use.
Specifies the relocated address of the keyboard buffer.
Sets the maximum number of accessible drives.
Similar to LASTDRIVE but additionally loads Current Directory Structure into upper memory.
Lists paths where DLLs are searched for.
Manages handling of legacy applications.
Sets the number of allowable file locks.
Configures boot logo display when using PTS-DOS boot manager.
Specifies count, sequence, I/O address, and timeout parameters for LPT1 device configuration.
Provides similar configuration options for LPT2 device.
Applies comparable settings for LPT3 device configuration.
Enables and configures LPT4 device parameters.
Defines wait time before increasing process priority level.
Sets memory allocation strategy parameters.
Specifies default DOS memory allocation policy.
Defines available menu options.
Specifies menu color schemes (can be emulated under DR-DOS).
Sets default menu block (emulatable under DR-DOS).
Defines menu blocks structure (emulatable under DR-DOS).
Enables or disables multitrack disk operations functionality.
Continues CONFIG.SYS processing in a new file after loading device drivers and establishing %NEWFILE% environment variable.

NTemplate:NbndQ

Determines default No () response character in Yes/No/Resume prompts.
Sets keyboard [[Num Lock|Template:Keypress]] state to on or off.
Allows conditional execution based on last error code, e.g., .
Displays text and waits for key input, similar to and commands in DR-DOS.
Requires user confirmation when errors occur in CONFIG.SYS processing.
Configures buffer size settings for LPT ports.
Enables conditional execution on PC-compatible systems.
Sets process scheduling priority parameters.
Configures disk I/O priority levels for applications.
Changes default printer device driver assignment between LPT1, LPT3, or LPT4 ports.
Controls permission for running DOS programs.
Loads user interface components.
Enables conditional execution specifically on IBM PS/1-compatible machines.
Enables conditional execution specifically on IBM PS/2-compatible machines.
Suppresses output display on STDOUT.

RTemplate:NbndT

Activates automatic system reboot upon error detection.
Permits inclusion of comments within CONFIG.SYS.
Reserves drive letters for local block device drivers.
Defines the default character for Resume () prompts.
Returns control from nested CONFIG.SYS processing to the previous GOSUB or SWITCH point, optionally passing a return code.
Specifies the size of real mode memory.
Allows simultaneous loading of programs in CONFIG.SYS running in the background.
Determines whether the first character of deleted files is saved in the FAT reserved area.
Sets video mode in FreeDOS or screen access methods in PTS-DOS.
Controls the Scroll Lock key status on the keyboard (enabled or disabled).
Establishes environment variables.
Loads the command interpreter shell.
Similar to SHELL but includes a size parameter to relocate COMMAND.COM into HMA or UMBs, reducing memory fragmentation.
Configures keyboard modifier states such as Shift Lock, Num Lock, Scroll Lock, and Insert mode.
Defines whether files close upon pressing Ctrl+Alt+Del.
Skips the Power-On Self-Test (POST) during reboot.
, STACKSIZE, STACKSHIGH
Set stack parameters across various DOS versions, with some ignored depending on version for compatibility purposes.
, SYSBOOT, SYSGEN, SYSLOAD, SYSTOUMB
PTS-DOS-specific commands that manage boot options, alternative operating system booting, memory configuration, and loading DOS components into UMBs.
, SUPPRESSPOPUPS, SWAPPATH, SWITCHES
Control submenu blocks (DOS 6 and later), suppress error logging (OS/2), specify swap file locations (OS/2), and set special options (Novell DOS).
, SWITCHAR
Manages conditional nested CONFIG.SYS processing labels (DR DOS) and defines the system’s default switch character ('/' or '-').
, THREADS, TIMESLICE
OS/2 directives addressing hardware FPU fixes, configuring concurrent thread counts, and setting scheduler time slices.
, TMPEXT, TRACE, TRACEBUF, TRAPDUMP
Define prompt timeouts (DR-DOS & PTS-DOS), temporary file extensions (PTS-DOS), enable single-step execution tracing (DR-DOS, PTS-DOS & OS/2), configure trace log buffer sizes (OS/2), and log error dumps (OS/2).

UTemplate:NbndZ

Configures DOS to utilize a designated memory segment as an Upper Memory Block (UMB).
Specifies the UMB server in use.
Defines address ranges allocated for UMB RAM.
Enables or disables verification of disk writes.
Sets the DOS version reported to applications.
Controls VGA display status settings.
Assigns current video mode similarly to FreeDOS’s SCREEN command.
Activates virtual DMA support.
Manages processor Virtual Mode Extensions (VME).
Configures VxD drivers for Windows environments.
Sets system support parameters for Windows compatibility.
Handles relocation of the Extended BIOS Data Area (XBDA).
Executes conditionally on XT-compatible hardware platforms.
Configures built-in Year 2000 compliance features.
Sets default affirmative character for prompt responses.
Controls deletion tracking behavior.

Issues

Although booting can occur without CONFIG.SYS or AUTOEXEC.BAT files present, these are critical for comprehensive operating system customization and meeting software requirements. Corruption or absence of either file demands troubleshooting intervention.

If no SHELL directive is found in CONFIG.SYS or if the file is missing or damaged, DOS attempts to locate COMMAND.COM in the root directory of the boot drive. Versions earlier than 6.0 fail to boot if COMMAND.COM is not found. Starting with MS-DOS 6.0 and PC DOS 6.1 onwards, a prompt requests a path to a command processor. This prompt also appears if the primary shell terminates unexpectedly or exits intentionally, allowing limited runtime replacement of the shell without rebooting.

Due to incompatibilities between MS-DOS 7.0+ COMMAND.COM and DR-DOS shells, DR-DOS version 7.02 and later restrict bypassing SHELL directives during skip/trace/step operations. Recovery mechanisms include reactivating skip behavior to manage invalid SHELL arguments and prompting users to provide a valid shell filename before loading COMMAND.COM from the root directory.

CONFIG.SYS file size restrictions differ by operating system: MS-DOS and PC DOS limit size to a few kilobytes (up to approximately 64 KB), whereas DR-DOS imposes no practical size limit due to its line-by-line parsing approach. This flexibility grants DR-DOS enhanced control over device driver and TSR loading sequences via DEVICE and INSTALL commands, facilitating conflict resolution and debugging processes. Additionally, the INSTALL directive can execute non-resident programs by integrating temporary utilities into CONFIG.SYS processing.

The maximum length of SHELL command lines has increased over time—from an initial limit of 31 characters in MS-DOS/PC DOS versions 2.0 through 4.01 up to 128 characters in later releases—while DR-DOS supports lines up to 255 characters. It should be noted that CONFIG.SYS directives do not accept long filenames.

Dual Booting DOS and Windows 9x

When Windows 95 is installed over a pre-existing DOS or Windows system, the files CONFIG.SYS and AUTOEXEC.BAT are renamed to CONFIG.DOS and AUTOEXEC.DOS to enable dual boot functionality. Selecting DOS at startup temporarily reverts these filenames, while the Windows 95 versions are saved under CONFIG.W40 and AUTOEXEC.W40.

In setups where Caldera DR-DOS 7.02 or 7.03 coexists with Windows 95, the original CONFIG.SYS and AUTOEXEC.BAT used by Windows remain intact. Instead, DR-DOS relies on separate startup files named DCONFIG.SYS and AUTODOS7.BAT.

OS/2 / Windows NT

OS/2 makes extensive use of CONFIG.SYS for loading drivers and setting environment parameters before launching its graphical user interface. Within the OS/2 environment embedded in Windows NT, these CONFIG.SYS configurations are maintained in the system registry rather than as physical files.

A significant number of CONFIG.SYS commands for OS/2 lack official documentation. The file is still utilized by OS/2-based operating systems such as eComStation and ArcaOS.

See also

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
  • Guide to FreeDOS CONFIG.SYS directives
  • User Manual for PTS-DOS 2000 Pro including CONFIG.SYS commands (archived)
  • Unofficial German PTS-DOS FAQ featuring CONFIG.SYS details (archived)