Jump to content

Colon (CONFIG.SYS directive)

From Alfawiki
Adapted from the English Wikipedia article Colon (CONFIG.SYS directive), available under CC BY-SA 4.0Updated 9 August 20255 sources
CONFIG.SYS
Company typeConfiguration file
IndustryComputer software
Founded1983 (with DOS version 2.0)
ProductsConfiguration for DOS and OS/2 operating systems

CONFIG.SYS serves as the main configuration file for both DOS and OS/2 operating systems. This specialized ASCII text file includes setup instructions accessible to users, which are interpreted by the operating system's DOS BIOS during the startup sequence. CONFIG.SYS was first introduced with DOS version 2.0.

Usage

The directives within CONFIG.SYS are used to configure devices, applications, and memory handling in DOS. Once CONFIG.SYS has been processed, DOS launches the command interpreter specified by the SHELL directive; if none is defined, it defaults to COMMAND.COM. Subsequently, the command shell executes AUTOEXEC.BAT.

Typically, the file consists of name=value entries that set adjustable parameters or load device drivers and terminate-and-stay-resident programs (TSRs) into memory.

In DOS environments, CONFIG.SYS is located in the root directory of the bootable drive.

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

- Advanced editions such as Concurrent DOS 386, Concurrent DOS XM, Multiuser DOS, and REAL/32 prioritize CCONFIG.SYS or CCONFIG.INI, storing configurations in CCONFIG.BIN, which can be managed using CONFIG.EXE. - From version 3.31 onwards, DR DOS uses DCONFIG.SYS as the preferred configuration file to support disk compression utilities and multi-boot environments. - OpenDOS versions 7.01 and DR-OpenDOS 7.02 look for ODCONFIG.SYS; some releases of DR-DOS also accept DRCONFIG.SYS. - Starting with DR-DOS 6.0, users can customize default system file extensions via SYS /DR:ext, allowing multiple system file sets to coexist and be selected through boot loaders like LOADER. - The SHELL command can specify alternative AUTOEXEC.BAT files using /P[:filename.ext], functionality also supported by 4DOS. - DR-DOS 6.0 and later versions introduce CHAIN=filespec to continue processing additional configuration files, with optional label targeting available from version 7.02 onward. - Beginning with DR-DOS 7.03, the SYS /A command enables copying of CONFIG.SYS and AUTOEXEC.BAT alongside system files.

Other systems use different configuration filenames: FreeDOS employs FDCONFIG.SYS; RxDOS uses RXCONFIG.SYS; and PTS-DOS utilizes CONFIG.PTS.

In Windows 95 and Windows 98, which are based on DOS, both CONFIG.SYS and AUTOEXEC.BAT exist but are frequently empty. Unlike its predecessors, Windows Me does not process CONFIG.SYS during boot-up; instead, it retrieves environment variables directly from the Windows Registry.

For FlexOS, CONFIG.SYS is a binary file specifying resource managers and device drivers that are loaded during startup.

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>

:;*?!

Marks labels within CONFIG.SYS that serve as jump destinations for directives such as , , , , and .
Functions similarly to , also used for inline commentary following other commands.
Used at the beginning of inline comments alongside ;.
Prompts a Yes/No confirmation from the user before executing subsequent CONFIG.SYS instructions. DOS versions 6.0 and later offer a comparable feature by appending after a directive (e.g., ).
Forces unconditional execution of the following CONFIG.SYS instruction.

ATemplate:NbndC

Determines whether programs may be terminated upon encountering errors.
Sets which drives retain file access timestamps within FAT file systems.
Enables conditional execution on AT-compatible hardware.
Manages boot options.
Adjusts the level of detail in error message output.
Alters the default internal serial driver for the AUX device.
Prevents character devices from being accessible outside the phantom \DEV directory.
Loads a fundamental device driver into system memory.
Produces a brief beep sound irrespective of notification settings.
Indicates the operating system to launch next.
Activates or deactivates advanced Ctrl+C interrupt checking.
Specifies how many disk buffers should be allocated.
Explicitly loads buffers either into the High Memory Area (HMA) or Upper Memory Blocks (UMB).
, CACHETTL, CACHEFLUSH} (Embedded DOS 6-XL only)
Configure cache block quantities and flushing intervals.
Executes programs listed in CONFIG.SYS in the foreground, pausing further processing until completion.
(DR-DOS 7.02+)
Controls the keyboard's Caps Lock state.
, CDDBUFFERS} (PTS-DOS only)
Designates CD-ROM driver and buffer settings.
(DR DOS 5.0+, Embedded DOS)
Continues parsing CONFIG.SYS from a different file or label.
, CLS, CODEPAGE} (PTS-DOS or OS/2 only)
Define clock type, clear screen command, and OEM codepage(s).
, COLOR} (PTS-DOS only)
Sets CMOS RAM addresses and configures boot menu color schemes.
, COM2, COM3, COM4} (DR-DOS 7.02+)
Configures serial port parameters including I/O addresses and timeout intervals.
, COMMENT}, COUNTRY}, CPOS}, CPSW} (various DOS versions)
Manage DMA buffer settings, inline comments, internationalization support, cursor positioning, and codepage switching accordingly.
CPU directives (PTS-DOS only) specify conditional execution based on CPU model and speed (e.g., CPU88, CPU386+).

DTemplate:NbndF

Adjusts relocation settings for drive descriptor tables.
Defines memory segment limits for multi-sector disk data deblocking operations.
Activates internal debugger functionality.
Boot management utility.
Loads a device driver into memory space.
Loads device drivers into upper memory area (similar to in DRDOS 5.0).
Sets country and codepage information for keyboard, screen, and printer devices.
Configures sizes of cache memory pools.
Specifies compatibility mode for floppy disk drives.
Determines display font selection.
Controls loading DOS into high memory and/or employing upper memory areas.
Loads DOS system tables (BUFFERS, FCBS, FILES, LASTDRIVE, STACKS) into upper memory regions.
Defines alternative search paths for DOS system files.
Sets data file search directories.
Defines physical parameters for disk drives.
Specifies configuration for unrecognized or unknown drives.
Refer to .
Enables drive support for PDUMP.nnn error logging files.
Outputs messages directly to the screen.
Displays messages incorporating ANSI escape sequences.
Specifies additional checks when launching programs.
Assigns expected error or return codes for subsequent commands.
Determines A20 gate state during program startup.
Terminates CONFIG.SYS processing prematurely except for SWITCHES and SHELL directives.
Configures hash table size to accelerate file opening operations (distinct from MS-DOS/PC DOS FASTOPEN driver).
Sets number of cached File Control Blocks (FCBs) allowed open simultaneously (shares buffer with FILES under DR-DOS).
Similar to FCBS but explicitly loads into upper memory area.
Boot manager utility.
Specifies maximum number of files that may be opened concurrently.
Equivalent to FILES but explicitly loads file handles into upper memory area.
Enables execution of specific CONFIG.SYS subsections (see IGNORE).

GTemplate:NbndI

Awaits key input or timeout, returning ASCII code on key press or 1024 if timeout occurs.
Resumes processing of CONFIG.SYS at a designated label.
Continues nested CONFIG.SYS parsing at a specified label, with to return.[1]
Refer to , , or for additional details.
Consult for further information.
See for relevant context.
Refer to or for related commands.
See or for further guidance.
Consult for more details.
Loads TSR programs following relocation of DOS data segment. Compare with INSTCDEX.
Refer to , , or for related usage.
See .[1][2][3]
Consult or for additional information.
Activates console and command line history buffers and supports advanced pattern searches.
Defines the address of the HMA segment.
Configures energy-saving settings via HLT instruction.
Enables scanning of boot sector for viruses.
Loads installable file system drivers.
Prevents execution of particular CONFIG.SYS subsections.
Permits specified applications to operate at ring 2, allowing direct hardware I/O access.
Incorporates directives from another menu block (emulated by GOSUB/RETURN in DR-DOS).
Sets the keyboard's Insert mode status.[1]
Loads a TSR program into memory.[4][5]
Installs TSR into upper memory area (equivalent to HIINSTALL in DR DOS 5.0).
Loads TSR after relocating the DOS data segment. Compare with INSTCDEX.
Adjusts PIC interrupt priority, assigning highest priority to the specified IRQ.

KTemplate:NbndM

Defines the keyboard layout configuration.
Specifies the relocated keyboard buffer address.
Sets the maximum number of accessible drives.
Functions like LASTDRIVE but loads Current Directory Structure (CDS) into upper memory.
Lists directories to search for DLL files.
Provides compatibility support for legacy programs.
Sets the number of allowable file locks.
Manages boot logo display and startup message settings.
Configures count, sequence, I/O address, and timeout parameters for LPT1 device.
Equivalent configuration for LPT2 device as LPT1 settings.
Applies similar settings as LPT1 but for LPT3 device.
Enables and configures the LPT4 device parameters.
Defines delay before increasing process priority level.
Specifies strategy for memory allocation management.
Sets default DOS memory allocation method.
Declares menu options available in CONFIG.SYS.
Determines menu color schemes (can be emulated under DR-DOS).
Specifies default menu block (emulatable under DR-DOS).
Defines a particular menu block (emulatable under DR-DOS).
Activates multitrack disk operations support.
Continues CONFIG.SYS processing from a new file after loading a device driver and setting %NEWFILE% environment variable.

NTemplate:NbndQ

Defines the default No () response character in Yes/No/Resume prompts.
Sets initial status of keyboard [[Num Lock|Template:Keypress]] key as on or off.
Enables conditional execution based on most recent error code, e.g. .
Displays text and waits for a keypress, similar to and commands in DR-DOS environments.
Requires user confirmation when errors occur during CONFIG.SYS processing.
Configures buffer sizes used by LPT ports.
Enables conditional execution on PC-compatible systems only.
Sets scheduler priority parameters.
Assigns priority levels specifically for disk I/O processes.
Changes default printer device driver assignment (e.g., switching from LPT1 to LPT3 or LPT4).
Specifies whether DOS applications are permitted to run.
Loads a user interface shell environment.
Allows conditional execution on IBM PS/1-compatible machines only.
Enables conditional execution on IBM PS/2-compatible systems only.
Disables output display on STDOUT (mutes screen output).

RTemplate:NbndT

Activates automatic system reboot upon encountering errors.
Permits inclusion of comments within CONFIG.SYS (ignored in PTS-DOS).
Allocates a drive letter for local block device drivers.
Establishes the default Resume () character for Yes/No/Resume prompts.
Returns nested CONFIG.SYS processing control to the previous GOSUB or SWITCH point, optionally providing a return code.
Specifies the size of real mode memory.
Enables concurrent program loading within CONFIG.SYS, functionally similar to CALL or INSTALL commands in DOS.
Determines whether the first character of deleted files is recorded in the FAT reserved area.
Defines video mode settings for FreeDOS or screen access methods for PTS-DOS.
Sets the keyboard’s Scroll Lock status.
Assigns environment variables.
Loads the command interpreter shell.
Similar to SHELL but allows preloading resident components into HMA or UMBs to prevent fragmentation, beneficial when using third-party shells.
Configures keyboard modifier states such as Shift Lock, Num Lock, Scroll Lock, and Insert mode.
Determines if files close automatically when Ctrl+Alt+Del is pressed.
Skips the Power-On Self-Test (POST) during reboot.
, STACKSIZE, STACKSHIGH
Define hardware interrupt stack sizes and buffer locations across multiple DOS versions to optimize memory usage.
(PTS-DOS)
Settings related to boot manager configuration.
, SUPPRESSPOPUPS, SWAPPATH
Control submenu blocking, error log drive assignments, and swap file directory paths primarily in OS/2 environments.
, SWITCHES, SWITCHAR
Enable conditional processing within CONFIG.SYS, special option flags, and define system switch characters across different DOS variants.
, SYSGEN, SYSLOAD
Configure alternative operating system boot files, DOS memory locations, and system loading areas specific to PTS-DOS.
, SYSTOUMB
Manage allocation of system memory pools and loading into upper memory blocks for Embedded DOS and PTS-DOS systems.
, TIMESLICE
Set parameters for concurrent thread execution and scheduler time slices under OS/2.
, TRACE, TRACEBUF
Control CONFIG.SYS timeout behavior and single-step execution with logging buffers for debugging purposes in DR-DOS, PTS-DOS, and OS/2 environments.
, TRAPDUMP
Configure temporary file extensions in PTS-DOS and enable detailed error logging on OS/2 Warp 4 and later.

UTemplate:NbndZ

Sets a specific segment for DOS management as Upper Memory Block (UMB).
Defines which UMB server is utilized.
Identifies address ranges allocated as UMB RAM.
Enables or disables verification of disk writes.
Specifies the DOS version reported to applications.
Configures VGA display status parameters.
Indicates the current video mode setting.
Determines whether virtual DMA is permitted.
Controls deactivation of processor Virtual Mode Extensions (VME).
Configures VxD driver settings for Windows environments.
Sets system support parameters for Windows operation.
Manages relocation of the Extended BIOS Data Area (XBDA).
Executes conditionally on XT-compatible machines.
Configures built-in Year 2000 (Y2K) support features.
Defines default Yes character used in prompts.
Manages tracking of file deletions.

Issues

Although the system can start without CONFIG.SYS or if it becomes corrupted, both this file and AUTOEXEC.BAT are crucial for complete boot processes and operating system customization. These files specify required software components and configuration settings. Repair is necessary when either file is damaged.

When CONFIG.SYS lacks a SHELL directive—or if it is missing or corrupted—DOS attempts to locate COMMAND.COM in the root directory. Versions prior to 6.0 will fail to boot if COMMAND.COM cannot be found. Starting with MS-DOS 6.0/PC DOS 6.1, Novell DOS 7, and subsequent releases, a prompt appears requesting the command processor path if COMMAND.COM is absent or aborted. This recovery prompt also permits limited runtime shell replacement without requiring a reboot.

COMMAND.COM from MS-DOS 7.0 onward is incompatible with DR-DOS but typically resides in the C: root directory within dual-boot configurations. DR-DOS 7.02 and later prevent bypassing SHELL directives during skip, trace, or step modes by requiring valid shell filenames before loading COMMAND.COM. Some versions restore skip functionality to recover from invalid SHELL arguments.

CONFIG.SYS size restrictions vary by system: MS-DOS/PC DOS limits size to several kilobytes (up to 64 KB in recent versions), whereas DR-DOS imposes no practical limit aside from file system constraints. MS-DOS compiles CONFIG.SYS into a tokenized format and processes directives in a predetermined sequence. In contrast, DR-DOS interprets CONFIG.SYS line-by-line, allowing precise control over driver and TSR load order through DEVICE and INSTALL commands. This approach facilitates resolving conflicts during loading and enables dynamic integration of temporary programs.

For MS-DOS/PC DOS versions 2.0 through 4.01, the SHELL command line length is limited to 31 characters; later versions extend this limit to 128 characters. DR-DOS supports up to 255 characters for this directive. It should be noted that CONFIG.SYS commands do not accept long filenames.

Dual booting DOS and Windows 9x

When Windows 95 is installed over a pre-existing DOS or Windows environment, the files CONFIG.SYS and AUTOEXEC.BAT are renamed to CONFIG.DOS and AUTOEXEC.DOS to enable dual boot functionality between Windows 9x and DOS. During a DOS boot, these renamed files are temporarily reverted to their original filenames. Meanwhile, backup copies of the Windows 95 versions are preserved under the names CONFIG.W40 and AUTOEXEC.W40.

In cases where Caldera DR-DOS 7.02 or 7.03 is installed alongside Windows 95, the Windows CONFIG.SYS and AUTOEXEC.BAT files retain their original names, whereas DR-DOS utilizes DCONFIG.SYS and AUTODOS7.BAT for its initialization process.

OS/2 / Windows NT

OS/2 relies heavily on CONFIG.SYS to set up drivers and environment variables before launching its graphical user interface.

Within the OS/2 subsystem of Windows NT, configuration details for OS/2 applications that would normally reside in CONFIG.SYS are instead stored within the system registry rather than in a physical file.

There are numerous undocumented directives available for CONFIG.SYS in OS/2.

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

See also

External links

  • AUTOEXEC.BAT and CONFIG.SYS details – Computer Hope
  • Overview of Windows 98 / MS-DOS 7.10 CONFIG.SYS commands (archived)
  • CONFIG.SYS Command Reference – Caldera (archived) (partial DR-DOS 7 command list)
  • Explanation of FreeDOS CONFIG.SYS commands
  • PTS-DOS 2000 Pro User Guide including CONFIG.SYS commands (partial)
  • Unofficial German PTS-DOS FAQ (2004) featuring extra CONFIG.SYS commands
  1. ↑ 1.0 1.1 1.2 Cite error: Invalid <ref> tag; no text was provided for refs named Paul_1997_OD-A3
  2. ↑ Cite error: Invalid <ref> tag; no text was provided for refs named Paul_2000_CONFIG
  3. ↑ Cite error: Invalid <ref> tag; no text was provided for refs named Paul_2004_YESCHAR
  4. ↑ Cite error: Invalid <ref> tag; no text was provided for refs named Paul_1997_NWDOSTIP
  5. ↑ Cite error: Invalid <ref> tag; no text was provided for refs named 4DOS_8.00_HELP