FILENAME (CONFIG.SYS directive)
| Company type | Configuration file |
|---|---|
| Industry | Operating systems |
| Founded | 1983 |
| Headquarters | N/A |
| Products | System configuration for DOS and OS/2 |
CONFIG.SYS serves as the main configuration file for the DOS and OS/2 operating system families. This ASCII text file contains configuration commands that are interpreted by the operating system's DOS BIOS—commonly found in IBMBIO.COM or IO.SYS—during the system's startup process. The CONFIG.SYS file was first introduced with DOS version 2.0.
Usage
The directives within CONFIG.SYS are responsible for setting up DOS to manage hardware devices, software applications, and memory allocation. Once CONFIG.SYS has been processed, DOS proceeds to launch the command interpreter specified by the SHELL directive; if none is specified, it defaults to COMMAND.COM, which then executes the commands listed in the AUTOEXEC.BAT file.
Typically, CONFIG.SYS consists of name=value pairs that adjust system parameters or load device drivers and terminate-and-stay-resident programs (TSRs) into memory.
In DOS environments, this configuration file is located in the root directory of the bootable drive.
Certain MS-DOS variants, such as (DCP) developed by East-German VEB Robotron, also utilize the CONFIG.SYS filename.
Some DOS-based systems prioritize alternative configuration filenames over CONFIG.SYS:
- Advanced iterations of Concurrent DOS 386, Concurrent DOS XM, Multiuser DOS, and REAL/32 prefer CCONFIG.SYS or CCONFIG.INI (in Multiuser DOS) instead of CONFIG.SYS. These systems maintain additional settings in a binary file called CCONFIG.BIN, which is generally edited using a dedicated utility named CONFIG.EXE.
- Versions of DR DOS starting from 3.31, including derivatives like PalmDOS, Novell DOS, and OpenDOS, give precedence to DCONFIG.SYS over CONFIG.SYS to better support disk compression and multi-boot configurations.
- OpenDOS releases 7.01 and DR-OpenDOS 7.02 also recognize ODCONFIG.SYS, while some DR-DOS 7.02 and later versions look for DRCONFIG.SYS as an alternative configuration file.
- Starting with DR DOS 6.0, users can modify default configuration file extensions using SYS /DR:ext, facilitating multiple simultaneous system configurations selectable via boot managers like LOADER.
- The SHELL command allows specifying alternate AUTOEXEC.BAT files using the /P[:filename.ext] switch, a feature supported by enhanced command interpreters such as 4DOS.
- From DR-DOS 6.0 onward, the CHAIN=filespec directive enables continuation of configuration processing from another file, with later versions (7.02+) supporting optional label parameters.
- DR-DOS version 7.03 and above introduce SYS /A, a command that copies both CONFIG.SYS and AUTOEXEC.BAT alongside system files.
Other DOS distributions have implemented comparable mechanisms:
- FDCONFIG.SYS is used by FreeDOS, - RXCONFIG.SYS is employed by RxDOS, - CONFIG.PTS is recognized by PTS-DOS.
Windows 95 and Windows 98, which are built on DOS foundations, retain CONFIG.SYS and AUTOEXEC.BAT on their boot volumes, though these files are generally left empty.
In contrast, Windows Me does not process CONFIG.SYS during startup; instead, it retrieves environment variables directly from the Windows Registry at HKLM\System\CurrentControlSet\Control\SessionManager\Environment.
Within the FlexOS operating system, CONFIG.SYS is a binary file that specifies resource managers and device drivers to be loaded at boot time.
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>
:;*?!
- Establishes labels within CONFIG.SYS to serve as jump destinations for , , , and commands.
- Functions similarly to , but is also utilized for inline comments following other CONFIG.SYS instructions. (In MS-DOS/PC DOS, inline comments enclosed in double quotes are not disregarded.)
- Marks inline comments alongside the ; directive.
- Provides a Yes/No prompt to confirm whether subsequent CONFIG.SYS commands should execute. (FreeDOS supports conditional execution with boot menus but lacks custom messages.) DOS version 6.0 and later allows comparable behavior by appending after commands.
- Executes the subsequent CONFIG.SYS command without condition.
ATemplate:NbndC
- Determines whether programs can be terminated upon encountering errors.
- Defines which drives record file access date stamps within FAT file systems.
- Enables conditional execution on AT-compatible hardware.
- Boot management utility.
- Adjusts the verbosity level of error messages.
- Changes the default 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 memory.
- Generates a beep sound even if notification sounds are disabled.
- Indicates the operating system to boot next.
- Enables or disables extended Ctrl+C detection.
- Specifies how many disk buffers should be allocated.
- Similar to BUFFERS but allocates buffers into HMA or UMB areas.
- , , (Exclusive to Embedded DOS 6-XL)
- Controls cache block allocation and flushing timing parameters.
- Loads programs within CONFIG.SYS, running them in the foreground and suspending further processing until completion.
- Sets the keyboard's Caps Lock state.
- , (PTS-DOS only)
- Configures CD-ROM hardware drivers and buffer sizes.
- (DR DOS 5.0+ and Embedded DOS)
- Continues processing CONFIG.SYS in a new file or label.
- , , and other directives specific to PTS-DOS adjust system behavior and display options.
- , (OS/2 only)
- Specifies OEM codepages to use.
- , ..., , (DR-DOS 7.02+)
- Configures serial COM ports including their quantity, order, I/O addresses, and timeout values.
[Additional directives omitted for brevity]
DTemplate:NbndF
- Manages relocation of drive descriptor tables in memory.
- Defines the memory segment address used for multi-sector disk data deblocking operations.
- Activates internal debugger support features.
- Boot management functionality.
- Loads device drivers into conventional memory space.
- Loads device drivers into upper memory blocks (equivalent to in DRDOS 5.0).
- Sets country and codepage parameters for keyboard, screen, and printer devices.
- Configures cache memory size allocations.
- Determines floppy disk compatibility modes.
- Specifies the font used for display output.
- Controls loading of DOS into high memory and/or utilization of upper memory areas (similar to in DRDOS 5.0).
- Indicates that DOS tables such as BUFFERS, FCBS, FILES should be loaded into upper memory regions.
- Specifies an alternative directory path for DOS system files.
- Defines search paths for data files utilized by DOS.
- Sets physical parameters for disk drives connected to the system.
- Establishes parameters for drives that are not recognized by default configurations.
- See .
- Enables error log creation with
PDUMP.nnnfiles and specifies the target drive for these logs. - Outputs a message directly onto the screen display.
- Displays messages that include ANSI escape sequences for formatting.
- Adds extra verification steps when launching programs.
- Sets an assumed error or return code following program execution.
- Controls the state of the A20 gate when starting an application.
- Terminates CONFIG.SYS processing prematurely, with certain exceptions applying.
- Defines hash table size to optimize file open operations (differs from MS-DOS/PC DOS FASTOPEN driver).
- Specifies the number of cached File Control Blocks available simultaneously (shares buffer space with FILES under DR-DOS).
- Functions like FCBS but loads these blocks into upper memory areas.
- Boot management command variant.
- Determines how many files can be opened at once by the system.
- Similar to FILES but loads file handles into upper memory blocks.
- Executes specified subsections of CONFIG.SYS during processing (refer to IGNORE).
GTemplate:NbndI
- Waits for a keystroke or until a timeout occurs, 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.
- Processes CONFIG.SYS at a specified label with the ability to return to the previous point.
- Refer to , , or for additional information.
- See also .
- Consult .
- Refer to or for further details.
- See or for more information.
- Consult .
- Loads a terminate-and-stay-resident (TSR) program after relocating the DOS data segment. Compare with INSTCDEX.
- Refer to , , or for further context.
- See .
- Consult or for related commands.
- Activates console and command line history buffers, including extended search capabilities.
- Defines the address of the High Memory Area (HMA) segment.
- Configures the CPU's HLT instruction for power-saving mode.
- Determines whether the system performs boot sector virus checks.
- Loads installable file system drivers.
- Prevents execution of certain CONFIG.SYS subsections (also see: ).
- Specifies programs authorized to operate at ring 2 level, allowing direct hardware I/O access.
- Incorporates directives from an alternate menu block (emulatable using GOSUB/RETURN in DR-DOS).
- Sets the keyboard’s Insert mode status.
- Installs a TSR program into conventional memory.
- Loads a TSR program into upper memory, equivalent to HIINSTALL in DR DOS 5.0.
- Installs TSR software following DOS data segment relocation (compare with INSTCDEX).
- Adjusts PIC interrupt priorities so that a specified IRQ number receives the highest priority.
KTemplate:NbndM
- Defines the keyboard layout configuration.
- Specifies the relocated keyboard buffer’s memory address.
- Sets the maximum number of accessible drives.
- Functions like LASTDRIVE but loads Current Directory Structure (CDS) into upper memory area.
- Lists directories for DLL search paths.
- Manages backward compatibility with legacy applications.
- Determines the quantity of file locks allowed.
- Configures boot logo display when using PTS-DOS boot manager.
- Defines parameters such as count, order, I/O address, and timeout for the LPT1 device.
- Applies LPT1 settings equivalently to LPT2 device.
- Mirrors LPT1 configurations for LPT3 device.
- Enables and configures LPT4 device similarly to others.
- Specifies delay before elevating process priority.
- Sets strategy for memory allocation management.
- Defines default DOS memory allocation policy.
- Establishes menu options available to users.
- Specifies color schemes for menus (can be emulated with ECHO in DR-DOS).
- Sets default menu block (also emulatable in DR-DOS).
- Defines individual menu blocks (emulatable within DR-DOS).
- Enables support for multitrack disk operations.
- Continues processing CONFIG.SYS from another file, optionally loading a device driver and setting %NEWFILE% environment variable.
NTemplate:NbndQ
- Sets default response character for No () in Yes/No/Resume prompts.
- Determines whether keyboard [[Num Lock|Template:Keypress]] is enabled or disabled by default.
- Executes commands conditionally based on previous error code, e.g., .
- Displays text and waits for user keypress, similar to commands in DR-DOS environments.
- Requires user confirmation upon encountering errors during CONFIG.SYS processing.
- Configures buffer sizes for LPT1 through LPT3 devices.
- Enables conditional execution specifically on PC-compatible hardware platforms.
- Sets parameters for priority scheduling of processes.
- Assigns priority levels to disk I/O related programs.
- Changes default printer device from LPT1 to LPT3 or LPT4 drivers as specified.
- Specifies whether DOS applications are permitted to execute.
- Loads graphical user interface components.
- Enables conditional execution tailored for IBM PS/1 systems.
- Enables conditional execution designed for IBM PS/2 systems.
- Suppresses output sent to STDOUT display.
RTemplate:NbndT
- Automatically restarts system on error occurrences.
- Permits inclusion of comments within CONFIG.SYS.
- Allocates a drive letter for local block device drivers.
- Sets the default response character in Yes/No/Resume prompts.
- Returns control from nested CONFIG.SYS processing to the previous GOSUB or SWITCH command, optionally with a return value.
- Specifies the size of real mode memory available.
- Executes programs listed in CONFIG.SYS concurrently in the background, akin to CALL or INSTALL commands under DOS.
- Saves the initial character of deleted files within the FAT reserved area.
- Determines video modes for FreeDOS or screen access methods under PTS-DOS.
- Controls the Scroll Lock key status on the keyboard.
- Assigns environment variables.
- Loads the command interpreter shell.
- Functions like SHELL but includes a SIZE parameter to pre-allocate COMMAND.COM in HMA or UMBs, minimizing fragmentation.
- Defines keyboard modifier states such as Shift Lock, Num Lock, Scroll Lock, and Insert mode.
- Controls whether files close upon pressing Ctrl+Alt+Del.
- Skips Power-On Self-Test (POST) during reboots.
- , STACKSIZE and STACKSHIGH
- Configure stack sizes for hardware interrupts and thread stacks across various DOS versions and OS/2 systems.
- , SYSBOOT, SYSGEN, SYSGENLOAD
- PTS-DOS utilities managing boot processes and system loading addresses.
- , SWITCH
- Handles conditional submenu blocks and nested CONFIG.SYS execution (available from DOS 6.0 onwards).
- , SWAPPATH
- OS/2 commands for setting error log locations and swap file paths.
- , SWITCHES
- Define default command-line switch characters ('/' or '-') along with special options (introduced in DOS 4.0+).
- , TRACEBUF
- Enables or disables single-step execution of CONFIG.SYS and configures logging buffer size (applicable to DR-DOS, PTS-DOS, OS/2).
- , SXFAKEHWFPU
- OS/2-specific directive for error logging and activating fixes for FPU bugs.
This segment outlines essential CONFIG.SYS directives utilized across DOS variants and OS/2 platforms, vital for fine-tuning system configurations in enterprise environments running legacy or embedded software.
UTemplate:NbndZ
- Designates a specific memory segment as an Upper Memory Block (UMB) for DOS use.
- Establishes the UMB server.
- Defines address boundaries for UMB RAM allocation.
- Toggles disk write verification on or off.
- Reports the DOS version presented to applications.
- Manages VGA display status settings.
- Specifies the current video mode configuration.
- Enables usage of virtual DMA channels.
- Activates or disables processor Virtual Mode Extensions (VME).
- Configures Windows VxD driver parameters.
- Sets up Windows system support features.
- Controls relocation of the Extended BIOS Data Area (EBDA).
- Executes conditionally on XT-class compatible machines.
- Implements integrated Year 2000 compliance support.
- Sets the default affirmative response character in prompts.
- Manages tracking of file deletions.
Issues
Although systems can start without CONFIG.SYS or AUTOEXEC.BAT files, these are crucial for customizing operating system behavior and loading necessary software components. Corruption or absence of these files requires diagnostic intervention.
If CONFIG.SYS lacks a SHELL directive or is damaged/missing, DOS attempts to locate COMMAND.COM in the root directory of the boot drive. Earlier versions prior to 6.0 fail to boot without it, whereas MS-DOS 6.0, PC DOS 6.1, Novell DOS 7+, and similar variants prompt users to specify a command interpreter path if COMMAND.COM is not found. This prompt also appears if COMMAND.COM terminates unexpectedly, offering limited runtime shell replacement without rebooting.
Due to incompatibilities between MS-DOS 7.0+ COMMAND.COM and DR-DOS, dual-boot configurations restrict bypassing SHELL directives during skip, trace, or step modes to maintain system stability. Later releases reintroduced some skip capabilities allowing recovery from invalid SHELL arguments by prompting users for valid shell filenames before loading COMMAND.COM.
CONFIG.SYS file size restrictions differ: MS-DOS and PC DOS limit files to several kilobytes (up to approximately 64 KB in newer editions), while DR-DOS imposes no explicit size limit aside from file system constraints. MS-DOS processes CONFIG.SYS by compiling it into a tokenized form before executing directives sequentially—loading drivers prior to TSRs. Conversely, DR-DOS interprets CONFIG.SYS line-by-line, permitting flexible loading order control through DEVICE and INSTALL commands, facilitating conflict resolution and dynamic integration of temporary software.
In MS-DOS/PC DOS versions 2.0 through 4.01, SHELL lines are restricted to 31 characters, increasing up to 128 characters in later editions. DR-DOS extends this limit further to 255 characters. Notably, CONFIG.SYS directives do not support long filenames.
Dual Booting DOS and 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 to enable dual-boot functionality between Windows 9x and DOS. When booting into DOS, these files are temporarily restored to their original names, CONFIG.SYS and AUTOEXEC.BAT. Additionally, backup copies of the Windows 95 versions are saved as CONFIG.W40 and AUTOEXEC.W40.
In cases where Caldera DR-DOS 7.02 or 7.03 coexists with Windows 95, the Windows CONFIG.SYS and AUTOEXEC.BAT files retain their original names, whereas DR-DOS utilizes DCONFIG.SYS and AUTODOS7.BAT for its startup configurations.
OS/2 and Windows NT
OS/2 depends extensively on CONFIG.SYS for managing system settings, device drivers, and environment initialization prior to launching its graphical user interface.
Within the OS/2 subsystem of Windows NT, the file recognized as CONFIG.SYS by OS/2 applications is actually stored within the system registry.
OS/2 employs numerous CONFIG.SYS directives that are undocumented.
The use of CONFIG.SYS continues to be fundamental in OS/2 successors such as eComStation and ArcaOS.
See also
- IBMBIO.COM / IO.SYS
- IBMDOS.COM / MSDOS.SYS
- CONFIG (environment variable)
- AUTOEXEC.BAT
- COMMAND.COM
- List of DOS commands
External links
- Information on AUTOEXEC.BAT and CONFIG.SYS at Computer Hope
- Overview of Windows 98 / MS-DOS 7.10 CONFIG.SYS directives (archived)
- Caldera’s CONFIG.SYS Command Reference for DR-DOS 7 (archived)
- FreeDOS CONFIG.SYS directive descriptions
- PTS-DOS 2000 Pro User Manual with details on CONFIG.SYS directives
- Unofficial German PTS-DOS FAQ including CONFIG.SYS directives (archived)