Jump to content

SAVENAME (CONFIG.SYS directive)

From Alfawiki
Adapted from the English Wikipedia article SAVENAME (CONFIG.SYS directive), available under CC BY-SA 4.0Updated 9 August 2025
CONFIG.SYS
Company typeConfiguration file
IndustryComputer software / Operating systems
PredecessorNone
Founded1983
Headquarters
N/A
,
N/A
ProductsConfiguration for DOS and OS/2 boot process

CONFIG.SYS serves as the main configuration file for DOS and OS/2 operating systems. This ASCII text document contains user-editable setup instructions that the operating system's DOS BIOS—commonly found in IBMBIO.COM or IO.SYS—interprets during the boot sequence. CONFIG.SYS was first introduced with DOS version 2.0.

Usage

The directives within CONFIG.SYS are responsible for configuring DOS to manage hardware devices, applications, and memory allocation. Once CONFIG.SYS has been processed, DOS initiates the command interpreter specified by the SHELL directive, defaulting to COMMAND.COM if none is provided, which subsequently executes AUTOEXEC.BAT.

Typically, the file consists of name=value pairs that establish adjustable settings or load essential files such as device drivers and terminate-and-stay-resident programs (TSRs) into memory.

In 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 the former East-German company VEB Robotron.

Certain DOS derivatives check for alternative filenames to supersede CONFIG.SYS:

Advanced editions of Concurrent DOS 386, Concurrent DOS XM, Multiuser DOS, System Manager, and REAL/32 search for CCONFIG.SYS instead of the standard CONFIG.SYS. Some Multiuser DOS releases employ CCONFIG.INI, while REAL/32 uses MCONFIG.SYS. These platforms support extended configuration options stored in binary files like CCONFIG.BIN, which are generally edited using CONFIG.EXE.

In versions such as DR DOS 3.31, PalmDOS 1.0, Novell DOS 7, OpenDOS 7.01, and DR-DOS 7.02 and later, DCONFIG.SYS takes precedence over CONFIG.SYS. This capability facilitates disk compression utilities and multi-boot setups by allowing multiple configuration files. OpenDOS 7.01 and DR-OpenDOS 7.02 additionally recognize ODCONFIG.SYS, while certain DR-DOS 7.02+ editions look for DRCONFIG.SYS.

Beginning with DR DOS 6.0, the command SYS /DR:ext modifies default file extensions to enable multiple concurrent boot configurations within a single root directory, selectable through boot loaders like LOADER from Multiuser DOS and DR-DOS 7.x series. The SHELL directive supports specifying alternative AUTOEXEC.BAT files using /P[:filename.ext]. The CHAIN=filespec command allows continuation of processing another configuration file, optionally jumping to labels (CHAIN=filespec,label) in DR-DOS 7.02 and newer.

From DR-DOS 7.03 onwards, the SYS /A option copies CONFIG.SYS and AUTOEXEC.BAT alongside system files.

Other DOS variants use distinct filenames: FDCONFIG.SYS in FreeDOS, RXCONFIG.SYS in RxDOS, and CONFIG.PTS in PTS-DOS.

Both CONFIG.SYS and AUTOEXEC.BAT exist within the root directories of Windows 95 and Windows 98, as these operating systems are based on DOS, although these files are often left unused.

Unlike its predecessors, Windows Me does not process CONFIG.SYS during startup; instead, it reads environment variables directly from the Windows Registry (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 boot time.

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>

:;*?!

Marks labels within CONFIG.SYS to serve as jump destinations for , , , , and commands.
Functions similarly to , but also applies to inline comments appearing after other directives. (MS-DOS/PC DOS interprets inline comments enclosed in double quotes differently.)
Introduces inline comments used alongside the ; directive.
Prompts with a Yes/No question to confirm execution of subsequent commands. (FreeDOS does not support custom messages but includes conditional boot menus.) DOS 6.0 and later support comparable syntax using after directives.
Ensures the next directive is executed unconditionally.

ATemplate:NbndC

Determines whether programs may be aborted upon encountering errors.
Sets which drives record file access timestamps on FAT file systems.
Enables conditional execution on AT-compatible computers.
Boot management utility.
Adjusts verbosity level of error messages.
Changes the default serial driver assigned to the AUX: device.
Prevents access to character devices outside the virtual \DEV directory.
Loads a fundamental device driver into memory.
Produces a brief beep even if audible alerts are disabled.
Specifies the next operating system to boot.
Enables or disables extended Ctrl+C checking.
Defines the quantity of disk buffers allocated.
Similar to BUFFERS but places buffers into HMA or UMB areas.
, CACHETTL, CACHEFLUSH (Embedded DOS 6-XL only)
Manage cache block allocation timing and flushing intervals.
Executes programs within CONFIG.SYS in foreground mode, pausing processing until completion.
Sets Caps Lock status on the keyboard either on or off.
, CDDBUFFERS (PTS-DOS only)
Defines CD-ROM driver name and buffer quantities.
Continues processing CONFIG.SYS from another file or label.
, CLS, CODEPAGE (various systems)
Configure system clock type, clear console screen, and specify OEM codepages respectively.
, COLOR, COMx (PTS-DOS or DR-DOS 7.02+)
Set CMOS RAM address, customize boot menu colors, and configure COM port settings including I/O address and timeout values.
, COMMENT(S), COUNTRY (various systems)
Specify DMA buffer size, redefine inline comment characters or ignore lines, and enable international support respectively.
, CPSW (DR DOS/MS-DOS versions)
Position display cursor for menus and support codepage switching.
, CPUxx series (PTS-DOS and DR-DOS)
Define RAM refresh rates and conditionally execute based on CPU model (8088 through 486+).

DTemplate:NbndF

Adjusts relocation of drive descriptor tables in memory.
Specifies memory segment address for multi-sector disk data deblocking processes.
Activates internal debugger features.
Boot management utility.
Loads device drivers into conventional memory.
Loads device drivers into upper memory blocks (equivalent to in DRDOS 5.0).
Configures country and codepage settings for keyboard, screen, and printer devices.
Sets cache memory sizes for improved performance.
Defines floppy disk compatibility modes.
Selects display font for screen output.
Controls loading of DOS into high memory and usage of upper memory areas (similar to in DRDOS 5.0).
Loads DOS system tables (BUFFERS, FCBS, FILES, LASTDRIVE, STACKS) into upper memory regions.
Specifies alternative directories for DOS system files paths.
Defines search directories for data files used by DOS utilities.
Sets physical parameters for disk drive configurations.
Specifies characteristics for unknown or unrecognized drives.
See .
Enables PDUMP.nnn error logging and selects target drive for logs storage.
Displays a simple text message on screen during boot or processing.
Shows messages including ANSI escape sequences for enhanced formatting.
Determines whether additional program startup checks are performed.
Sets assumed error or return codes for subsequent operations.
Configures A20 gate state when launching programs to manage memory access above 1MB.
Terminates CONFIG.SYS processing early except under certain conditions involving SWITCHES and SHELL directives.
Defines hash table size for accelerating file open operations, differing from MS-DOS/PC DOS FASTOPEN driver implementation.
Specifies number of cached File Control Blocks (FCBs) that can be open simultaneously (shares buffer with FILES under DR-DOS).
Similar to FCBS but loads FCBs into upper memory segments to conserve conventional memory.
Boot management utility.
Sets maximum number of files that can be opened concurrently by the system.
Like FILES but loads file handles into upper memory areas to optimize conventional memory usage.
Includes execution of specified subsections within CONFIG.SYS files (see IGNORE).

GTemplate:NbndI

Pauses for a key press or timeout, returning the error level as 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, then returns to the previous point.
Refer to , , or for additional details.
Consult for further information.
See also .
Refer to or for related commands.
See or for more context.
Additional information available in .
Loads a terminate-and-stay-resident (TSR) program into memory following DOS data segment relocation. Compare with INSTCDEX.
See , , or for related directives.
Further details in .
See or for more information.
Activates console and command line history buffers along with advanced pattern searching capabilities.
Defines the address of the High Memory Area (HMA) segment.
Configures energy-saving mode using the HLT instruction.
Determines whether boot sector virus scanning is enabled.
Loads file systems that can be installed dynamically.
Prevents execution of specified CONFIG.SYS subsections.
Permits certain 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 environments.
Sets the status of the 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 DOS data segments.
Adjusts PIC interrupt priorities to assign highest priority to a designated IRQ.

KTemplate:NbndM

Defines the keyboard layout configuration.
Specifies the relocated address of the keyboard buffer.
Sets the maximum number of accessible drives.
Similar to LASTDRIVE but additionally loads Current Directory Structure into upper memory.
Establishes search paths for dynamic-link libraries (DLLs).
Controls compatibility settings for legacy applications.
Determines the number of file locks allowed.
Manages support for boot logos and startup messages display.
Specifies count, sequence, I/O address, and timeout parameters for the LPT1 device.
Applies identical settings as LPT1 but for LPT2 device.
Mirrors LPT1 configuration for the LPT3 device.
Enables and configures LPT4 device similarly to other parallel ports.
Sets delay before increasing process priority levels.
Configures strategy for memory allocation management.
Defines default DOS memory allocation method.
Specifies menu option parameters.
Sets menu color schemes, emulatable under DR-DOS systems.
Establishes default menu block, also emulatable under DR-DOS environments.
Defines various menu blocks, with DR-DOS emulation support.
Enables operations involving multitrack disks.
After loading a device driver, continues CONFIG.SYS processing in a new file while setting %NEWFILE% environment variable.

NTemplate:NbndQ

Sets default "No" character used in Yes/No/Resume prompts.
Controls keyboard Num Lock state (on or off).
Executes commands conditionally based on last error code, e.g., .
Displays text and waits for user key press, similar to and found in DR-DOS systems.
Requires user confirmation when errors occur during CONFIG.SYS processing.
Configures buffer size settings for LPT ports.
Enables conditional execution on PC-compatible hardware platforms.
Sets task scheduler priority levels.
Defines priority settings specifically for disk I/O processes.
Changes default printer device driver assignment (for example, switching from LPT1 to LPT4).
Specifies whether DOS programs are permitted to execute.
Loads a user interface shell environment.
Enables conditional execution on IBM PS/1-compatible machines.
Enables conditional execution on IBM PS/2-compatible machines.
Suppresses output directed to STDOUT.

RTemplate:NbndT

Activates automatic system reboot upon encountering errors.
Permits inclusion of comments within CONFIG.SYS.
Blocks specific drive letters from allocation by block device drivers.
Establishes the default Resume () response character for Yes/No/Resume prompts.
Returns control from nested CONFIG.SYS processing to the prior GOSUB or SWITCH statement, optionally passing a return code.
Specifies the size of real mode memory.
Allows programs to load simultaneously in the background during CONFIG.SYS execution.
Determines whether the first character of a deleted file is saved in the FAT directory's reserved area.
Sets the video display mode in FreeDOS or defines screen access methods in PTS-DOS.
Toggles keyboard Scroll Lock status on or off.
Assigns environment variables.
Loads the command interpreter shell.
Similar to SHELL, but supports a size parameter for pre-allocating COMMAND.COM in HMA or UMBs to minimize fragmentation.
Specifies keyboard modifier states such as Shift Lock, Num Lock, Scroll Lock, and Insert mode.
Controls whether files close upon receiving a Ctrl+Alt+Del key sequence.
Determines if POST is bypassed during reboot.
, STACKS, STACKSHIGH, STACK
Various configurations for stack size and layout across different DOS versions, including compatibility placeholders and ignored directives depending on the OS variant.
, SYSBOOT, SYSGEN, SYSLOAD, SYSTOUMB
Directives unique to PTS-DOS managing boot managers, alternate OS files, memory locations, and loading DOS components into upper memory.
, SUBMENU
Used internally or for submenu setups primarily in DOS 6.0 and later versions, excluding DR-DOS and FreeDOS implementations.
, SWAPPATH
OS/2-specific settings defining error log drive locations and swap file directories.
, SWITCHES
DR DOS conditional processing directives in CONFIG.SYS based on key presses and special option flags, some of which are disregarded under PTS-DOS.
, SWITCHAR
Sets the system-wide default switch character ('/' or '-').
, THREADS, TIMESLICE
OS/2 directives handling FPU bug corrections, setting the number of concurrent threads, and configuring scheduler time slices.
, TRACE, TRACEBUF
Timeout parameters for CONFIG.SYS execution and options to enable or disable single-step execution with associated log buffer sizes across DOS variants and OS/2.
, TRAPDUMP
Configures temporary file extensions in PTS-DOS and detailed error logging settings in OS/2.

UTemplate:NbndZ

Assigns a particular segment as an Upper Memory Block (UMB) for DOS usage.
Defines the UMB server configuration.
Specifies address ranges allocated as UMB RAM.
Enables or disables verification of disk writes.
Reports a specified DOS version to applications.
Configures VGA display status parameters.
Sets the current video mode analogous to FreeDOS's SCREEN directive.
Activates virtual DMA functionality.
Manages processor Virtual Mode Extensions (VME) settings.
Configures VxD drivers for Windows environments.
Establishes system support parameters for Windows operation.
Relocates the Extended BIOS Data Area (XBDA).
Executes conditionally on XT-class compatible machines.
Sets Year 2000 compliance features.
Defines the default affirmative response character in prompts.
Controls deletion tracking behavior.

Issues

Although the system can initiate booting without CONFIG.SYS present, this file—together with AUTOEXEC.BAT—is critical for comprehensive operating system customization and meeting software dependencies. Corruption or absence of these files requires diagnostic intervention.

If CONFIG.SYS does not contain a SHELL directive or if it is missing or damaged, DOS attempts to locate COMMAND.COM within the root directory of the boot drive. Earlier DOS versions prior to 6.0 fail to boot if COMMAND.COM is not found. In contrast, MS-DOS 6.0/PC DOS 6.1 and Novell DOS 7 and later will prompt users to specify an alternative command processor path. This prompt also appears if the primary shell terminates unexpectedly or by user exit, providing a limited shell replacement at runtime without needing a full reboot.

The COMMAND.COM included with MS-DOS 7.0 and subsequent releases is incompatible with DR-DOS. Typically, DR-DOS prevents bypassing SHELL directives during skip, trace, or step modes starting from version 7.02 onward. Later patches partially restored skip functionality allowing recovery from invalid SHELL parameters. When no valid SHELL is found during skipped CONFIG.SYS processing, users are prompted to enter a correct shell filename before COMMAND.COM loads.

CONFIG.SYS file size restrictions vary by operating system: MS-DOS and PC DOS limit it to several kilobytes (up to approximately 64 KB in later editions), whereas DR-DOS imposes virtually no effective limit due to its line-by-line interpretation method rather than tokenization and sorting. This approach grants DR-DOS users precise control over driver and TSR loading order through DEVICE and INSTALL commands, facilitating resolution of load conflicts and enabling integration of temporary external utilities into the startup sequence.

In MS-DOS/PC DOS versions from 2.0 through 4.01, SHELL command lines are restricted to a maximum length of 31 characters. Subsequent releases expanded this limit up to 128 characters, while DR-DOS supports up to 255 characters. It should be noted that CONFIG.SYS directives do not accommodate 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 respectively, enabling dual boot functionality between Windows 9x and DOS. During a DOS startup, these files are temporarily reverted to CONFIG.SYS and AUTOEXEC.BAT. Meanwhile, the Windows 95 versions are preserved as CONFIG.W40 and AUTOEXEC.W40.

In configurations where Caldera DR-DOS 7.02 or 7.03 coexists with Windows 95, the original CONFIG.SYS and AUTOEXEC.BAT files for Windows remain intact, whereas DR-DOS employs DCONFIG.SYS and AUTODOS7.BAT as its boot configuration files.

OS/2 / Windows NT

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

Within the OS/2 compatibility layer of Windows NT, CONFIG.SYS parameters are maintained within the system registry instead of existing as a separate file.

Numerous CONFIG.SYS commands utilized by OS/2 lack formal documentation.

The use of CONFIG.SYS persists in OS/2-based operating systems such as eComStation and ArcaOS.

See also

External links

  • AUTOEXEC.BAT and CONFIG.SYS details 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
  • FreeDOS CONFIG.SYS directive descriptions
  • PTS-DOS 2000 Pro User Guide with CONFIG.SYS commands (archived)
  • Unofficial German-language PTS-DOS FAQ (archived) featuring CONFIG.SYS directives