Jump to content

BASEDEV (CONFIG.SYS directive)

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

CONFIG.SYS serves as the main configuration file for DOS and OS/2 operating systems. This plain text file contains 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 used to set up DOS for hardware devices, software applications, and memory allocation. Once CONFIG.SYS has been processed, DOS launches the command interpreter specified by the SHELL directive, defaulting to COMMAND.COM if none is specified; this interpreter then executes commands from AUTOEXEC.BAT.

Typically, the file consists of name=value entries that define configurable parameters or load components 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 boot drive. The same filename is also used by (DCP), an MS-DOS variant developed by East-German VEB Robotron.

Certain DOS derivatives prioritize alternative configuration files over CONFIG.SYS:

Concurrent DOS 386, Concurrent DOS XM, Multiuser DOS, System Manager, and REAL/32 seek CCONFIG.SYS (the "C" referencing "Concurrent") instead of CONFIG.SYS. Some Multiuser DOS editions utilize CCONFIG.INI, whereas REAL/32 employs MCONFIG.SYS. These platforms support extended configuration parameters stored in binary files like CCONFIG.BIN, which are generally edited using CONFIG.EXE.

For DR DOS versions 3.31, PalmDOS 1.0, Novell DOS 7, OpenDOS 7.01, and DR-DOS 7.02 and later, DCONFIG.SYS (with "D" indicating "DR DOS") takes precedence over CONFIG.SYS. Initially designed to assist disk compression utilities in managing drive letter assignments, it also facilitates multi-boot setups. OpenDOS 7.01 and DR-OpenDOS 7.02 may additionally check for ODCONFIG.SYS, while some DR-DOS 7.02+ iterations look for DRCONFIG.SYS.

Starting with DR DOS 6.0, the command SYS /DR:ext enables customization of default file extensions to allow multiple system files to coexist in a single root directory, selectable via boot loaders such as those bundled with Multiuser DOS and DR-DOS 7.x. The SHELL command can specify alternate AUTOEXEC.BAT files using /P[:filename.ext], with COMMAND.COM accepting extensions beyond .BAT (a feature also supported by 4DOS). The CHAIN=filespec directive permits continuation of CONFIG.SYS processing from another file located anywhere on the boot drive; from DR-DOS 7.02 onward, an optional label parameter (CHAIN=filespec,label) is supported for targeted execution jumps.

From version 7.03 onward, DR-DOS includes a SYS /A option that copies CONFIG.SYS and AUTOEXEC.BAT alongside system files.

FreeDOS employs FDCONFIG.SYS; RxDOS version 7.24 and above uses RXCONFIG.SYS; and PTS-DOS utilizes CONFIG.PTS.

Both CONFIG.SYS and AUTOEXEC.BAT are present in the root directories of Windows 95 and Windows 98 boot drives but are usually left empty.

Windows Me does not process CONFIG.SYS during startup; instead, it retrieves environment variables from the Windows Registry path:

HKLM\System\CurrentControlSet\Control\SessionManager\Environment

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

Example

Below is a sample CONFIG.SYS file configured 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 destinations for directives such as , , , and .
Functions similarly to , but can also be utilized for inline comments following other CONFIG.SYS commands. (Note that under MS-DOS/PC DOS, inline comments inside double quotes are not ignored.)
Introduces inline comments in addition to the use of the ; character.
Prompts a Yes/No confirmation with an optional message before executing subsequent CONFIG.SYS instructions. (FreeDOS supports conditional execution combined with boot menus.) Starting from DOS 6.0, a comparable feature is available by appending after the directive, for example .
Forces unconditional execution of the next CONFIG.SYS command.

ATemplate:NbndC

Determines whether programs may be aborted upon encountering errors.
Sets which drives record file access timestamps within the FAT directory entries.
Allows conditional execution exclusively on AT-compatible hardware.
Provides boot management capabilities.
Adjusts the level of detail in error message output.
Changes the default serial device driver assignment (from COM1: through COM4:) for the AUX device.
Prevents character devices from being accessible outside the virtual \DEV directory.
Loads fundamental device drivers into memory.
Produces a brief beep sound even if audible alerts are disabled.
Specifies the operating system to boot next.
Enables or disables extended Ctrl+C checking functionality.
Configures the number of disk buffers to allocate.
Functions like BUFFERS but loads buffers into High Memory Area or Upper Memory Blocks.
, CACHETTL, CACHEFLUSH (Embedded DOS 6-XL only)
Manage cache block allocation and timing of cache flushing operations.
Loads programs during CONFIG.SYS processing and runs them in the foreground, halting further processing until they return control.
Sets keyboard Caps Lock status to either on or off.
, CDDBUFFERS (PTS-DOS only)
Defines CD-ROM driver name and quantity of buffers allocated.
Continues processing CONFIG.SYS from a new file or label reference.
, CLS, CODEPAGE (PTS-DOS or OS/2)
Configure system clock type, clear screen display, and OEM codepages.
, COLOR (PTS-DOS only)
Specifies CMOS RAM address and colors used in boot menus.
, COM2, COM3, COM4 (DR-DOS 7.02+)
Define count, sequence, I/O addresses, and timeout parameters for COM ports.
, COMMENT(S) (PTS-DOS or DOS 4.0+)
Set DMA buffer size and redefine inline-comment characters or specify lines to ignore.
, CPOS (Various DOS versions)
Enable internationalization support and set cursor position in menus.
, CPU series directives (PTS-DOS, DR-DOS)
Manage codepage switching and conditional execution based on CPU type or processor speed.

This summary outlines essential CONFIG.SYS directives that influence system configuration across multiple DOS variants, highlighting those critical for enterprise environments such as device control, memory management optimization, and support for internationalization.

DTemplate:NbndF

Controls relocation settings for drive descriptor tables.
Defines memory segment address used for multi-sector disk data deblocking operations.
Activates internal debugger functionality.
Provides boot management features.
Loads device drivers into conventional memory space.
Loads device drivers into upper memory areas (equivalent to in DRDOS 5.0).
Configures country codes and codepages affecting keyboard, screen, and printer devices.
Sets cache memory sizes for improved performance.
Defines floppy disk compatibility modes.
Specifies font used for display output.
Manages loading DOS into high memory and utilization of upper memory blocks (similar to in DRDOS 5.0).
Loads DOS tables such as BUFFERS, FCBS, FILES, LASTDRIVE, STACKS into upper memory regions.
Sets an alternative directory path for DOS system files.
Specifies search paths for data files used by the system.
Defines physical parameters of disk drives.
Establishes settings for drives that are not recognized by default.
Refer to .
Enables error logging via PDUMP.nnn files and designates target drive location.
Displays messages on-screen during processing.
Displays messages that include ANSI escape sequences for formatting.
Determines whether additional checks occur when launching programs.
Assigns an error or return code to be assumed after execution of commands.
Controls A20 gate state when starting applications.
Terminates CONFIG.SYS processing before reaching file end (exceptions apply to SWITCHES and SHELL directives in some cases).
Adjusts hash table size to accelerate file open operations, differing from MS-DOS/PC DOS FASTOPEN driver implementation.
Sets number of cached File Control Blocks that can be opened simultaneously (shares buffer space with FILES under DR-DOS).
Similar to FCBS but explicitly loads these into upper memory areas.
Provides boot management functionality.
Specifies maximum number of files that can be opened concurrently.
Similar to FILES but explicitly loads file handles into upper memory blocks.
Includes execution of specified subsections within CONFIG.SYS (see 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 a designated label.
Continues nested CONFIG.SYS processing at a specified label, then returns to the previous position.
Refer to , , or for further details.
Consult for additional information.
See for related commands.
Refer to or as applicable.
See or for more context.
Refer to for details.
Loads a Terminate and Stay Resident (TSR) program into memory after relocating the DOS data segment. Compare with INSTCDEX.
See , , or for related instructions.
Consult for more information.
Refer to or as needed.
Activates console and command line history buffers along with advanced pattern searching capabilities.
Defines the segment address for High Memory Area (HMA).
Configures energy-saving settings using the HLT instruction.
Performs boot sector virus scanning during system startup.
Loads installable file system drivers.
Prevents execution of designated CONFIG.SYS subsections.
Permits programs to operate at ring 2, enabling direct hardware I/O access.
Incorporates directives from another menu block, emulated through GOSUB/RETURN in DR-DOS.
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 a TSR program after relocating the DOS data segment.
Adjusts interrupt priority rotation of the PIC controller, assigning highest priority to a specified IRQ.

KTemplate:NbndM

Defines the keyboard layout configuration.
Sets the address location for the relocated keyboard buffer.
Specifies the maximum number of accessible drives.
Similar to LASTDRIVE but loads Current Directory Structure (CDS) into upper memory regions.
Lists directories searched for dynamic link libraries (DLLs).
Manages compatibility settings for legacy applications.
Determines the number of file locks allowed.
Controls boot logo display and startup messages when using PTS-DOS boot manager.
Specifies count, order, I/O port address, and timeout parameters for LPT1 device configuration.
Configures LPT2 device with similar parameters.
Sets up LPT3 device accordingly.
Enables and configures LPT4 device support.
Establishes wait time before increasing process priority level.
Governs memory allocation policies within DOS environment.
Defines default approach for DOS memory allocation strategy.
Specifies options available in system menus.
Sets color schemes for menus, emulatable under DR-DOS systems.
Identifies default menu block, compatible with DR-DOS emulation.
Defines an individual menu block, emulatable under DR-DOS environment.
Activates multitrack disk operation support.
Continues CONFIG.SYS processing from another file, optionally loading a device driver and setting %NEWFILE% environment variable.

NTemplate:NbndQ

Sets default No () response character in Yes/No/Resume prompts.
Configures keyboard [[Num Lock|Template:Keypress]] status at startup.
Enables conditional execution depending on last error code, e.g., .
Displays messages and waits for a key press, similar to and commands in DR-DOS systems.
Requires user confirmation of errors encountered in CONFIG.SYS processing.
Defines buffer size settings for LPT ports operation.
Enables conditional execution on PC-compatible hardware platforms.
Adjusts scheduler priority levels for processes.
Sets priority parameters specifically for disk I/O programs.
Changes default printer device driver from LPT1 to LPT3 or LPT4 devices as specified.
Controls permission for DOS programs to execute within system environment.
Loads user interface shell components during startup sequence.
Enables conditional execution on IBM PS/1-compatible systems only.
Allows conditional execution on IBM PS/2-compatible hardware platforms only.
Suppresses output directed to standard output (STDOUT).

RTemplate:NbndT

Activates automatic system reboot upon encountering errors.
Permits inclusion of comments within CONFIG.SYS (ignored in PTS-DOS).
Allocates a specific drive letter for local block device drivers.
Defines the default Resume () character used in command prompts.
Returns control from nested CONFIG.SYS processing to the previous GOSUB or SWITCH point, optionally passing a return code.
Specifies the size of real mode memory available.
Allows simultaneous loading of programs within CONFIG.SYS, functioning similarly to CALL or INSTALL commands in DOS.
Saves the initial character of deleted files into the FAT reserved section.
Determines video mode settings or screen access methods.
Sets the status of the keyboard Scroll Lock key.
Establishes environment variables for system use.
Loads the command interpreter shell.
Similar to SHELL but supports pre-allocating COMMAND.COM size in HMA or UMBs to minimize fragmentation.
Defines keyboard modifier states such as Shift Lock, Num Lock, Scroll Lock, and Insert mode.
Configures file closure behavior when Ctrl+Alt+Del is pressed.
Skips Power-On Self-Test (POST) during reboot sequences.
, STACKSIZE, STACKSHIGH
Manage hardware interrupt stack sizes and buffer locations across various DOS platforms.
, SYSBOOT, SYSGEN, SYSLOAD, SYSTOUMB
PTS-DOS-specific commands controlling boot procedures, memory allocation, and system loading tactics.
, SWITCH
Enables conditional submenu blocks and nested CONFIG.SYS processing with label-based flow control (available from DOS 6.0 onwards).
, SWAPPATH
OS/2 options specifying locations for error logs and swap file directories.
, SWITCHES
Define system switch characters (such as '/' or '-') and special options applicable to DOS variants excluding PTS-DOS.
, THREADS, TIMESLICE
OS/2-exclusive settings addressing FPU bug fixes, thread concurrency management, and scheduler time slice allocation.
, TRACE, TRACEBUF
Control execution timeouts and logging buffers for CONFIG.SYS across DOS variants including DR-DOS, PTS-DOS, FreeDOS, and OS/2.
, TRAPDUMP
PTS-DOS extension for temporary file handling and OS/2 error logging configurations.

UTemplate:NbndZ

Directs DOS to designate a specific memory segment as an Upper Memory Block (UMB).
Configures the UMB server parameters.
Defines address ranges allocated for UMB RAM usage.
Toggles disk write verification on or off.
Sets the DOS version string reported to applications.
Controls VGA display status settings.
Specifies current video mode similarly to FreeDOS's SCREEN command.
Enables usage of virtual Direct Memory Access (DMA).
Manages processor Virtual Mode Extensions (VME) settings.
Configures Virtual Device Driver (VxD) parameters for Windows environments.
Sets Windows system support options.
Relocates the Extended BIOS Data Area (XBDA) within memory.
Executes conditionally on XT-compatible machines only.
Activates built-in Year 2000 compatibility features.
Defines the default 'Yes' character used in prompts.
Keeps track of driver removal events.

Issues

While the system can initiate booting without CONFIG.SYS or AUTOEXEC.BAT files present, these files remain crucial for comprehensive operating system customization and meeting software prerequisites. Corruption or loss of either file requires diagnostic intervention.

If CONFIG.SYS omits a SHELL directive or becomes corrupted, DOS attempts to locate COMMAND.COM in the root directory of the boot drive. Earlier MS-DOS versions prior to 6.0 fail if COMMAND.COM is missing. However, MS-DOS 6.0/PC DOS 6.1 and Novell DOS 7 and newer versions prompt users to specify an alternative command interpreter path. This prompt also occurs if the primary shell terminates unexpectedly, permitting a limited shell replacement during runtime without necessitating a reboot.

The COMMAND.COM from MS-DOS version 7.0 onward is incompatible with DR-DOS installations—commonly located in C:\ during dual-boot configurations. From DR-DOS version 7.02 onwards, skipping SHELL directives via skip/trace/step modes is disallowed unless a valid shell filename is provided before loading COMMAND.COM from the root directory. Some later DR-DOS releases reinstated skip functionality to facilitate recovery from invalid SHELL parameters.

CONFIG.SYS size limitations differ among operating systems: recent MS-DOS and PC DOS editions permit approximately up to 64 KB, whereas DR-DOS imposes no effective limit due to its line-by-line parsing approach rather than tokenization. This grants DR-DOS users fine-grained control over driver and TSR loading order through DEVICE and INSTALL commands, enabling resolution of conflicts or insertion of debuggers prior to driver initialization. The INSTALL directive also supports execution of non-resident programs within CONFIG.SYS processing.

In MS-DOS/PC DOS versions ranging from 2.0 through 4.01, the maximum length for a SHELL command line is restricted to 31 characters; subsequent versions extend this limit up to 128 characters. DR-DOS accommodates up to 255 characters for this directive. Notably, CONFIG.SYS directives do not support long filenames across these systems.

Dual Booting DOS and Windows 9x

When Windows 95 is installed over a pre-existing DOS/Windows configuration, the system renames CONFIG.SYS and AUTOEXEC.BAT to CONFIG.DOS and AUTOEXEC.DOS to enable dual boot functionality between Windows 9x and DOS. During a DOS boot, these files are temporarily reverted to their original filenames. Meanwhile, backups of the Windows 95-specific versions are stored as CONFIG.W40 and AUTOEXEC.W40.

In setups where Caldera DR-DOS 7.02 or 7.03 coexists with Windows 95, the CONFIG.SYS and AUTOEXEC.BAT files used by Windows remain unaltered. Instead, DR-DOS employs DCONFIG.SYS and AUTODOS7.BAT as its respective startup scripts.

OS/2 / Windows NT

OS/2 relies heavily on CONFIG.SYS for setting up device drivers and environment parameters prior to loading its graphical user interface.

Within the OS/2 subsystem included in Windows NT, the file perceived by OS/2 applications as CONFIG.SYS is, in reality, maintained within the system registry.

There are numerous CONFIG.SYS directives for OS/2 that have never 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 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
  • Description of FreeDOS CONFIG.SYS directives
  • PTS-DOS 2000 Pro User Guide including CONFIG.SYS directives (archived)
  • Unofficial German PTS-DOS FAQ (archived), featuring additional CONFIG.SYS commands