Jump to content

USERAM (CONFIG.SYS directive)

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

CONFIG.SYS serves as the fundamental configuration file for DOS and OS/2 operating systems. This plain text ASCII file holds setup instructions that the operating system's DOS BIOS reads during the startup process. CONFIG.SYS was first introduced with DOS version 2.0.

Usage

The directives within CONFIG.SYS are utilized to configure DOS for hardware devices, software applications, and memory management. Once CONFIG.SYS has been processed, DOS initiates the command interpreter specified on the SHELL line; if none is specified, it defaults to COMMAND.COM, which then executes AUTOEXEC.BAT.

Typically, this file contains name=value pairs that set configuration parameters or load components such as device drivers and terminate-and-stay-resident programs (TSRs). CONFIG.SYS is located in the root directory of the system’s boot drive.

Certain DOS derivatives examine alternative configuration filenames that take precedence over CONFIG.SYS. For instance, advanced editions of Concurrent DOS 386, Concurrent DOS XM, Multiuser DOS, and REAL/32 utilize CCONFIG.SYS or CCONFIG.INI, with supplementary settings stored in a binary file named CCONFIG.BIN, generally maintained through CONFIG.EXE.

In DR DOS versions starting from 3.31, including Novell DOS 7 and DR-DOS 7.02+, the DCONFIG.SYS file overrides CONFIG.SYS. This arrangement supports features like disk compression and multi-boot setups. Other recognized filenames include ODCONFIG.SYS and DRCONFIG.SYS. The SYS /DR:ext command permits customization of system file extensions, enabling multiple concurrent configurations managed by boot loaders such as LOADER.

Enhanced functionality in SHELL directives allows specifying alternative AUTOEXEC.BAT files and supports extensions beyond .BAT, capabilities also available in 4DOS. DR-DOS introduces the CHAIN=filespec directive to continue processing another configuration file, optionally targeting specific labels.

Other operating systems employ different configuration files: FreeDOS uses FDCONFIG.SYS, RxDOS relies on RXCONFIG.SYS, and PTS-DOS makes use of CONFIG.PTS.

In the case of Windows 95 and Windows 98, which are built on DOS foundations, CONFIG.SYS and AUTOEXEC.BAT remain present but are usually left empty. Conversely, Windows Me does not process CONFIG.SYS during startup, instead loading environment variables directly from the Windows Registry.

For FlexOS, CONFIG.SYS is a binary file that specifies resource managers and device drivers to be loaded at boot time.

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>

:;*?!

Defines labels within CONFIG.SYS that serve as jump targets for , , , and commands.
Functions similarly to , also allowing in-line comments appended after other directives in CONFIG.SYS. (Note that under MS-DOS/PC DOS, inline comments within double quotes are not ignored.)
Used to introduce in-line comments alongside the ; directive.
Prompts a Yes/No confirmation before executing subsequent CONFIG.SYS commands. (FreeDOS expands this with optional conditions integrated into boot menus via and .) Starting with DOS 6.0, a similar feature is available by appending after the directive, for example .
Forces unconditional execution of the following CONFIG.SYS instruction.

ATemplate:NbndC

Determines whether programs can be terminated upon encountering errors.
Sets which drives record file access timestamps in FAT file systems.
Enables conditional execution on AT-compatible hardware.
Manages the boot process through a boot manager.
Adjusts the level of detail shown in error messages.
Alters the default internal serial device driver assigned to 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 even if audible alerts are disabled.
Defines the operating system to boot next in sequence.
Enables or disables extended Ctrl+C interrupt checking.
Sets the quantity of disk buffers allocated for file operations.
Similar to BUFFERS but loads buffers into High Memory Area (HMA) or Upper Memory Blocks (UMB).
, CACHETTL, CACHEFLUSH (Embedded DOS 6-XL only)
Controls cache size and timing for cache flushing.
Launches programs listed in CONFIG.SYS, running them in the foreground and pausing further processing until completion.
(DR-DOS 7.02+)
Sets initial Caps Lock state on the keyboard at startup.
, CDDBUFFERS (PTS-DOS only)
Configures CD-ROM driver buffers and hardware settings.
(DR DOS 5.0+, Embedded DOS)
Continues processing CONFIG.SYS from a new file or label location.
, CLS (DR DOS 6.0+)
Defines clock type and clears the display screen respectively.
, COUNTRY (DOS and OS/2)
Sets OEM codepages and internationalization support parameters.
, COM2, COM3, COM4 (DR-DOS 7.02+)
Configures serial port parameters including count, sequence, I/O addresses, and timeouts.
, COMMENTS (DOS 4.0+ and RxDOS)
Allows redefining inline comment characters or ignoring specific lines during parsing.
CPU-related directives (PTS-DOS only)
CPU88, CPU86, CPU286, CPU386, CPU486 with + variants specify conditional execution based on CPU model or higher.

This segment highlights essential CONFIG.SYS directives applicable across various DOS versions, focusing on device control, memory management, and conditional command execution—key factors for enhancing legacy system efficiency in corporate settings.

DTemplate:NbndF

Adjusts relocation settings for drive descriptor tables in memory.
Defines the memory segment address used for multi-sector disk data deblocking operations.
Activates internal debugger functionality within the system.
Provides boot management capabilities through a boot manager directive.
Loads device drivers into standard memory locations.
Loads device drivers into upper memory areas (equivalent to in DRDOS 5.0).
Configures country code and codepage information for keyboard, screen, and printer devices.
Sets sizes for cache memory allocations to optimize performance.
Determines compatibility mode for floppy disk operation.
Specifies which font to use for display output.
Controls loading of DOS into high memory and/or upper memory blocks (similar to in DRDOS 5.0).
Loads DOS system tables (, , , etc.) into upper memory regions.
Specifies an alternate directory path for DOS system files.
Defines search paths for locating data files during operation.
Sets physical parameters for disk drives connected to the system.
Establishes configuration parameters for drives not natively recognized by the OS.
See .
Allows designation of a specific drive for storing PDUMP.nnn error log files.
Outputs a message directly to the screen during processing.
Displays messages that include ANSI escape sequences for enhanced formatting.
Determines whether additional verification checks occur when launching programs.
Assigns an expected error or return code for subsequent command executions.
Controls the state of the A20 gate when initiating program execution.
Terminates CONFIG.SYS processing before reaching the end of the file (with some exceptions).
Configures hash table size to accelerate file opening operations (distinct from MS-DOS/PC DOS FASTOPEN).
Specifies how many File Control Blocks (FCBs) can be opened simultaneously (shares buffer space with FILES under DR-DOS).
Functions like FCBS but loads FCBs into upper memory areas instead of conventional memory.
Boot manager directive controlling boot processes.
Defines maximum number of files that can be open at once by the system.
Similar to FILES but loads file handles into upper memory regions to conserve conventional memory.
Executes specified subsections within CONFIG.SYS (see also IGNORE directive).

GTemplate:NbndI

Awaits 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 specified label.
Continues nested CONFIG.SYS processing at a given label, returning afterwards to the original point.
Refer to , , or for additional details.
See related entries in .
Consult for further information.
Refer to or for more context.
See or for extended explanation.
Additional information available in .
Loads a terminate-and-stay-resident (TSR) program after relocating the DOS data segment. Compare with INSTCDEX.
See , , or for related commands.
Consult .
Refer to or for specifics.
Activates and configures the command line and console history buffer with advanced pattern search capabilities.
Sets the address for the High Memory Area (HMA) segment.
Configures energy-saving features related to the HLT instruction.
Specifies that the system should perform boot sector virus checks.
Loads installable file system drivers.
Prevents execution of designated CONFIG.SYS subsections.
Defines programs permitted to execute at ring 2, allowing direct hardware I/O access.
Includes directives from an alternate menu block (emulated via GOSUB/RETURN in DR-DOS).
Sets the status of the keyboard Insert mode.
Installs a TSR program into conventional memory.
Loads a TSR program into upper memory, equivalent to HIINSTALL in DR DOS 5.0.
Installs TSR after DOS data segment relocation, similar to INSTCDEX.
Adjusts PIC interrupt priorities, assigning highest priority to a specified IRQ number.

KTemplate:NbndM

Defines the keyboard layout configuration.
Sets the relocated address for the keyboard buffer.
Determines the maximum number of accessible drives.
Functions like LASTDRIVE but loads Current Directory Structure into upper memory.
Lists paths for DLL searches.
Manages loading of legacy applications.
Configures the quantity of file locks allowed.
Controls display of boot logos via PTS-DOS boot manager integration.
Specifies count, order, I/O port address, and timeout parameters for LPT1 device.
Defines similar parameters for LPT2 device configuration.
Sets count, order, I/O address, and timeout for LPT3 device operation.
Enables and configures LPT4 device with comparable settings.
Determines wait time before increasing process priority level.
Configures strategies for memory allocation management.
Establishes default DOS memory allocation policy.
Defines options available within menus.
Specifies color schemes for menus (emulatable in DR-DOS).
Sets default menu block (emulatable under DR-DOS).
Defines multiple menu blocks (emulatable in DR-DOS environments).
Enables multitrack disk functionality.
Continues CONFIG.SYS processing from a new file after loading a device driver and setting the %NEWFILE% environment variable.

NTemplate:NbndQ

Determines default No () character used in Yes/No/Resume prompts.
Configures keyboard Num Lock state as enabled or disabled at startup.
Executes commands conditionally based on previous error code, e.g., .
Displays text and waits for key input, similar to and commands in DR-DOS systems.
Requires user confirmation upon encountering errors during CONFIG.SYS processing.
Sets buffer size parameters for LPT ports.
Enables conditional execution on PC-compatible hardware platforms.
Configures scheduler priority settings for processes.
Assigns priority levels specifically for disk I/O operations.
; Changes default printer device driver from LPT1 to either LPT3 or LPT4 ports.
; Controls whether DOS applications are permitted to run on the system.
; Loads a user interface shell environment.
; Enables conditional execution on IBM PS/1-compatible machines only.
; Enables conditional execution on IBM PS/2-compatible machines only.
; Silences all output directed to STDOUT.

RTemplate:NbndT

Activates automatic system reboot upon encountering errors.
Permits inclusion of comments within CONFIG.SYS (ignored in PTS-DOS).
Reserves drive letters for local block device drivers.
Defines the default character used by Resume () in command prompts.
Returns control from nested CONFIG.SYS processing to the previous GOSUB or SWITCH point, optionally providing a return code.
Specifies the size of real mode memory.
Allows programs in CONFIG.SYS to load simultaneously in the background, functioning similarly to CALL or INSTALL commands in other environments.
Indicates whether the first character of deleted files is stored in the reserved FAT area.
Determines video mode settings under FreeDOS or screen access methods under PTS-DOS.
Sets the Scroll Lock key status on the keyboard to on or off.
Establishes environment variables.
Loads the command interpreter shell.
Similar to SHELL but supports a SIZE parameter that pre-allocates COMMAND.COM in the High Memory Area (HMA), enhancing memory efficiency when using third-party shells.
Specifies states for keyboard modifiers such as Shift Lock, Num Lock, Scroll Lock, and Insert mode.
Controls whether files are closed during a Ctrl+Alt+Del reboot sequence.
Skips the Power-On Self Test (POST) during rebooting.
, STACKSIZE, STACKSHIGH
Configure stack size parameters across different DOS variants, impacting interrupt handling and memory allocation (varies depending on OS).
, SYSBOOT, SYSGEN, SYSLOAD, SYSTOUMB
Directives specific to PTS-DOS that manage boot options, system memory organization, and loading into Upper Memory Blocks (UMBs).
, SWITCH
Handles conditional processing blocks within CONFIG.SYS for DOS versions supporting advanced scripting features (not supported universally).
, SWAPPATH, THREADS, TIMESLICE
OS/2-specific settings that govern error logging behavior, swap file location, number of concurrent threads, and CPU scheduler time slices respectively.
(DR-DOS 6.0+, PTS-DOS)
Sets timeout durations for CONFIG.SYS prompts and commands such as SWITCH and GETKEY, including default responses to queries.
, TRACE, TRACEBUF
Manage temporary file extensions (PTS-DOS), enable or disable single-step execution of CONFIG.SYS globally or locally (various DOS versions), and configure log buffer sizes (OS/2).
(OS/2 3.0+)
Records detailed error logs for diagnostic purposes.

UTemplate:NbndZ

Assigns a specific segment for use as Upper Memory Block (UMB) memory by DOS management.
Selects which UMB server is utilized.
Defines address ranges designated as UMB RAM.
Toggles disk write verification on or off.
Sets the DOS version reported to applications.
Configures VGA display enablement status.
Specifies the active video mode.
Enables or disables virtual DMA capability.
Determines whether processor Virtual Mode Extensions are disabled.
Configures VxD drivers for Windows environments.
Sets system-level support parameters for Windows.
Manages relocation of the Extended BIOS Data Area (XBDA).
Executes conditionally on XT-compatible machines.
Enables built-in Year 2000 compliance support.
Defines default affirmative response character in prompts.
Controls deletion tracking behavior.

Issues

While booting without CONFIG.SYS is possible, this file along with AUTOEXEC.BAT is crucial for comprehensive operating system customization and meeting application requirements. Any corruption or damage necessitates troubleshooting efforts.

If the SHELL directive is missing or corrupted within CONFIG.SYS, DOS attempts to locate COMMAND.COM in the root directory of the boot drive. Versions prior to DOS 6.0 will fail to start if COMMAND.COM cannot be found. However, MS-DOS 6.0/PC DOS 6.1 and Novell DOS 7 and later prompt users to specify a command processor path, offering recovery options when the shell fails or exits unexpectedly. This mechanism also permits replacing the shell at runtime without requiring a reboot.

Due to incompatibility with DR-DOS, MS-DOS 7.0 and later typically place COMMAND.COM on drive C: in dual-boot configurations. DR-DOS versions 7.02 and above restrict bypassing SHELL directives during skip or trace modes activated by Ctrl+F5/F7/F8 keys. Subsequent versions introduced Ctrl+F6 to restore skip functionality for recovery from invalid SHELL parameters. If no valid SHELL directive is detected during CONFIG.SYS skipping, users are prompted to input an appropriate shell filename before COMMAND.COM is loaded from the root directory.

The maximum size of CONFIG.SYS varies by operating system: MS-DOS/PC DOS historically limited files to a few kilobytes (up to 64 KB in recent versions), whereas DR-DOS imposes no practical size restrictions by interpreting directives sequentially rather than compiling them. This approach facilitates precise control over driver and TSR loading order through DEVICE and INSTALL commands—beneficial for resolving conflicts, debugging issues, and applying dynamic flow control based on factors like processor type or error codes.

In MS-DOS/PC DOS versions 2.0 through 4.01, the maximum length of a SHELL command line was limited to 31 characters, increasing to 128 characters in later releases. DR-DOS supports up to 255 characters for this directive. It is important to note that CONFIG.SYS directives do not accept long filenames.

Dual Booting DOS with Windows 9x

During the installation of Windows 95 on a system already running DOS or Windows, the files CONFIG.SYS and AUTOEXEC.BAT are renamed to CONFIG.DOS and AUTOEXEC.DOS respectively, enabling a dual-boot setup between Windows 9x and DOS. When the system boots into DOS mode, these renamed files are temporarily switched back to CONFIG.SYS and AUTOEXEC.BAT. Meanwhile, backups of the Windows 95-specific versions are maintained under the names CONFIG.W40 and AUTOEXEC.W40.

When Caldera DR-DOS versions 7.02 or 7.03 are installed alongside Windows 95, the original Windows CONFIG.SYS and AUTOEXEC.BAT filenames remain unchanged, whereas DR-DOS operates using alternate startup files named DCONFIG.SYS and AUTODOS7.BAT.

OS/2 and Windows NT

OS/2 depends extensively on CONFIG.SYS to set up device drivers and environment variables prior to launching its graphical user interface.

In the Windows NT environment, specifically within its OS/2 subsystem, the CONFIG.SYS configuration is not stored as a physical file but is instead kept within the system registry.

Numerous CONFIG.SYS commands utilized by OS/2 are either undocumented or lack comprehensive documentation.

CONFIG.SYS remains in active use 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 commands
  • User Manual for PTS-DOS 2000 Pro including CONFIG.SYS directives (archived)
  • Unofficial German FAQ for PTS-DOS featuring CONFIG.SYS directives (archived)