Jump to content

SCREEN (CONFIG.SYS directive)

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

CONFIG.SYS serves as the central configuration file for DOS and OS/2 operating systems. This particular ASCII text document holds setup commands that the operating system's DOS BIOS—usually located in IBMBIO.COM or IO.SYS—interprets during the startup sequence. CONFIG.SYS was first introduced with DOS version 2.0.

Usage

Within CONFIG.SYS, directives are used to tailor DOS settings for hardware devices and software applications, including memory management utilities. Once CONFIG.SYS is processed, DOS launches the command interpreter specified by the SHELL directive; if none is given, it defaults to COMMAND.COM, which then executes the instructions found in AUTOEXEC.BAT.

The file predominantly contains name=value pairs that define system parameters or load components such as device drivers and terminate-and-stay-resident programs (TSRs). It is located in the boot drive’s root directory.

Certain MS-DOS variants and other DOS-based systems utilize alternative configuration filenames that take precedence over CONFIG.SYS:

- Variants like Concurrent DOS 386, Concurrent DOS XM, Multiuser DOS, and REAL/32 employ CCONFIG.SYS or CCONFIG.INI (in Multiuser DOS) and MCONFIG.SYS (in REAL/32). These environments enable advanced configuration stored in binary files such as CCONFIG.BIN, which are typically edited using CONFIG.EXE.

- In systems like DR DOS 3.31 and later, PalmDOS 1.0, and Novell-based DOS versions, DCONFIG.SYS overrides CONFIG.SYS to facilitate disk compression setups and multi-boot arrangements. Additionally, OpenDOS 7.01 and DR-OpenDOS 7.02 recognize ODCONFIG.SYS or DRCONFIG.SYS as configuration files.

- Starting with DR-DOS 6.0, users can modify default file extensions via SYS /DR:ext, allowing multiple sets of system files to coexist in a single root directory; boot loaders such as LOADER can select among these sets.

Enhanced capabilities include specifying alternative AUTOEXEC.BAT scripts through SHELL /P[:filename.ext], a feature also supported by 4DOS. The CHAIN=filespec command permits linking to additional configuration files, optionally jumping to specific labels, thereby supporting modular configuration schemes.

- From DR-DOS 7.03 onward, the command SYS /A copies both CONFIG.SYS and AUTOEXEC.BAT alongside system files during installation.

Other DOS derivatives provide similar functionality: FDCONFIG.SYS is used in FreeDOS, RXCONFIG.SYS appears in RxDOS version 7.24 and above, and CONFIG.PTS is found in PTS-DOS.

In Windows 95 and Windows 98, which are built upon DOS foundations, CONFIG.SYS and AUTOEXEC.BAT exist on their boot drives but are usually empty. Conversely, Windows Me does not process CONFIG.SYS at startup; instead, it retrieves 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 during system initialization.

Example

Sample CONFIG.SYS file 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>

:;*?!

Establishes labels within CONFIG.SYS to serve as jump points for , , , , and commands.
Functions similarly to , but is applicable for in-line remarks following other CONFIG.SYS commands. (In MS-DOS/PC DOS, inline comments enclosed in double quotes are not disregarded.)
Used at the start of in-line comments, alongside the ; directive.
Presents a Yes/No prompt with an optional message to confirm execution of subsequent commands. (FreeDOS supports conditional prompts with boot menus.) DOS 6.0 and later versions provide a comparable feature by appending after the command (e.g., ).
Forces unconditional execution of the next CONFIG.SYS command.

ATemplate:NbndC

Determines whether programs can be interrupted upon encountering errors.
Configures which drives record file access timestamps in FAT file systems.
Enables conditional execution on AT-compatible hardware.
Boot loader utility.
Adjusts the verbosity level of error messages.
Changes the default internal serial driver assigned to the AUX device.
Prevents character devices from being accessible outside the phantom \DEV directory.
Loads core device drivers into memory.
Produces a brief beep even when audible alerts are disabled.
Defines the operating system to boot next.
Enables or disables extended Ctrl+C checking.
Specifies how many disk buffers to allocate.
Explicitly loads buffers into HMA or UMB memory areas.
Sets the maximum number of cache blocks dynamically allocated.
Defines maximum idle time before unused cache blocks return to the pool.
Specifies maximum duration before dirty cache blocks are flushed to disk.
Loads programs within CONFIG.SYS, running them in the foreground and halting further processing until completion.
Determines keyboard Caps Lock status at startup.
Identifies the CD-ROM hardware driver name.
Sets the number of buffers allocated for CD-ROM access.
Continues processing CONFIG.SYS from a new file or label.
Specifies the type of system clock used.
Clears the screen display.
Defines OEM codepage(s).
Specifies CMOS RAM address locations.
Configures color schemes for boot menus.
Sets parameters for COM1 device including I/O address and timeout values.
Similarly configures COM2 device parameters.
Likewise configures COM3 device parameters.
Likewise configures COM4 device parameters.
Designates buffer used for DMA operations.
Redefines characters that initiate inline comments or causes line ignoring behavior.
Activates and configures internationalization support features.
Sets cursor position for configuration menus on screen.
Enables support for switching codepages dynamically.
Defines RAM refresh timing speed settings.
CPU-specific conditional directives (CPU88, CPU86, CPU286, CPU386, CPU486 and their "+" variants) primarily exist in PTS-DOS and DR-DOS environments to execute commands conditionally based on CPU type or generation.

DTemplate:NbndF

Adjusts relocation settings for drive descriptor tables.
Specifies memory segment address dedicated to multi-sector disk data deblocking operations.
Enables support for an internal debugger environment.
Boot loader utility component.
Loads device drivers into conventional memory space.
Loads device drivers into upper memory blocks (equivalent to in DRDOS 5.0).
Configures country codes and codepage information for keyboard, screen, and parallel port devices (KBD, SCR, LPT).
Sets cache memory size allocations.
Defines floppy disk compatibility modes.
Specifies font used for display output.
Controls loading of DOS into high or upper memory areas (similar functionality as in DRDOS 5.0).
Loads DOS configuration tables (BUFFERS, FCBS, FILES, LASTDRIVE, STACKS) into upper memory space.
Specifies alternative search paths for DOS system files.
Defines search paths for data files used by DOS applications.
Establishes physical disk drive parameters explicitly.
Sets parameters for drives that are not otherwise recognized by the system.
Refer to .
Activates PDUMP.nnn error logging and assigns drive location for logs storage.
Outputs a message directly onto the screen display.
Displays messages including ANSI escape sequences for formatting control.
Enables additional integrity checks when launching programs.
Defines assumed error or return codes for subsequent command executions.
Sets A20 gate state before starting a program to control memory addressing behavior.
Terminates CONFIG.SYS processing prematurely (with exceptions such as SWITCHES and SHELL directives under certain conditions).
Configures hash table size used for accelerating file open operations (differs from MS-DOS/PC DOS FASTOPEN driver implementation).
Specifies number of cached File Control Blocks (FCBs) allowed open simultaneously (shares buffer space with FILES under DR-DOS).
Similar to FCBS but loads FCBs into upper memory areas instead of conventional memory space.
Boot loader utility module component again referenced here.
Sets maximum number of files that can be opened simultaneously by DOS applications.
Similar to FILES directive but loads file handles into upper memory regions rather than conventional memory space.
Includes execution of designated CONFIG.SYS subsections via specified labels or 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 a specified label, returning afterward to the previous point.
Refer to , , or for additional details.
Consult for further information.
See for more context.
Refer to or for related commands.
Consult or for additional guidance.
See for relevant information.
Loads a TSR program into memory following DOS data segment relocation. Compare with INSTCDEX.
Refer to , , or for more details.
See for further explanation.
Consult or for related instructions.
Enables command line and console history buffers with advanced pattern searching capabilities.
Defines the address of the High Memory Area (HMA) segment.
Configures the processor’s HLT power-saving mode.
Determines whether the system performs boot sector virus checks.
Loads installable file system drivers.
Prevents execution of specific CONFIG.SYS subsections.
Permits certain applications to operate at ring 2, allowing direct hardware I/O access.
Incorporates directives from another menu block (can be emulated with GOSUB/RETURN in DR-DOS).
Sets the status of keyboard Insert mode.
Installs a TSR program into memory.
Loads TSR programs into upper memory (equivalent to HIINSTALL in DR DOS 5.0).
Installs TSR programs post DOS data segment relocation, similar in function to INSTALL.
Adjusts PIC interrupt priorities by rotating them to prioritize a specified IRQ number.

KTemplate:NbndM

Defines the keyboard layout configuration.
Specifies the address of the relocated keyboard buffer area.
Sets the maximum number of accessible drive letters.
Functions like LASTDRIVE but also loads Current Directory Structure into upper memory.
Lists paths where DLL files are searched for.
Manages compatibility settings for legacy software applications.
Configures the number of allowable file locks.
Controls display options for boot logos and startup messages.
Specifies count, sequence, I/O address, and timeout parameters for the LPT1 device.
Applies identical settings as LPT1 for LPT2 device configuration.
Mirrors LPT1 settings for LPT3 device configuration.
Activates and configures the LPT4 device port.
Sets delay intervals before elevating process priority levels.
Defines memory allocation policies and strategies.
Specifies default DOS memory allocation behavior.
Declares menu option entries within CONFIG.SYS menus.
Sets color schemes for menus (can be emulated under DR-DOS).
Determines which menu block is active by default (emulatable in DR-DOS).
Defines a specific menu block within CONFIG.SYS (emulatable under DR-DOS).
Enables operations involving multitrack disk access.
Resumes CONFIG.SYS processing from a new file after driver loading and setting of %NEWFILE% environment variable.

NTemplate:NbndQ

Sets the default “No” character used in Yes/No/Resume prompts.
Determines whether keyboard [[Num Lock|Template:Keypress]] is enabled or disabled by default.
Executes commands conditionally based on the last return code or error status, e.g. .
Similar to and , displays text and waits for a key press response from the user.
Requires confirmation from the user when errors occur during CONFIG.SYS processing.
Configures buffer sizes for printer ports LPT1 through LPT3.
Executes commands conditionally on PC-compatible systems only.
Sets parameters for priority scheduling of processes.
Adjusts priority levels specifically for disk I/O operations.
Changes the default printer device driver assignment among LPT1, LPT2, LPT3, or LPT4 ports.
Specifies whether DOS applications are permitted to run on the system.
Loads a user interface component during startup.
Conditional execution targeting IBM PS/1-compatible hardware platforms.
Conditional execution targeting IBM PS/2-compatible hardware platforms.
Suppresses output sent to STDOUT display.

RTemplate:NbndT

Enables automatic system reboot upon encountering errors.
Permits inclusion of comments within CONFIG.SYS.
Reserves drive letters for local block device drivers.
Sets the default Resume () response character in Yes/No/Resume prompts.
Returns nested CONFIG.SYS processing control to the prior GOSUB or SWITCH point, optionally with a return code.
Defines the size of real mode memory.
Allows simultaneous loading of programs in CONFIG.SYS running in the background.
Stores the initial character of deleted files within the FAT reserved area.
Specifies video modes under FreeDOS or screen access methods under PTS-DOS.
Determines the Scroll Lock key status on the keyboard (enabled or disabled).
Establishes environment variables.
Loads the command interpreter shell.
Similar to SHELL but supports a SIZE parameter to relocate COMMAND.COM into HMA or UMBs, reducing fragmentation.
Specifies keyboard modifier states such as Shift Lock, Num Lock, Scroll Lock, and Insert mode.
Determines whether files close upon pressing Ctrl+Alt+Del.
Controls whether POST is bypassed during reboot.
Defines the number of stacks allocated for hardware interrupts.
Sets default stack size for newly created threads.
Functions like STACKS but buffers are loaded into upper memory blocks.
Configures boot manager settings.
Defines submenu blocks (emulatable under DR-DOS).
Directs error logs to a drive instead of displaying popup screens.
Specifies the path for swap files.
Enables conditional continuation of nested CONFIG.SYS processing at specific labels based on key presses, with RETURN reverting to the previous point.
Sets the default system switch character ('/' or '-').
Specifies special options that are ignored under PTS-DOS.
Activates a correction for the FPU rounding error.
Indicates an alternative DOS OS filename for booting purposes.
Configures memory locations for DOS components.
Loads system components from alternative disk areas.
Defines the size of the system memory pool used for dynamic allocations.
Loads DOS data and code into UMBs when specified.
Determines the number of concurrent threads managed by the system scheduler.
Sets timeout values for CONFIG.SYS single-stepping and default responses for Yes/No prompts and SWITCH selections (supported by PTS-DOS).
Configures minimum and maximum time slices for the scheduler.
Specifies temporary file extensions.
{ { nobold |( DR - DOS 7 .02+, PTS - DOS ; OS /2 ) }}
Globally or locally enables/disables CONFIG.SYS (and AUTOEXEC.BAT) single-stepping (functionality varies under OS/2).
{ { mono | 1 = TRACEBUF }}{ { nobold |( OS /2 ) }}
Defines size of TRACE log buffer.
{ { mono | 1 = TRAPDUMP }}{ { nobold |( OS /2 3 .0+ ) }}
Records detailed error logs.


UTemplate:NbndZ

Configures DOS to allocate a specific segment as UMB memory.
Sets which UMB server is utilized.
Defines address ranges designated as UMB RAM.
Enables or disables verification of disk writes.
Reports a specified DOS version to applications.
Manages VGA display status settings.
Specifies the active video mode currently in use.
Determines whether virtual DMA is permitted.
Controls deactivation of processor Virtual Mode Extensions.
Configures VxD drivers intended for Windows environments.
Sets system support parameters for Windows operation.
Manages relocation of the Extended BIOS Data Area (XBDA).
Enables conditional execution on XT-compatible hardware platforms.
Configures built-in Year 2000 compliance support features.
Defines default 'Yes' character used in Yes/No prompts.
Manages tracking of file deletions.

Issues

Although the system can start without CONFIG.SYS or AUTOEXEC.BAT, these files are crucial for tailoring the operating system and handling software dependencies. Troubleshooting becomes necessary if these files are missing or corrupted.

In the absence of a SHELL directive in CONFIG.SYS—or if the file is damaged or unavailable—DOS attempts to locate COMMAND.COM in the root directory of the boot drive. Older DOS versions will not boot without it, whereas MS-DOS 6.0, PC DOS 6.1, and Novell DOS 7 and later versions display a prompt requesting the command processor's path when it cannot be found. This recovery prompt also appears if the primary command shell terminates unexpectedly or is closed intentionally, providing an opportunity to replace the shell during runtime without rebooting.

COMMAND.COM from MS-DOS 7.0 and later is incompatible with DR-DOS, which typically resides in C:\ on dual-boot configurations. Starting with DR-DOS 7.02, bypassing SHELL directives during skip, trace, or step modes is prevented to avoid conflicts. Additional key sequences enable recovery from invalid SHELL parameters by prompting users to enter a valid shell filename before loading COMMAND.COM.

The maximum CONFIG.SYS size differs between systems: MS-DOS and PC DOS limit it to a few kilobytes (up to 64 KB in newer editions), while DR-DOS imposes no size restrictions aside from those dictated by the file system. MS-DOS processes CONFIG.SYS into a tokenized structure in memory, organizing directives by category (loading device drivers prior to TSRs). Conversely, DR-DOS parses directives sequentially, offering granular control over driver and TSR loading order through DEVICE and INSTALL commands. This approach facilitates resolving load order conflicts and supports conditional execution based on hardware detection or user input, enhancing customization and debugging options.

The SHELL line length was limited to 31 characters in MS-DOS/PC DOS versions 2.0 through 4.01, increasing to 128 characters in later releases; DR-DOS allows up to 255 characters. None of the CONFIG.SYS directives support long filenames.

Dual booting DOS and Windows 9x

When Windows 95 is installed over an existing DOS/Windows environment, the CONFIG.SYS and AUTOEXEC.BAT files are renamed to CONFIG.DOS and AUTOEXEC.DOS respectively, enabling dual boot functionality between Windows 9x and DOS. Booting into DOS temporarily restores these files to their original names. Backup copies of Windows 95 versions are saved as CONFIG.W40 and AUTOEXEC.W40.

In setups where Caldera DR-DOS 7.02 or 7.03 coexists with Windows 95, Windows’ CONFIG.SYS and AUTOEXEC.BAT remain unchanged. Instead, DR-DOS utilizes its own startup files named DCONFIG.SYS and AUTODOS7.BAT.

OS/2 / Windows NT

OS/2 depends extensively on CONFIG.SYS for configuring device drivers and environment variables before launching its graphical user interface.

Within the OS/2 subsystem of Windows NT, CONFIG.SYS is presented to OS/2 applications but is actually stored within the system registry.

A significant number of CONFIG.SYS directives in OS/2 lack thorough documentation or are poorly described.

CONFIG.SYS continues to be employed by OS/2 derivatives such as eComStation and ArcaOS.

See also

External links

  • Information on AUTOEXEC.BAT and CONFIG.SYS – Computer Hope (2017)
  • Overview of Windows 98 / MS-DOS 7.10 CONFIG.SYS commands – Microsoft Support (archived)
  • CONFIG.SYS command guide – Caldera (1998) (partial DR-DOS 7 directives)
  • FreeDOS CONFIG.SYS command descriptions – FreeDOS Help
  • User guide for PTS-DOS 2000 Pro (includes partial CONFIG.SYS directives)
  • Unofficial German PTS-DOS FAQ (2004) – additional CONFIG.SYS command details