Jump to content

SYSGEN (CONFIG.SYS directive)

From Alfawiki
Adapted from the English Wikipedia article SYSGEN (CONFIG.SYS directive), available under CC BY-SA 4.0Updated 9 August 2025
CONFIG.SYS
Company typeConfiguration file
IndustryComputer software
Founded1983
ProductsOperating system configuration

CONFIG.SYS serves as the essential configuration file for both DOS and OS/2 operating system platforms. This particular ASCII text document holds setup instructions accessible to users, which the operating system's DOS BIOS—commonly located in IBMBIO.COM or IO.SYS—interprets during the boot sequence. The CONFIG.SYS file was first introduced with DOS version 2.0.

Usage

The directives within CONFIG.SYS are responsible for configuring DOS to support hardware devices, software applications, and memory management utilities. 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 then executes commands found in AUTOEXEC.BAT.

Typically, CONFIG.SYS consists of name=value pairs that set adjustable parameters or initiate loading of files such as device drivers and terminate-and-stay-resident programs (TSRs) into memory.

Within DOS environments, CONFIG.SYS is located in the root directory of the system’s boot drive.

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

Certain DOS variants search for alternative configuration filenames that take precedence over CONFIG.SYS:

Earlier versions of Concurrent DOS did not support CONFIG.SYS; however, subsequent editions including Concurrent DOS 386, Concurrent DOS XM, Multiuser DOS, System Manager, and REAL/32 look for CCONFIG.SYS (derived from "Concurrent") instead. Some Multiuser DOS releases use CCONFIG.INI, while REAL/32 seeks MCONFIG.SYS. These platforms additionally support extended configuration details stored in a binary file named CCONFIG.BIN, which is typically edited through CONFIG.EXE.

In DR DOS 3.31, PalmDOS 1.0, Novell DOS 7, and DR-DOS versions 7.02 and later, a DCONFIG.SYS file supersedes CONFIG.SYS. Originally introduced alongside disk compression utilities to handle drive letter modifications, it later facilitated multi-boot setups. OpenDOS 7.01 and DR-OpenDOS 7.02 check for ODCONFIG.SYS, while some DR-DOS 7.02+ editions recognize DRCONFIG.SYS.

Since DR DOS 6.0, the command SYS /DR:ext has allowed users to specify custom extensions for system files, enabling multiple parallel collections of boot files managed by boot loaders such as LOADER from Multiuser DOS and DR-DOS 7.x. The SHELL directive can specify alternate AUTOEXEC.BAT files using /P[:filename.ext], and COMMAND.COM supports non-.BAT extensions when operating in this mode—capabilities also present in 4DOS. The directive CHAIN=filespec permits continuation of configuration processing in another file, optionally targeting specific labels since DR-DOS 7.02.

Starting with DR-DOS 7.03, a SYS /A option was added to copy both CONFIG.SYS and AUTOEXEC.BAT alongside other system files.

FreeDOS implements a comparable FDCONFIG.SYS; RxDOS version 7.24 and above uses RXCONFIG.SYS; and PTS-DOS relies on CONFIG.PTS.

Although both CONFIG.SYS and AUTOEXEC.BAT exist in the root directories of boot drives on Windows 95 and Windows 98, they are usually left empty.

Unlike its predecessors, 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 loaded at 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>

:;*?!

Used to define labels within CONFIG.SYS, serving as jump points for , , , , and commands.
Functions like , additionally employed for inline comments following other CONFIG.SYS entries. (Note that MS-DOS/PC DOS handles inline comments differently when enclosed in quotes.)
Also indicates inline comments alongside the ; directive.
Prompts users with a Yes/No question before executing subsequent CONFIG.SYS commands. From DOS version 6.0 onward, a similar capability exists by appending after directives (e.g., ). FreeDOS supports conditional execution through boot menu options.
Forces unconditional execution of the next CONFIG.SYS command.

ATemplate:NbndC

Determines whether programs can be interrupted upon encountering errors.
Controls whether drives record file access timestamps within FAT directory entries.
Enables conditional execution on AT-compatible hardware.
Acts as a boot manager utility.
Adjusts the level of detail in error message output.
Alters the default serial driver assigned to the AUX: device.
Prevents character devices from operating outside the virtual \DEV directory.
Loads a fundamental device driver into system memory.
Produces an audible beep even when notification sounds are disabled.
Specifies the operating system to boot next.
Enables or disables extended Ctrl+C interrupt checking.
Sets the quantity of disk buffers to allocate.
Similar to BUFFERS but loads buffers into High Memory Area or Upper Memory Blocks.
, ,
Configure parameters related to cache block allocation and flushing behavior.
Executes programs during CONFIG.SYS processing, pausing until they return control.
Sets the keyboard's Caps Lock state on startup.
,
Defines CD-ROM driver identification and buffer parameters.
Continues CONFIG.SYS processing from an external file or label.
, , and other directives adjust system settings and appearance across various DOS versions.

COM Ports and CPU Conditions

, ..., ;
Specify COM port count, logical sequencing, I/O addresses, and timeout settings for serial devices (applicable in DR-DOS 7.02+).
CPU-related directives such as CPU88 and CPU386 enable conditional execution depending on CPU type (used in PTS-DOS, DR-DOS).

This concise summary outlines essential CONFIG.SYS directives crucial for configuring and managing systems across different DOS platforms, highlighting their relevance in enterprise IT environments and legacy system upkeep.

DTemplate:NbndF

Manages relocation of drive descriptor tables within memory.
Defines the memory segment limit up to which multi-sector disk data debuffering is permitted.
Activates support for an internal debugger environment.
Functions as a boot manager component.
Loads a device driver into conventional memory space.
Loads a device driver into upper memory (equivalent to in DRDOS 5.0).
Configures country-specific and codepage information for keyboard, screen, and printer devices.
Sets cache memory size parameters.
Specifies compatibility mode settings for floppy disk drives.
Selects display font characteristics.
Determines whether DOS loads into high memory and/or utilizes upper memory areas.
Loads DOS internal tables (BUFFERS, FCBS, FILES, LASTDRIVE, STACKS) into upper memory space.
Provides an alternative search path for DOS files.
Defines search paths for data files used by DOS applications.
Specifies physical characteristics of disk drives connected to the system.
Sets parameters for unrecognized or nonstandard drives.
Refer to for additional details.
Enables error logging with PDUMP.nnn files and designates the target drive for logs.
Outputs a message directly to the display screen during processing.
Displays messages incorporating ANSI escape sequences for enhanced formatting.
Adds extra validation checks when launching programs.
Assigns assumed error or return codes for subsequent commands executed by DOS.
Controls the A20 gate state when initiating programs to manage address line access.
Terminates processing of CONFIG.SYS prior to reaching the end of the file (exceptions apply to SWITCHES and SHELL under certain conditions).
Sets the size of the hash table used to accelerate file opening operations (distinct from MS-DOS FASTOPEN driver).
Defines how many File Control Blocks can be cached simultaneously (shares buffer space with FILES under DR-DOS).
Same as FCBS but loads these structures into upper memory areas.
Acts as a boot manager utility within CONFIG.SYS processing.
Specifies maximum number of files that can be opened concurrently by DOS.
Same as FILES but loads file handles into upper memory regions.
Includes execution of designated subsections within CONFIG.SYS files (see IGNORE).

GTemplate:NbndI

Waits for a key press or timeout, setting the error level to the ASCII value of the key or 1024 if timed out.
Resumes processing of CONFIG.SYS at a designated label.
Continues nested CONFIG.SYS processing at a specified label, restoring the previous location.
Refer to , , or for additional details.
Consult for further information.
See for related instructions.
Refer to or for more context.
See or for additional reference.
Consult for related usage.
Loads a terminate-and-stay-resident (TSR) program into memory following DOS data segment relocation; compare with INSTCDEX.
Refer to , , or for further guidance.
See for more information.
Consult or as applicable.
Activates and configures the console and command line history buffer along with enhanced pattern search capabilities.
Defines the address of the High Memory Area (HMA) segment.
Sets parameters for HLT energy-saving mode.
Specifies system checks targeting boot sector viruses.
Loads installable file system drivers.
Prevents execution of selected CONFIG.SYS subsections.
Specifies which programs are permitted to operate at ring 2, allowing direct hardware I/O access.
Includes directives from an alternate menu block, emulated by GOSUB/RETURN in DR-DOS environments.
Defines the status of keyboard Insert mode.
Installs a TSR program into memory.
Loads a TSR program into upper memory, equivalent to HIINSTALL in DR DOS 5.0.
Installs TSR software after relocating the DOS data segment; see INSTCDEX for comparison.
Adjusts PIC interrupt priorities by rotating them to assign highest priority to a specified interrupt number.

KTemplate:NbndM

Configures the keyboard layout used by the system.
Sets the address of the relocated keyboard buffer in memory.
Defines the maximum number of accessible drives available to DOS.
Similar to LASTDRIVE directive but loads Current Directory Structure (CDS) into upper memory areas.
Specifies paths where DLLs are searched for loading.
Manages compatibility settings for legacy applications.
Determines the number of allowable file locks concurrently active.
Controls display of boot logos, compatible with PTS-DOS boot manager utilities.
Configures count, order, I/O address, and timeout parameters specifically for LPT1 device configuration.
Applies similar settings as LPT1 but targets LPT2 device instead.
Mirrors LPT1 configuration parameters but applies to LPT3 device.
Enables and sets up LPT4 device functionality similarly to other parallel ports.
Sets delay time before process priority is incremented during execution.
Defines strategy used for memory allocation within DOS environment.
Specifies default memory allocation method employed by DOS.
Establishes menu options available in system configuration menus.
Determines menu color schemes, with emulation support under DR-DOS systems.
Sets which menu block is loaded by default, emulatable in DR-DOS environments.
Defines an individual menu block structure, emulated under DR-DOS platforms.
Enables multitrack operations on disk drives supporting such features.
Continues processing of CONFIG.SYS from a new file after loading a device driver and setting %NEWFILE% environment variable accordingly.

NTemplate:NbndQ

Sets the default character interpreted as No () in Yes/No/Resume prompts.
Determines whether keyboard [[Num Lock|Template:Keypress]] state is enabled or disabled by default.
Performs conditional execution based on previous command’s return code or error status, e.g., .
Functions similarly to and , displaying text and waiting for user key press confirmation.
Requires user acknowledgment when errors occur during CONFIG.SYS processing steps.
Configures buffer size parameters used by LPT (parallel) ports for output operations.
Executes commands conditionally on PC-compatible hardware platforms only.
Sets scheduler priority levels within the system task management framework.
Defines priority settings specifically for disk input/output related programs and processes.
Changes default printer device driver assignment among LPT1 through LPT4 ports as specified by user configuration.
Specifies whether DOS applications are permitted to execute in current environment settings.
Loads user interface components as part of system initialization or configuration changes.
Executes commands conditionally on IBM PS/1-compatible systems only.
Executes commands conditionally on IBM PS/2-compatible machines exclusively.
Suppresses output sent to standard output (STDOUT), effectively muting display output.

RTemplate:NbndT

Enables automatic system reboot upon encountering errors.
Permits inclusion of comments within CONFIG.SYS.
Allocates a drive letter to be excluded from assignment by local block device drivers.
Sets the default Resume () response character in Yes/No/Resume prompts.
Returns control from nested CONFIG.SYS processing to the previous GOSUB or SWITCH point, optionally providing a return code.
Specifies the amount of real mode memory available.
Allows simultaneous loading of programs in CONFIG.SYS running in the background.
Determines whether the initial character of deleted files is saved in the FAT reserved area.
Configures video mode for FreeDOS or screen access methods for PTS-DOS.
Controls the Scroll Lock key status on the keyboard (enabled or disabled).
Sets environment variables for system use.
Loads the command interpreter shell.
Similar to SHELL but includes a SIZE parameter to pre-allocate COMMAND.COM into HMA or UMBs, reducing fragmentation.
Defines keyboard modifier states such as Shift Lock, Num Lock, Scroll Lock, and Insert mode.
Determines whether files close automatically when Ctrl+Alt+Del is pressed.
If enabled, bypasses POST during reboot.
Compatibility placeholder ignored in DR-DOS versions 3.31-5.0 and 7.02+ due to reentrant design and altered stack layout.
Specifies the number of hardware interrupt stacks.
(Embedded DOS 6-XL)
Sets default stack size for newly created threads.
(MS-DOS 7.0, DR-DOS 7.02+, FreeDOS)
Similar to STACKS but loads buffers into upper memory areas.
(PTS-DOS)
Used for boot manager settings.
(MS-DOS 3.0)
Intended for internal operations, disregarded by DR-DOS 7.02+.
(PTS-DOS)
Manages XMS A20 gate functionality.
(DOS 6.0+, excluding DR-DOS and FreeDOS)
Defines submenu blocks, which can be emulated under DR-DOS using CLS, ECHO, and SWITCH commands.
(OS/2 3.0+)
Redirects error information logging to disk instead of displaying pop-up screens.
(OS/2)
Specifies the directory path for swap files.
(DR DOS 6.0+)
Allows conditional continuation of nested CONFIG.SYS processing at specified labels triggered by key presses, with RETURN resuming control at the previous location.
(Various DOS versions including DR-DOS 7.02+)
Sets the default switch character, either '/' or '-'.
(DOS 4.0, Novell DOS 7+)
Configures special options that PTS-DOS ignores.
(OS/2 Warp 4 FixPak 1+)
Activates a fix addressing an FPU rounding issue.
(PTS-DOS)
Defines an alternative DOS OS filename for booting purposes.
(PTS-DOS)
Specifies memory locations where DOS components reside.
(PTS-DOS)
Loads system files from an alternate disk area.
(Embedded DOS 6-XL)
Determines size of system memory pool used for dynamic allocations.
(PTS-DOS)
Loads DOS data and code into upper memory blocks (UMBs).
(OS/2)
Sets the maximum number of concurrent threads permitted.
(DR-DOS 6.0+, PTS-DOS)
Configures timeouts for single-stepping through CONFIG.SYS and sets default responses for Yes/No prompts and SWITCH selections—note that PTS-DOS supports timeout values only.
(OS/2)
Adjusts minimum and maximum scheduler time slice durations.
(PTS-DOS)
Defines file extension used for temporary files.
(DR-DOS 7.02+, PTS-DOS, OS/2)
Globally or locally enables/disables single-step execution of CONFIG.SYS and AUTOEXEC.BAT—implementation varies between OS/2 and DOS systems.
(OS/2)
Specifies size of TRACE log buffer used for diagnostics.
(OS/2 3.0+)
Records detailed error information to assist with troubleshooting.

UTemplate:NbndZ

Directs DOS to allocate a particular segment as an Upper Memory Block (UMB).
Designates the UMB handler utilized.
Specifies the memory address ranges assigned for UMB RAM.
Toggles verification of disk write operations.
Determines the DOS version presented to applications.
Sets parameters for VGA display status.
Indicates the active video mode.
Activates the use of virtual DMA.
Regulates processor Virtual Mode Extensions (VME).
Configures the VxD driver compatibility for Windows environments.
Establishes system support settings for Windows.
Handles relocation of the Extended BIOS Data Area.
Executes conditionally on XT-compatible hardware.
Enables integrated Year 2000 compliance features.
Defines the default affirmative response character in prompts.
Monitors driver deletions.

Issues

Although booting can occur without CONFIG.SYS or AUTOEXEC.BAT, these files are critical for comprehensive startup customization and meeting software prerequisites. If these files become corrupted or damaged, troubleshooting is necessary.

In cases where CONFIG.SYS does not include a SHELL directive or is missing or compromised, DOS attempts to locate COMMAND.COM in the root directory of the boot drive. Earlier DOS versions fail to proceed if COMMAND.COM is absent. MS-DOS 6.0, PC DOS 6.1, and Novell DOS 7 or later prompt users to specify a command interpreter path if COMMAND.COM is not found. This recovery mechanism also triggers when the shell terminates unexpectedly, enabling limited shell replacement during runtime without rebooting.

COMMAND.COM from MS-DOS 7.0 and later is incompatible with DR-DOS but commonly coexists within dual-boot configurations. DR-DOS versions 7.02 and above prevent bypassing SHELL directives during skip, trace, or step modes to avoid errors, requiring users to supply a valid shell before loading COMMAND.COM when appropriate.

The maximum size allowed for CONFIG.SYS varies by operating system: MS-DOS and PC DOS limit this file to a few kilobytes (up to approximately 64 KB in recent releases), whereas DR-DOS imposes no explicit size restriction beyond filesystem limitations. MS-DOS processes CONFIG.SYS by compiling it into a tokenized form in memory before executing directives sequentially, typically loading device drivers prior to TSRs. Conversely, DR-DOS parses directives line-by-line, providing finer control over driver and TSR loading order through DEVICE and INSTALL commands. This approach facilitates resolving conflicts between loaded components and supports conditional execution based on hardware presence or runtime conditions, improving system configurability and debugging.

Shell command line lengths in CONFIG.SYS are limited to 31 characters in MS-DOS/PC DOS versions 2.0 through 4.01; subsequent versions extend this limit to 128 characters, with DR-DOS accommodating up to 255 characters. Long filenames are not supported within CONFIG.SYS directives.

Dual booting DOS and Windows 9x

When Windows 95 is installed over an existing DOS/Windows installation, the original CONFIG.SYS and AUTOEXEC.BAT files are renamed CONFIG.DOS and AUTOEXEC.DOS respectively, enabling dual boot functionality between Windows 9x and DOS environments. During a DOS boot session, these renamed files are temporarily restored as CONFIG.SYS and AUTOEXEC.BAT. Backup copies corresponding to Windows 95 versions are saved as CONFIG.W40 and AUTOEXEC.W40.

In installations where Caldera DR-DOS versions 7.02 or 7.03 coexist with Windows 95, the Windows CONFIG.SYS and AUTOEXEC.BAT remain unaltered. Instead, DR-DOS utilizes DCONFIG.SYS and AUTODOS7.BAT for its startup configuration management.

OS/2 / Windows NT

OS/2 extensively utilizes CONFIG.SYS to set up drivers and environment parameters prior to the initialization of its graphical user interface.

Within the OS/2 subsystem incorporated in Windows NT, CONFIG.SYS configurations are presented to OS/2 applications but are actually maintained within the system registry.

A significant number of CONFIG.SYS commands in OS/2 lack formal documentation.

CONFIG.SYS continues to be employed by OS/2-based operating systems like eComStation and ArcaOS.

See also

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 (archived)
  • User Manual for PTS-DOS 2000 Pro including CONFIG.SYS directives (archived)
  • German-language unofficial PTS-DOS FAQ covering CONFIG.SYS commands (archived)