Jump to content

DRIVATTR (CONFIG.SYS directive)

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

CONFIG.SYS serves as the main configuration file for DOS and OS/2 operating systems. This plain text file, written in ASCII, holds setup instructions accessible to users that the operating system's DOS BIOS interprets during the startup process. CONFIG.SYS was first introduced with DOS version 2.0.

Usage

The directives within CONFIG.SYS are responsible for setting up DOS for hardware devices, software applications, and managing memory. Once CONFIG.SYS has been processed, DOS launches the command interpreter indicated on the SHELL line, defaulting to COMMAND.COM if none is specified. COMMAND.COM then executes the commands found in the AUTOEXEC.BAT file.

CONFIG.SYS primarily contains directives formatted as name=value, which either adjust configurable parameters or load device drivers and terminate-and-stay-resident programs (TSRs) into memory.

In DOS systems, CONFIG.SYS is located in the root directory of the boot partition.

Certain DOS versions check for alternative configuration filenames that take priority over CONFIG.SYS:

Earlier iterations of Concurrent DOS do not support CONFIG.SYS; however, subsequent versions such as Concurrent DOS 386, Concurrent DOS XM, Multiuser DOS, and REAL/32 utilize CCONFIG.SYS or CCONFIG.INI (in Multiuser DOS) and MCONFIG.SYS (in REAL/32). These platforms maintain additional settings within a binary file called CCONFIG.BIN, typically altered through CONFIG.EXE.

In DR DOS 3.31 and later variants—including PalmDOS 1.0, Novell DOS 7, OpenDOS 7.01, and DR-DOS 7.02 onwards—DCONFIG.SYS overrides CONFIG.SYS. This approach supports multi-boot configurations and disk compression environments where drive letters may change after loading compression drivers. OpenDOS 7.01 and DR-OpenDOS 7.02 also search for ODCONFIG.SYS, while some DR-DOS editions look for DRCONFIG.SYS.

Starting with DR DOS 6.0, the command SYS /DR:ext enables modification of default system file extensions to allow multiple sets of system files to coexist in a single root directory, selectable by boot managers like LOADER in Multiuser DOS and DR-DOS 7.x. The SHELL directive supports specifying alternative AUTOEXEC.BAT files using the /P[:filename.ext] option, and COMMAND.COM accepts extensions other than ".BAT". Additionally, the CHAIN=filespec command facilitates continuing configuration processing in other files, including label-specific jumps (CHAIN=filespec,label) available from DR-DOS 7.02 onward.

From version 7.03 onward, DR-DOS supports SYS /A, which copies both CONFIG.SYS and AUTOEXEC.BAT along with system files during setup.

FreeDOS uses FDCONFIG.SYS, RxDOS employs RXCONFIG.SYS, and PTS-DOS utilizes CONFIG.PTS for comparable configuration roles.

In Windows 95 and 98, both CONFIG.SYS and AUTOEXEC.BAT exist in the boot drive’s root directory but are usually left empty. On the other hand, Windows Me does not process CONFIG.SYS at startup; instead, it relies on environment variables stored within the Windows Registry (HKLM\System\CurrentControlSet\Control\SessionManager\Environment).

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

Example

Here is a sample CONFIG.SYS used in 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 as jump destinations for the , , , , and commands.
Functions like , allowing inline comments following other instructions. (Note: MS-DOS/PC DOS does not ignore inline comments enclosed in double quotes.)
Serves as an alternative to the ; directive for inline comments.
Presents a Yes/No prompt with an optional message, requesting user confirmation before proceeding with subsequent CONFIG.SYS commands.[1] While FreeDOS supports conditional boot menus without message display, DOS 6.0 and later allow similar functionality by appending after directives (e.g., ).
Executes the next CONFIG.SYS command unconditionally.

ATemplate:NbndC

Determines if programs can be interrupted upon encountering errors.
Sets which drives record file access timestamps in FAT file systems.
Executes conditionally on AT-compatible hardware.
Boot manager utility.
Adjusts the level of error message detail.
Alters the default serial port driver assignment (COM1: through COM4:) for the AUX device.
Prevents access to character devices outside the virtual \DEV directory.
Loads a fundamental device driver into memory.
Produces a brief beep sound even when audible alerts are disabled.
Designates the operating system to boot subsequently.
Enables or disables enhanced Ctrl+C interrupt checking.
Defines the number of disk buffers to allocate.
Similar to BUFFERS, but loads buffer memory into HMA or UMB areas.
, CACHETTL, CACHEFLUSH (Embedded DOS 6-XL only)
Manage cache block allocation and timing of cache flushing.
Runs programs during CONFIG.SYS processing, halting further execution until completion.
Sets initial Caps Lock keyboard state on startup.
, CDDBUFFERS (PTS-DOS only)
Configures CD-ROM driver buffers and hardware parameters.
Continues CONFIG.SYS processing from a new file or label reference.
, CLS, CODEPAGE (various OS-specific)
Manage system clock type, clear the display screen, and specify OEM codepages.
, COLOR (PTS-DOS only)
Defines CMOS RAM address and boot menu color settings.
, COM2, COM3, COM4 (DR-DOS 7.02+)
Specify count, sequence, I/O addresses, and timeouts for serial COM ports beyond COM1.
, COMMENT(S), COUNTRY (various OS versions)
Specify DMA buffer sizes, redefine inline comment markers, and configure internationalization settings.
, CPSW (MS-DOS specific), CPU series directives (PTS-DOS only)
Adjust cursor position, switch codepages, and perform CPU-based conditional execution.

DTemplate:NbndF

Configures relocation of drive descriptor tables in memory.
Sets memory segment address used for multi-sector disk data deblocking operations.
Activates internal debugger support features.
Boot manager component.
Loads device drivers into conventional memory space.
Loads device drivers into upper memory blocks (equivalent to in DRDOS 5.0).
Establishes country and codepage settings for keyboard, screen, and printer devices.
Configures sizes of cache memory segments.
Specifies floppy disk compatibility modes to use.
Selects display font parameters.
Controls loading DOS into high memory and/or upper memory areas (similar function as in DRDOS 5.0).
Loads DOS internal tables such as BUFFERS, FCBS, FILES, LASTDRIVE, and STACKS into upper memory regions.
Specifies an alternate directory path for DOS system files.
Defines search paths for data files used by DOS utilities.
Sets physical parameters for disk drives connected to the system.
Provides configuration for drives that are not automatically recognized by DOS.
Refer to .
Enables error logging with PDUMP.nnn files on a specified drive.
Displays a plain text message on the screen during processing.
Outputs messages including ANSI escape sequences for formatting purposes.
Adds extra verification steps when starting programs.
Assigns an assumed error or return code for subsequent commands to utilize.
Controls the state of the A20 gate at program startup to manage memory access above 1MB.
Terminates CONFIG.SYS processing prematurely except for SWITCHES and SHELL directives which continue execution.
Sets hash table size to optimize file opening speed (distinct from MS-DOS/PC DOS FASTOPEN driver behavior).
Defines the number of cached File Control Blocks that can be open simultaneously (shares buffer space with FILES under DR-DOS).
Similar to FCBS but loads these structures into upper memory areas.
Boot manager functionality component.
Specifies maximum number of files that may be opened concurrently by the system.
Like FILES but loads file handle structures into upper memory blocks.
Executes designated subsections within CONFIG.SYS files (see IGNORE directive).

GTemplate:NbndI

Waits for a keystroke or timeout, setting the error level to the ASCII value of the key pressed or 1024 if timed out.
Resumes processing of CONFIG.SYS at a designated label.
Continues nested CONFIG.SYS execution at a specified label, then returns to the prior location.
Refer to , , or for related functions.
Consult for additional information.
See for further details.
Refer to or for more context.
See or for related commands.
Consult for additional usage.
Loads a TSR program into memory following DOS data segment relocation, functioning similarly to HIINSTALL.
See , , or for related instructions.
Refer to for further explanation.
See or for supplementary details.
Activates console and command line history buffer with advanced pattern searching capabilities.
Defines the address of the High Memory Area (HMA) segment.
Sets up the HLT power-saving mode.
Enables scanning of the boot sector for viruses.
Loads installable file system drivers.
Prevents execution of certain CONFIG.SYS subsections.
Permits specified applications to operate at ring 2, granting direct hardware I/O access.
Incorporates directives from another menu block, emulated through GOSUB/RETURN in DR-DOS.
Sets the keyboard’s Insert mode status.
Installs a TSR program into memory.
Installs a TSR program into upper memory, equivalent to HIINSTALL in DR DOS 5.0.
Loads a TSR program after relocating the DOS data segment.
Adjusts PIC interrupt priorities to assign highest priority to a specified IRQ.

KTemplate:NbndM

Defines the keyboard layout configuration.
Specifies the address of the relocated keyboard buffer.
Sets the maximum number of accessible drives.
Functions like LASTDRIVE but additionally loads Current Directory Structure into upper memory.
Lists paths used for DLL searches.
Manages legacy application support settings.
Determines the quantity of file locks allowed.
Configures boot logo display when using PTS-DOS boot manager.
Specifies count, order, I/O address, and timeout parameters for LPT1 device setup.
Applies similar settings for LPT2 device configuration.
Same configuration options applicable to LPT3 device.
Enables and configures LPT4 device functionality.
Defines delay before increasing priority of waiting processes.
Configures memory allocation strategy parameters.
Sets default DOS memory allocation approach.
Specifies available menu options in CONFIG.SYS menus.
Defines menu color schemes, emulatable via ECHO under DR-DOS environments.
Designates default menu block, which can be emulated using TIMEOUT and SWITCH commands under DR-DOS.
Specifies particular menu block settings, emulated through ECHO and SWITCH in DR-DOS systems.
Enables operations involving multitrack disks.
Continues processing CONFIG.SYS within a new file after loading a device driver and setting %NEWFILE% environment variable.

NTemplate:NbndQ

Sets default No () response character in Yes/No/Resume prompts.
Controls keyboard [[Num Lock|Template:Keypress]] state (on or off).
Enables conditional execution based on last error level, such as .
Displays text and waits for key input, similar to and commands under DR-DOS systems.
Requires user confirmation upon encountering errors in CONFIG.SYS processing.
Configures buffer sizes assigned to LPT ports.
Enables conditional execution on PC-compatible hardware platforms.
Sets parameters for priority-based scheduling mechanisms.
Assigns priority levels for disk I/O operations.
Changes default printer device driver assignment (e.g., switching from LPT1 to LPT3 or LPT4).
Controls whether DOS applications are permitted to execute.
Loads a user interface shell environment.
Enables conditional execution specifically on IBM PS/1-compatible machines.
Allows conditional execution on IBM PS/2-compatible systems only.
Suppresses output directed to STDOUT.

RTemplate:NbndT

Activates automatic system reboot upon encountering errors.
Permits inclusion of comments within CONFIG.SYS (not recognized by PTS-DOS).
Allocates a drive letter for local block device drivers.
Sets the default character used in Yes/No/Resume prompts.
Returns control from nested CONFIG.SYS processing to the previous GOSUB or SWITCH command, optionally passing back a return code.
Specifies the amount of real mode memory available.
Allows concurrent loading of programs in the background during CONFIG.SYS execution, functioning similarly to INSTALL in DOS environments.
Saves the initial character of deleted files within the FAT reserved area.
Defines either the video mode (in FreeDOS) or the screen access method (in PTS-DOS).
Controls the keyboard Scroll Lock key status, turning it on or off.
Establishes environment variables.
Loads the command interpreter shell.
Functions like SHELL but supports preloading COMMAND.COM into the High Memory Area or Upper Memory Blocks to optimize memory usage, particularly advantageous when using third-party shells.
Configures keyboard modifier states such as Shift Lock, Num Lock, Scroll Lock, and Insert mode.
Determines whether files are closed automatically when Ctrl+Alt+Del is pressed.
Skips the Power-On Self-Test during reboot sequences.
, STACKSIZE, STACKSHIGH
Set up hardware interrupt stack sizes and buffer locations across various DOS platforms and versions to enhance system stability and performance.
, SYSBOOT, SYSGEN, SYSLOAD
PTS-DOS-specific commands managing boot procedures, system file placement, and alternative operating system boot options for flexible system deployment.
, SWITCH, SWITCHAR
Enable conditional processing and command-line switch handling within CONFIG.SYS across different DOS variants, improving script adaptability.
, SWAPPATH
OS/2 directives that manage error logging locations and specify paths for swap files to boost system reliability and resource management.
, TRACE, TRACEBUF
Regulate timing for executing CONFIG.SYS commands and activate detailed tracing or logging capabilities for debugging on DR-DOS, PTS-DOS, and OS/2 systems.
Additional parameters such as TMPEXT, TRAPDUMP, THREADS, TIMESLICE configure temporary file extensions, error logging detail levels, thread concurrency settings, and scheduler time slices to optimize allocation of system resources.

UTemplate:NbndZ

Configures a specific memory segment to function as an Upper Memory Block (UMB) in DOS.
Specifies the UMB server configuration.
Defines address ranges allocated for UMB RAM usage.
Enables or disables verification of disk writes.
Sets the DOS version number reported to software.
Controls VGA display status settings.
Assigns the current video mode similarly to FreeDOS's SCREEN directive.
Activates virtual DMA support.
Manages processor Virtual Mode Extensions (VME) features.
Configures Windows VxD driver parameters.
Sets Windows compatibility options.
Adjusts relocation of Extended BIOS Data Area (EBDA).
Executes directives conditionally on XT-compatible machines only.
Enables Year 2000 (Y2K) support features.
Defines the default character used in Yes prompts.
Enables tracking of file deletions.

Issues

Although booting without a CONFIG.SYS file is possible, this file alongside AUTOEXEC.BAT is critical for customizing DOS behavior and loading necessary software components. Corruption or damage to these files requires troubleshooting.

When CONFIG.SYS lacks a SHELL directive or is missing/corrupted altogether, DOS attempts to locate COMMAND.COM in the root directory of the boot drive. Versions earlier than 6.0 will fail to start if COMMAND.COM cannot be found. MS-DOS 6.0/PC DOS 6.1 and Novell DOS 7 onward prompt users to specify an alternative command interpreter path if COMMAND.COM is absent or aborted, allowing limited shell replacement without rebooting.

COMMAND.COM from MS-DOS 7.0+ is incompatible with DR-DOS systems that often reside in C:\ during dual-boot configurations. DR-DOS versions 7.02 and later prevent bypassing SHELL directives during skip/trace/step modes to avoid conflicts and require a valid shell prompt before loading COMMAND.COM if none is detected.

CONFIG.SYS file size limitations differ: MS-DOS/PC DOS restricts it to several kilobytes (up to 64 KB in later releases), whereas DR-DOS imposes no fixed limit except that of the underlying file system. MS-DOS processes CONFIG.SYS by tokenizing it—loading device drivers prior to TSRs—while DR-DOS interprets each directive sequentially line-by-line. This approach allows precise control over loading order and conditional execution depending on hardware presence or error states.

The INSTALL directive in DR-DOS enables execution of non-resident software integrated into the CONFIG.SYS processing flow, which can assist with debugging or resolving driver conflicts.

In MS-DOS/PC DOS versions 2.0 through 4.01, SHELL lines are limited to 31 characters in length, expanding up to 128 characters in later versions. DR-DOS supports up to 255 characters on this line. It should be noted that CONFIG.SYS directives do not accommodate long filename formats.

Dual Booting DOS and Windows 9x

When Windows 95 is installed over an existing DOS/Windows setup, the files CONFIG.SYS and AUTOEXEC.BAT are renamed to CONFIG.DOS and AUTOEXEC.DOS respectively to enable dual boot functionality. During DOS startup, these renamed files are temporarily restored to their original filenames. Meanwhile, Windows 95 versions of these files are saved as 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 remain intact and unchanged. Instead, DR-DOS relies on DCONFIG.SYS and AUTODOS7.BAT for its boot-time configuration.

OS/2 / Windows NT

OS/2 makes extensive use of CONFIG.SYS to set up drivers and environment variables prior to launching its graphical user interface.

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

A number of CONFIG.SYS commands specific to OS/2 have not been officially documented.

CONFIG.SYS continues to be utilized 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 directives
  • CONFIG.SYS Command Reference – Caldera (partial DR-DOS 7 directives)
  • Explanation of FreeDOS CONFIG.SYS commands
  • PTS-DOS 2000 Pro User Guide including CONFIG.SYS entries (incomplete)
  • Unofficial German PTS-DOS FAQ (PTS/FAQD), featuring additional CONFIG.SYS information
  1. ↑ Cite error: Invalid <ref> tag; no text was provided for refs named Paul_2000_CONFIG