Jump to content

INSERT (CONFIG.SYS directive)

From Alfawiki
Adapted from the English Wikipedia article INSERT (CONFIG.SYS directive), available under CC BY-SA 4.0Updated 9 August 2025
CONFIG.SYS
Company typeConfiguration file
IndustryOperating systems
Founded1983
ProductsSystem configuration directives for DOS and OS/2

CONFIG.SYS serves as the essential configuration file for DOS and OS/2 operating systems. This plain text file, written in ASCII, includes setup instructions accessible to users that are interpreted by the operating system's DOS BIOS—commonly found in IBMBIO.COM or IO.SYS—during the system's boot process. CONFIG.SYS was first introduced with DOS version 2.0.

Usage

The directives within CONFIG.SYS tailor DOS to support hardware devices and software applications, such as memory management utilities. Once CONFIG.SYS has been processed, DOS launches the command interpreter specified by the SHELL directive; if none is provided, it defaults to COMMAND.COM, which then executes commands from AUTOEXEC.BAT.

CONFIG.SYS primarily contains name=value pairs that set configurable options or load device drivers and TSR (terminate-and-stay-resident) programs. This file is located in the root directory of the boot device.

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

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

- Advanced editions of Concurrent DOS 386, Concurrent DOS XM, Multiuser DOS, and REAL/32 employ CCONFIG.SYS or CCONFIG.INI (in Multiuser DOS) instead, with configuration stored in a binary file named CCONFIG.BIN. These settings are managed through the CONFIG.EXE tool.

- In DR DOS 3.31, PalmDOS 1.0, Novell DOS 7, and DR-DOS versions 7.02 and later, a file called DCONFIG.SYS takes precedence over CONFIG.SYS. Initially associated with disk compression utilities, it also facilitates multi-boot setups.

- OpenDOS 7.01 and DR-OpenDOS 7.02 look for the presence of ODCONFIG.SYS, while some DR-DOS 7.02+ releases check for DRCONFIG.SYS.

Starting from DR-DOS 6.0, the default system file extensions can be modified using SYS /DR:ext, allowing multiple system files to coexist within a single root directory and be selected through boot managers like LOADER (used with Multiuser DOS and DR-DOS versions 7.02/7.03). The SHELL command supports specifying alternative AUTOEXEC.BAT files via /P[:filename.ext], with COMMAND.COM accepting non-.BAT extensions—a feature also supported by 4DOS. The CHAIN=filespec directive enables continuation of configuration processing from another file, optionally jumping to specific labels (CHAIN=filespec,label) in DR-DOS 7.02 and newer.

From version 7.03 onward, DR-DOS adds a SYS /A option to copy corresponding CONFIG.SYS and AUTOEXEC.BAT files along with system files during installation.

FreeDOS includes a comparable feature using FDCONFIG.SYS, while RxDOS version 7.24 and above utilizes RXCONFIG.SYS. The operating system PTS-DOS uses a configuration file named CONFIG.PTS.

In DOS-based systems such as Windows 95 and Windows 98, CONFIG.SYS and AUTOEXEC.BAT reside in the root directory of the boot drive but are generally empty. Conversely, Windows Me does not process CONFIG.SYS during startup; instead, it retrieves environment variables from the Windows Registry at:

HKLM\System\CurrentControlSet\Control\SessionManager\Environment

Within the FlexOS environment, CONFIG.SYS is a binary file that specifies resource managers and device drivers loaded at boot time.

Example

An illustrative CONFIG.SYS example 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 to serve as jump destinations for , , , and commands.
Functions similarly to , but is usable for inline remarks following other CONFIG.SYS instructions. (Note that inline comments enclosed in double-quotes are not disregarded in MS-DOS/PC DOS.)
Precedes inline comments alongside the ; directive.
Prompts a Yes/No confirmation before executing subsequent CONFIG.SYS directives. (FreeDOS supports conditional execution with boot menus but lacks customizable messages.) DOS version 6.0 and later versions provide comparable functionality by appending after commands.
Executes the next CONFIG.SYS directive without any condition.

ATemplate:NbndC

Determines whether programs can be interrupted upon errors.
Controls which drives record file access timestamps within FAT directory entries.
Enables conditional execution on AT-compatible systems.
Boot management utility.
Adjusts the detail level of error reporting.
Alters the default serial driver associated with the AUX device.
Restricts access to character devices outside a virtual \DEV directory.
Loads fundamental device drivers into memory.
Produces a brief beep even if system notifications are disabled.
Specifies the operating system to be loaded next.
Enables or disables extended Ctrl+C checking.
Defines the quantity of disk buffers allocated.
Explicitly loads buffers into High Memory Area or Upper Memory Blocks.
, , (Applicable only to Embedded DOS 6-XL)
Configures cache size and timing settings.
Executes programs within CONFIG.SYS, pausing further processing until completion.
Sets the keyboard Caps Lock state.
, (Exclusive to PTS-DOS)
Defines CD-ROM driver name and buffer quantity.
Continues processing of CONFIG.SYS in a separate file or at a specified label.
, , and additional PTS-DOS-specific directives adjust system behavior and visual presentation.
(Specific to OS/2)
Designates OEM codepages for internationalization purposes.
(DR-DOS 7.02 and newer)
Specifies count, order, I/O addresses, and timeout parameters for COM ports.
, (Introduced in DOS 4.0+ and RxDOS) redefine inline comment characters or ignore subsequent lines depending on OS version.
, (Available from DOS 3.0+, DR-DOS 3.31+, OS/2) enable configuration of international support features.
CPU-related commands such as CPU88, CPU286, CPU386, CPU486, etc., allow conditional execution based on processor type, primarily utilized in PTS-DOS and DR-DOS environments.

This concise summary highlights essential CONFIG.SYS directives pertinent to system configuration management across various DOS platforms, emphasizing their role in enhancing device handling, memory allocation, and boot sequence control critical for business IT infrastructure optimization and performance enhancement.

DTemplate:NbndF

Adjusts relocation of drive descriptor tables.
Defines memory segment address used for multi-sector disk data deblocking operations.
Activates internal debugger capabilities.
Boot management utility.
Loads device drivers into conventional memory.
Loads device drivers into upper memory areas (equivalent to in DRDOS 5.0).
Sets country and codepage configurations for keyboard, screen, and printer devices.
Configures sizes of cache memory segments.
Specifies compatibility mode for floppy disk drives.
Determines display font settings.
Controls loading of DOS into high or upper memory (similar to in DRDOS 5.0).
Loads DOS system tables such as BUFFERS, FCBS, FILES, LASTDRIVE, and STACKS into upper memory blocks.
Defines alternative directories for DOS files lookup paths.
Sets search paths for data files utilized by DOS components.
Establishes physical parameters for disk drives configuration.
Specifies parameters for unrecognized or unknown drives.
Refer to .
Enables error log creation on specified drive using PDUMP.nnn files.
Outputs a simple message on screen during boot or processing phases.
Displays messages incorporating ANSI escape sequences for enhanced formatting.
Implements additional verification steps when launching programs.
Assigns assumed error or return codes for subsequent commands in batch processing.
Manages A20 gate state during program startup sequences.
Terminates CONFIG.SYS processing prematurely before reaching the end of the file (exceptions apply for some SWITCHES and SHELL directives).
Defines hash table size used to accelerate file open operations, differing from MS-DOS/PC DOS FASTOPEN driver behavior.
Specifies number of cached File Control Blocks (FCBs) allowed simultaneously (shares buffer space with FILES directive under DR-DOS).
Similar to FCBS but loads FCBs into upper memory areas instead of conventional memory.
Boot manager utility command.
Sets maximum number of files that can be open at once by the system.
Identical to FILES but allocates file handle buffers into upper memory blocks rather than conventional memory.
Includes execution of designated subsections within CONFIG.SYS files (see IGNORE directive).

GTemplate:NbndI

Waits for a key press or timeout, then assigns the error level to the corresponding ASCII value (or 1024 if timed out).
Resumes CONFIG.SYS processing at the designated label.
Continues nested CONFIG.SYS processing at the specified label, returning afterwards to the prior point.
Refer to , , or for additional details.
Refer to for further information.
Refer to for more context.
Consult or for related instructions.
Consult or for related instructions.
See for additional guidance.
Loads a TSR program into memory following DOS data segment relocation. Compare with INSTCDEX.
Refer to , , or for related commands.
See for further details.
Consult or for additional options.
Activates console and command line history buffer with enhanced pattern search capabilities.
Defines the HMA segment address.
Sets HLT power-saving configuration.
Enables scanning of boot sector viruses.
Loads installable file system drivers.
Prevents execution of specified CONFIG.SYS subsections. See .
Permits selected programs to operate at ring 2, allowing direct hardware I/O access.
Incorporates directives from a different menu block (emulated via GOSUB/RETURN in DR-DOS).
Sets the keyboard Insert mode status.
Installs a TSR program into memory.
Installs a TSR program into upper memory area (equivalent to HIINSTALL in DR DOS 5.0).
Installs TSR program post DOS data segment relocation. Compare: INSTCDEX.
Adjusts PIC interrupt priorities to assign highest priority to a chosen IRQ number.

KTemplate:NbndM

Defines the keyboard layout configuration.
Specifies the address of the relocated keyboard buffer.
Sets the maximum number of accessible drives.
Similar to LASTDRIVE but loads Current Directory Structure into upper memory.
Establishes search paths for DLL files.
Controls handling of legacy software compatibility.
Determines the number of file locks allowed.
Supports boot logos when using PTS-DOS boot manager.
Configures count, order, I/O address, and timeout parameters for LPT1 device.
Applies LPT1 settings equivalently to LPT2 device.
Applies LPT1 settings equivalently to LPT3 device.
Enables and configures LPT4 device similarly to others.
Specifies time before a waiting process receives higher priority scheduling.
Configures memory allocation strategy parameters.
Sets default DOS memory allocation method.
Defines menu option selections.
Specifies menu color schemes (emulatable under DR-DOS).
Sets default menu block (emulatable under DR-DOS).
Defines individual menu blocks (emulatable under DR-DOS).
Activates multitrack disk operation support.
Continues CONFIG.SYS processing from a new file, optionally loading a specific driver and setting %NEWFILE% environment variable.

NTemplate:NbndQ

Defines the default No () character used in Yes/No/Resume prompts.
Controls keyboard [[Num Lock|Template:Keypress]] state, enabling or disabling it by default.
Allows conditional execution based on error levels, e.g., .
Displays a message and waits for key press, similar in function to and in DR-DOS environments.
Requires user confirmation of errors encountered during CONFIG.SYS processing.
Sets buffer size parameters for LPT ports.
Enables conditional execution tailored for PC-compatible systems.
Configures scheduler priority settings.
Adjusts disk I/O priority levels.
Changes default printer device driver assignment (from LPT1 to LPT3 or LPT4).
Controls whether DOS applications are permitted to run.
Loads the user interface shell environment.
Enables conditional execution on IBM PS/1-compatible hardware platforms.
Enables conditional execution on IBM PS/2-compatible hardware platforms.
Suppresses output sent to STDOUT.

RTemplate:NbndT

Activates automatic system reboot upon encountering errors.
Permits inclusion of comments within CONFIG.SYS.
Allocates a drive letter for local block device drivers.
Defines the default character used to resume queries.
Returns nested CONFIG.SYS execution to the previous GOSUB or SWITCH statement, optionally providing a return code.
Sets the size of real mode memory available.
Allows simultaneous loading of programs in the background during CONFIG.SYS processing.
Saves the first character of deleted files in the reserved FAT area.
Specifies video mode under FreeDOS or screen access methods for PTS-DOS.
Controls the keyboard Scroll Lock key status, enabling it on or off.
Establishes environment variables.
Loads the command interpreter shell.
Similar to SHELL but supports pre-allocating space for relocating COMMAND.COM into HMA or UMBs to avoid fragmentation.
Defines keyboard modifier states such as Shift Lock, Num Lock, Scroll Lock, and Insert mode.
Manages file closure behavior when Ctrl+Alt+Del is pressed.
Skips Power-On Self-Test (POST) during reboot sequences.
, STACKSIZE, STACKSHIGH
Configure hardware interrupt stacks and buffer areas across various DOS iterations, with some parameters ignored in newer versions.
, SYSBOOT, SYSGEN, SYSLOAD
PTS-DOS-specific commands handling boot management, alternative operating system boot files, DOS memory configuration, and system loading regions.
, SWITCH
Directs submenu blocks and conditional processing within CONFIG.SYS (not supported in DR-DOS or FreeDOS).
, SWAPPATH
OS/2 directives specifying error log drive and swap file directory paths.
, SWITCHES
Define system switch characters and specialized options across different DOS variants.
, THREADS, TIMESLICE
OS/2 settings addressing hardware fixes, thread concurrency, and scheduler time slice durations.
, TRACE, TRACEBUF
Control timeout settings for CONFIG.SYS procedures and activate tracing/logging features in DR-DOS, PTS-DOS, and OS/2 systems.
, TRAPDUMP
PTS-DOS directive managing temporary file extensions and OS/2 logging of comprehensive error dumps.

UTemplate:NbndZ

Assigns a specific memory segment as an Upper Memory Block (UMB) for DOS usage.
Sets up the UMB server configuration.
Defines address ranges designated as UMB RAM areas.
Toggles disk write verification on or off.
Specifies the DOS version reported to applications.
Configures VGA display parameters.
Indicates current video mode, similar to FreeDOS’s SCREEN directive.
Determines whether virtual DMA is permitted.
Enables or disables processor Virtual Mode Extensions (VME).
Manages VxD driver settings for Windows environments.
Configures system support parameters for Windows operation.
Adjusts relocation settings for the Extended BIOS Data Area (XBDA).
Executes conditionally on XT-compatible machines only.
Enables built-in Year 2000 compliance support.
Sets default affirmative response character in prompts.
Controls tracking of file deletions.

Issues

Although the system can initiate booting without CONFIG.SYS or AUTOEXEC.BAT files, these are crucial for full customization and meeting software demands. Corruption or damage to either file requires diagnostic efforts.

When a SHELL directive is absent from CONFIG.SYS or if the file is missing or damaged, DOS attempts to locate COMMAND.COM in the root directory. DOS versions prior to 6.0 will fail to start without this file. In contrast, MS-DOS 6.0/PC DOS 6.1 and Novell DOS 7 and later will prompt users to specify a valid command interpreter path. This prompt also appears if COMMAND.COM terminates prematurely or is aborted, allowing limited shell replacement during runtime without rebooting.

In systems with dual-boot configurations, COMMAND.COM from MS-DOS 7.0 and above is incompatible with DR-DOS. DR-DOS version 7.02 and later enforce SHELL directives during skip, trace, or step modes by requiring users to input a valid shell before attempting to load COMMAND.COM from the root directory if none is found.

CONFIG.SYS size restrictions differ depending on the operating system—MS-DOS/PC DOS limits file size to several kilobytes (up to around 64 KB), whereas DR-DOS imposes no practical size limit due to its line-by-line interpretation rather than tokenization. This approach grants DR-DOS users enhanced control over driver and TSR loading order through DEVICE and INSTALL commands, enabling resolution of load conflicts and seamless integration of temporary programs into the CONFIG.SYS sequence.

Earlier MS-DOS releases restricted SHELL command line length to a maximum of 31 characters. Later versions extended this limit up to 128 characters, while DR-DOS accepts up to 255 characters. It should be noted that CONFIG.SYS directives do not support long filenames.

Dual Booting DOS and Windows 9x

When Windows 95 is installed over a pre-existing DOS or Windows environment, the system renames CONFIG.SYS and AUTOEXEC.BAT to CONFIG.DOS and AUTOEXEC.DOS to enable dual boot functionality between Windows 9x and DOS. During a DOS startup, these files are temporarily reverted to their original names, CONFIG.SYS and AUTOEXEC.BAT. Backup copies of Windows 95 configuration files are saved as CONFIG.W40 and AUTOEXEC.W40.

In the case of installing Caldera DR-DOS versions 7.02 or 7.03 alongside Windows 95, the Windows CONFIG.SYS and AUTOEXEC.BAT filenames remain unchanged, while DR-DOS employs DCONFIG.SYS and AUTODOS7.BAT for its startup settings.

OS/2 / Windows NT

OS/2 relies heavily on CONFIG.SYS for system setup, driver loading, and environment configuration prior to launching its graphical user interface.

Within the OS/2 subsystem embedded in Windows NT, what OS/2 applications recognize as CONFIG.SYS is actually stored within the system registry. Many CONFIG.SYS commands in OS/2 are either undocumented or lack comprehensive documentation.

CONFIG.SYS continues to be used 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 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
  • User Manual for PTS-DOS 2000 Pro including CONFIG.SYS directives description
  • Unofficial German PTS-DOS FAQ (PTS/FAQD) with additional CONFIG.SYS directive information