Jump to content

NEWFILE (CONFIG.SYS directive)

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

CONFIG.SYS serves as the chief configuration file for DOS and OS/2 operating systems. This plain text file, written in ASCII, holds configuration commands that the operating system's DOS BIOS—typically found in IBMBIO.COM or IO.SYS—interprets during the startup sequence. CONFIG.SYS was first introduced with DOS version 2.0.

Usage

The directives within CONFIG.SYS set up DOS parameters for hardware devices, software applications, and memory handling. Once CONFIG.SYS has been processed, DOS launches the command interpreter specified by the SHELL directive; if none is specified, it defaults to COMMAND.COM, which subsequently runs AUTOEXEC.BAT.

This file primarily contains name=value entries that define adjustable settings or load components such as device drivers and TSR (Terminate and Stay Resident) programs into memory. CONFIG.SYS is located in the root directory of the drive used to boot the system.

Certain DOS variants employ alternative filenames:

- Advanced editions of Concurrent DOS 386, Concurrent DOS XM, Multiuser DOS, and REAL/32 replace CONFIG.SYS with CCONFIG.SYS or CCONFIG.INI (in Multiuser DOS), with supplementary configurations stored in CCONFIG.BIN, which is managed through CONFIG.EXE. - In DR DOS version 3.31 and later, DCONFIG.SYS overrides CONFIG.SYS and is commonly utilized alongside disk compression utilities or multi-boot environments. - OpenDOS 7.01 and DR-OpenDOS 7.02 also recognize ODCONFIG.SYS or DRCONFIG.SYS as configuration files. - Starting with DR DOS 6.0, users can customize system file extensions using SYS /DR:ext, allowing multiple sets of system files to coexist and be selected via boot loaders like LOADER. - The SHELL command supports specifying alternative AUTOEXEC.BAT files by using the /P[:filename.ext] option, and COMMAND.COM can process extensions other than .BAT within this context. - The CHAIN=filespec[,label] directive enables continuation of configuration processing from another file, which may reside outside the root directory.

With DR-DOS 7.03 and newer versions, the command SYS /A was introduced to copy matching CONFIG.SYS and AUTOEXEC.BAT files alongside system files.

FreeDOS utilizes FDCONFIG.SYS, while RxDOS version 7.24 and above uses RXCONFIG.SYS. In PTS-DOS, the equivalent file is named CONFIG.PTS.

In the case of Windows 95 and Windows 98, CONFIG.SYS and AUTOEXEC.BAT exist on boot volumes but are typically left empty. Meanwhile, Windows Me does not process CONFIG.SYS during startup; instead, it relies on environment variables stored within the Windows Registry at:

HKLM\System\CurrentControlSet\Control\SessionManager\Environment

For FlexOS, CONFIG.SYS is a binary-format file that specifies resource managers and device drivers loaded during system initialization.

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 to serve as jump points for , , , , and commands.
Functions similarly to , providing inline comments after directives. (Note: MS-DOS/PC DOS does not ignore inline comments enclosed in double quotes.)
Used for inline comments alongside ; directives.
Prompts a Yes/No confirmation before executing subsequent CONFIG.SYS commands. (FreeDOS extends this feature with optional conditions via boot menus.) From DOS 6.0 onward, a comparable function exists by appending after directives.
Forces immediate execution of the next CONFIG.SYS command without condition.

ATemplate:NbndC

Determines whether programs can be terminated upon encountering errors.
Sets drives to record file access timestamps within FAT file systems.
Enables conditional execution on AT-compatible hardware.
Boot management utility.
Adjusts the verbosity level of error messages.
Alters the default serial driver assigned to the AUX device.
Prevents character devices from being accessible outside the phantom \DEV directory.
Loads foundational device drivers into memory.
Produces a brief beep even when audible alerts are disabled.
Defines the operating system designated for the next boot sequence.
Enables or disables extended Ctrl-C detection.
Specifies the quantity of disk buffers to allocate.
Similar to BUFFERS but places buffers into HMA or UMB memory areas.
, ,
Manages cache block allocation and flushing intervals.
Executes programs listed in CONFIG.SYS, pausing further processing until completion.
Sets the status of the keyboard Caps Lock key.
,
Configures CD-ROM driver name and buffer quantity.
Continues CONFIG.SYS processing from a new file or label reference.
, , , etc., configure system clock type, screen clearing behavior, and OEM codepages respectively.
, ...,
Defines count, sequence, I/O port address, and timeout parameters for COM ports.
, also COMMENTS, permit inline comment configuration (varies by OS version).
Enables and configures internationalization support (differs by OS).
CPU-specific directives (CPU88, CPU386, CPU486, etc.) govern conditional execution based on processor type (PTS-DOS and DR-DOS).

DTemplate:NbndF

Adjusts relocation settings for drive descriptor tables.
Sets memory segment address used for multi-sector disk data deblocking.
Activates internal debugger functionality.
Boot management utility.
Loads a device driver into conventional memory.
Loads a device driver into upper memory (equivalent to in DRDOS 5.0).
Configures country and codepage parameters for KBD, SCR, and LPT devices.
Sets cache memory size allocations.
Defines floppy disk compatibility mode settings.
Specifies display font selection.
Controls loading DOS into high memory and usage of upper memory blocks.
Loads DOS tables (BUFFERS, FCBS, FILES, LASTDRIVE, STACKS) into upper memory regions.
Specifies an alternative directory path for DOS files.
Indicates search path location for data files.
Defines physical parameters of disk drives.
Assigns configuration parameters for unrecognized drives.
See .
Enables error logging with PDUMP.nnn files on a specified drive.
Presents a message on the screen.
Displays messages incorporating ANSI Escape sequences.
Adds additional verification steps when initiating programs.
Sets expected error or return codes for subsequent commands.
Controls A20 gate state during program startup.
Terminates CONFIG.SYS processing prematurely (excluding SWITCHES and SHELL directives).
Adjusts hash table size to optimize file opening speed, differing from MS-DOS FASTOPEN driver behavior.
Sets number of cached File Control Blocks (FCBs) allowed concurrently (shares buffer with FILES under DR-DOS).
Equivalent to FCBS but loads FCBs into upper memory areas.
Boot management utility.
Defines maximum number of open files at once.
Same as FILES but loads file handles into upper memory blocks.
Includes execution of specified CONFIG.SYS subsections (refer to IGNORE).

GTemplate:NbndI

Waits for 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 the indicated label.
Continues nested CONFIG.SYS processing at a specified label, returning afterwards 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 TSR program into memory following relocation of the DOS data segment. Compare with INSTCDEX.
For more details, see , , or .
See also .
Refer to or for related options.
Activates console and command line history buffers with enhanced pattern searching capabilities.
Defines the address of the HMA (High Memory Area) segment.
Sets parameters for HLT (halt) energy-saving mode.
Enables scanning of the boot sector for viruses.
Loads installable file system drivers.
Prevents execution of designated subsections within CONFIG.SYS.
Permits specific programs to operate at ring 2 level, allowing direct hardware I/O access.
Incorporates directives from another menu block (emulated through GOSUB/RETURN in DR-DOS).
Controls keyboard Insert mode status.
Installs a TSR program into memory.
Installs TSR into upper memory, similar to HIINSTALL in DR DOS 5.0.
Loads TSR after relocating DOS data segment, akin to INSTALL.
Adjusts PIC interrupt priorities to prioritize a specified IRQ line.

KTemplate:NbndM

Defines keyboard layout configuration.
Sets the address for the relocated keyboard buffer.
Determines maximum number of accessible drives.
Similar to LASTDRIVE but loads Current Directory Structure into upper memory area.
Specifies paths for DLL searches.
Manages compatibility settings for legacy applications.
Configures the quantity of file locks allowed.
Enables boot logo display and startup message settings.
Specifies count, sequence, I/O port address, and timeout parameters for LPT1 device.
Applies identical settings as LPT1 for LPT2 device.
Mirrors LPT1 configuration for LPT3 device.
Enables and configures LPT4 device similarly to others.
Sets delay before increasing process priority during wait states.
Defines strategy for memory allocation management.
Establishes default DOS memory allocation policy.
Declares menu options available within CONFIG.SYS menus.
Specifies color schemes for menus (simulated using ECHO in DR-DOS).
Sets default menu block (emulated through TIMEOUT and SWITCH commands in DR-DOS).
Defines menu blocks (implemented via ECHO and SWITCH in DR-DOS).
Enables operations on multitrack disks.
Continues processing CONFIG.SYS from an external file, optionally loading a device driver and setting %NEWFILE% environment variable.

NTemplate:NbndQ

Sets default character representing No () in Yes/No/Resume prompts.
Determines whether keyboard [[Num Lock|Template:Keypress]] is enabled or disabled by default.
Executes conditionally based on previous error code, e.g. .
Presents a message and waits for key input, similar to and commands in DR-DOS environments.
Requires user confirmation upon encountering errors during CONFIG.SYS processing.
Configures buffer sizes associated with LPT ports.
Conditional execution targeting PC-compatible systems specifically.
Adjusts scheduler priority levels for processes.
Sets priority values for disk I/O tasks and programs.
Changes default printer driver assignment (e.g., switching from LPT1 to LPT3 or LPT4).
Determines whether DOS applications are permitted to run under current configuration.
Loads a user interface shell environment.
Conditional execution tailored for IBM PS/1-compatible machines only.
Conditional execution tailored for IBM PS/2-compatible machines only.
Suppresses output directed to STDOUT display.

RTemplate:NbndT

Activates automatic system reboot upon encountering errors.
Permits inclusion of comments within CONFIG.SYS files.
Allocates a drive letter for local block device drivers.
Defines the default Resume () response character for Yes/No/Resume prompts.
Returns control from nested CONFIG.SYS processing to the previous GOSUB or SWITCH point, optionally passing a return code.
Sets the amount of real mode memory available.
Enables simultaneous loading of programs in CONFIG.SYS, functioning similarly to CALL or INSTALL commands in DOS.
Determines whether initial characters of deleted files are saved in the FAT reserved area.
Designates video mode settings under FreeDOS or screen access protocols used by PTS-DOS.
Controls the Scroll Lock key status on the keyboard, toggling it on or off.
Establishes environment variables.
Loads the command interpreter shell.
Similar to SHELL but allows pre-allocating space for relocating COMMAND.COM into HMA or UMBs, optimizing memory use with third-party shells.
Sets keyboard modifier key states such as Shift Lock, Num Lock, Scroll Lock, and Insert mode.
Determines if files close automatically when Ctrl+Alt+Del is pressed.
Permits bypassing POST during system reboot.
, STACKSIZE, STACKSHIGH
Configure interrupt stack sizes and buffer locations across various DOS iterations and Embedded DOS systems.
(PTS-DOS)
Manages boot manager settings.
, SUPPRESSPOPUPS, SWAPPATH
Control submenu behaviors, error log drive assignments, and swap file directory paths primarily within OS/2 or specialized DOS variants.
, SWITCHES, SWITCHAR
Manage conditional nested CONFIG.SYS execution, special feature toggles, and default switch characters across DOS platforms including DR-DOS and FreeDOS.
, SYSBOOT, SYSGEN, SYSLOAD, SYSTEMPOOL
Set hardware workaround parameters, alternate boot file selections, memory layout configurations, system loading addresses, and system memory pool allocations mainly in OS/2 or Embedded DOS environments.
, THREADS
Specifies loading of DOS data/code into UMBs and configures the number of concurrent threads (applicable to PTS-DOS and OS/2).
, TIMESLICE
Adjusts timeout durations for CONFIG.SYS commands and scheduler time slices (supported by DR-DOS, PTS-DOS, OS/2).
, TRACE, TRACEBUF
Defines temporary file extensions (PTS-DOS), enables step-by-step execution logging within CONFIG.SYS/AUTOEXEC.BAT (DR-DOS, PTS-DOS), and sets trace log buffer sizes (OS/2).
(OS/2)
Records comprehensive error diagnostics for troubleshooting.

UTemplate:NbndZ

Configures DOS to utilize a designated segment as Upper Memory Block (UMB) space.
Specifies which UMB server is employed.
Defines address ranges allocated as UMB RAM.
Toggles disk write verification on or off.
Reports a specified DOS version to applications.
Sets VGA display operational status.
Indicates the active video mode setting.
Determines whether virtual DMA usage is permitted.
Enables or disables processor Virtual Mode Extensions (VME).
Configures virtual device drivers (VxD) for Windows environments.
Adjusts system support parameters for Windows operation.
Manages relocation of the Extended BIOS Data Area (XBDA).
Allows conditional command execution on XT-compatible hardware.
Enables built-in Year 2000 compliance support.
Specifies the default affirmative character used in prompts.
Controls tracking of deleted files.

Issues

Although the system can initiate startup without CONFIG.SYS or AUTOEXEC.BAT, these files are crucial for comprehensive operating system customization and meeting software prerequisites. Troubleshooting becomes necessary if these files are missing or corrupted.

When CONFIG.SYS does not include a SHELL directive—or if the file is absent or damaged—DOS attempts to locate COMMAND.COM in the root directory of the boot drive. Versions prior to 6.0 will not boot without this file; however, MS-DOS 6.0, PC DOS 6.1, Novell DOS 7 and later versions will prompt users to specify the path to the command processor. This prompt also appears if the command interpreter terminates unexpectedly or is exited intentionally, enabling a limited replacement of the runtime shell without requiring a reboot.

COMMAND.COM from MS-DOS 7.0 and newer is incompatible with DR-DOS, which usually resides in the C:\ directory in dual-boot configurations. Starting with DR-DOS 7.02, bypassing SHELL directives during skip, trace, or step modes is restricted to maintain system stability. Subsequent updates introduced recovery mechanisms for invalid SHELL parameters and request users to provide a valid shell before loading COMMAND.COM from the root directory.

The size constraints for CONFIG.SYS differ depending on the operating system: MS-DOS and PC DOS impose limits of a few kilobytes (up to 64 KB in later versions), whereas DR-DOS effectively has no practical size restriction aside from file system limits. MS-DOS processes CONFIG.SYS by compiling it into a tokenized form in memory before executing directives sequentially, prioritizing device drivers ahead of TSRs. In contrast, DR-DOS interprets each directive line individually, granting precise control over the loading sequence of drivers and TSRs using DEVICE and INSTALL commands. This approach facilitates resolving loading conflicts and supports conditional execution based on hardware detection, key presses, error codes, or software return values.

The INSTALL command in DR-DOS enables integration of non-resident programs within the CONFIG.SYS processing flow, enhancing both customization options and debugging capabilities.

MS-DOS and PC DOS versions 2.0 through 4.01 limit the length of the SHELL command line to 31 characters; later releases extend this limit up to 128 characters. DR-DOS accepts shell lines 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 an existing DOS or Windows environment, the original CONFIG.SYS and AUTOEXEC.BAT files are renamed to CONFIG.DOS and AUTOEXEC.DOS respectively, enabling dual-boot functionality between Windows 9x and DOS. Upon booting into DOS mode, these backup files are temporarily restored as CONFIG.SYS and AUTOEXEC.BAT. Additionally, copies of the Windows 95 versions are preserved as CONFIG.W40 and AUTOEXEC.W40.

In systems where Caldera DR-DOS 7.02 or 7.03 coexists with Windows 95, Windows retains its CONFIG.SYS and AUTOEXEC.BAT filenames, while DR-DOS uses DCONFIG.SYS and AUTODOS7.BAT for its startup configuration.

OS/2 / Windows NT

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

Within the OS/2 subsystem of Windows NT, what appears as CONFIG.SYS for OS/2 applications is actually stored within the Windows registry.

Numerous CONFIG.SYS directives in OS/2 remain undocumented or only sparsely documented.

CONFIG.SYS continues to be employed by OS/2 successors 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
  • Details on FreeDOS CONFIG.SYS directives (archived)
  • User Manual for PTS-DOS 2000 Pro including CONFIG.SYS directives (archived)
  • German-language unofficial PTS-DOS FAQ with CONFIG.SYS information (archived)