COMMENTS (CONFIG.SYS directive)
| Company type | Configuration file |
|---|---|
| Industry | Operating systems software |
| Founded | 1983 |
| Headquarters | N/A |
| Products | Configuration commands for DOS and OS/2 boot sequence |
CONFIG.SYS serves as the main configuration file for the DOS and OS/2 operating system families. This plain text file contains configuration commands that are interpreted by the operating system’s DOS BIOS—usually located in IBMBIO.COM or IO.SYS—during the system’s 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 management. Once CONFIG.SYS has been processed, DOS launches the command interpreter specified by the SHELL directive; if none is provided, it defaults to COMMAND.COM. This shell then executes the commands found in the AUTOEXEC.BAT file.
Typically, the file consists of name=value pairs that define adjustable parameters or load essential components such as device drivers and terminate-and-stay-resident programs (TSRs) into memory.
Within DOS systems, CONFIG.SYS is located in the root directory of the drive from which the system boots.
The same filename is also utilized by (DCP), an MS-DOS clone developed by former East-German company VEB Robotron.
Certain DOS variants prioritize alternative filenames over CONFIG.SYS:
- Advanced editions of Concurrent DOS 386, Concurrent DOS XM, Multiuser DOS, System Manager, and REAL/32 replace CONFIG.SYS with CCONFIG.SYS. Some Multiuser DOS releases employ CCONFIG.INI, while REAL/32 searches for MCONFIG.SYS. These platforms support extended configuration through binary files like CCONFIG.BIN, which can be edited using CONFIG.EXE.
- Starting from DR DOS 3.31 and including versions such as PalmDOS 1.0, Novell DOS 7, and DR-DOS 7.02+, DCONFIG.SYS takes precedence over CONFIG.SYS. This arrangement facilitates multi-boot environments and disk compression setups where drive letters may shift after compression drivers are loaded.
- OpenDOS versions 7.01 and DR-OpenDOS 7.02 additionally check for ODCONFIG.SYS or DRCONFIG.SYS files.
- From DR DOS 6.0 onward, users can modify default system file extensions via SYS /DR:ext, allowing multiple sets of system files to coexist within a single root directory. Boot loaders such as LOADER, provided with Multiuser DOS and DR-DOS 7.x, enable selection among these sets during startup.
- The SHELL command in DR-DOS permits specifying alternative AUTOEXEC.BAT filenames and supports extensions beyond .BAT; these capabilities are also present in 4DOS.
- The CHAIN=filespec instruction allows DR-DOS to continue reading configuration commands from another file, which may be located outside the boot drive’s root directory. Later versions include functionality to jump directly to labeled sections within chained files.
- Beginning with DR-DOS 7.03, the SYS /A option enables copying of CONFIG.SYS and AUTOEXEC.BAT alongside other system files during setup.
Comparable configuration files exist in other operating systems:
- FDCONFIG.SYS is used by FreeDOS
- RXCONFIG.SYS appears in RxDOS 7.24 and later
- CONFIG.PTS is employed by PTS-DOS
In Windows editions built on top of DOS, such as Windows 95 and Windows 98, CONFIG.SYS and AUTOEXEC.BAT remain present but are generally left empty. In contrast, Windows Me does not process CONFIG.SYS during startup; instead, it retrieves environment settings directly from the Windows Registry.
Under the FlexOS operating system, CONFIG.SYS exists as a binary configuration file that specifies resource managers and device drivers loaded during boot time.
Example
A sample CONFIG.SYS file for MS-DOS 5 might look like this: <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>
:;*?!
- Acts as a label within CONFIG.SYS, serving as a jump target for directives such as , , , , and .
- Functions similarly to , also used to add inline comments following other CONFIG.SYS commands. (In MS-DOS/PC DOS, inline comments inside double quotes are not ignored.)
- Introduces inline comments alongside the ; directive.
- Prompts the user with a Yes/No confirmation before executing subsequent CONFIG.SYS commands.[1] (FreeDOS does not support custom messages but allows conditional execution with boot menus using and .) From DOS 6.0 onward, a comparable feature is available by appending after directives (e.g., ).
- Forces unconditional execution of the next CONFIG.SYS command.
ATemplate:NbndC
- Determines whether programs can be aborted upon encountering errors.
- Defines which drives record file access date stamps on FAT file systems.
- Enables conditional execution on AT-compatible hardware.
- Boot manager utility.
- Adjusts verbosity of error messages.
- Changes 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 base device driver into memory.
- Produces a beep sound even if notification sounds are disabled via switches.
- Specifies the next operating system to boot.
- Enables or disables extended Ctrl+C checking.
- Sets the number of disk buffers to allocate.
- Similar to BUFFERS but loads buffers into High Memory Area (HMA) or Upper Memory Blocks (UMB).
- , CACHETTL, CACHEFLUSH (Embedded DOS 6-XL only)
- Manage cache block allocation and flushing behavior.
- Executes programs within CONFIG.SYS, pausing processing until they return.
- (DR-DOS 7.02+)
- Controls keyboard Caps Lock state.
- , CDDBUFFERS (PTS-DOS only)
- Configures CD-ROM driver parameters and buffer settings.
- (DR DOS 5.0+, Embedded DOS)
- Continues processing CONFIG.SYS from a new file or label.
- , CLS, CODEPAGE (PTS-DOS or OS/2)
- Set clock type, clear screen, or define OEM codepages.
- , COLOR, COMx (DR-DOS 7.02+)
- Configure CMOS RAM address, boot menu color schemes, and COM port parameters.
- , COMMENT(S), COUNTRY (various DOS versions)
- Specify DMA buffer sizes, inline comment handling, and internationalization support.
- , CPSW (MS-DOS versions), CPU series (PTS-DOS only)
- Manage cursor positioning, codepage switching capabilities, and CPU-specific conditional directives.
This concise directive overview emphasizes essential CONFIG.SYS commands vital for system setup and performance tuning across different DOS platforms, highlighting their relevance in environments requiring customized boot configurations and device control.
DTemplate:NbndF
- Adjusts relocation settings for drive descriptor tables.
- Defines memory segment address used for multi-sector disk data deblocking operations.
- Activates internal debugger functionality.
- Boot manager utility.
- Loads device drivers into conventional memory.
- Loads device drivers into upper memory areas (equivalent to in DRDOS 5.0).
- Sets country and codepage information for keyboard, screen, and printer devices.
- Configures sizes for cache memory segments.
- Specifies floppy disk compatibility mode settings.
- Determines display font selection.
- Controls whether DOS loads into high memory and/or upper memory areas (similar to in DRDOS 5.0).
- Loads DOS tables such as BUFFERS, FCBS, FILES into upper memory regions.
- Defines an alternate directory path for DOS system files.
- Sets search paths for data files.
- Specifies physical parameters of disk drives.
- Defines configuration for unknown or unsupported drives.
- See .
- Enables error logging with
PDUMP.nnnfiles on specified drives. - Outputs a message to the display screen.
- Displays messages including ANSI escape codes.
- Adds extra validation checks when launching programs.
- Defines expected error or return codes for processes.
- Controls A20 gate status during program startup.
- Terminates CONFIG.SYS processing prematurely (except for certain SWITCHES and SHELL commands).
- Sets size of hash tables used for accelerating file open operations, differing from MS-DOS/PC DOS FASTOPEN driver behavior.
- Specifies number of cached File Control Blocks allowed concurrently (shares buffer with FILES in DR-DOS).
- Similar to FCBS but forces loading into upper memory explicitly.
- Boot manager utility.
- Number of files that can be opened simultaneously by the system.
- Like FILES but loads file handles explicitly into upper memory areas.
- Includes execution of designated CONFIG.SYS subsections (refer to IGNORE).
GTemplate:NbndI
- Waits for a key press or timeout, then assigns 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 processing at a specified label and returns to the previous point afterward.
- Refer to , , or for additional information.
- Consult for further details.
- See for related commands.
- Refer to or for more context.
- See or for relevant usage.
- Consult for further explanation.
- Loads a TSR program into memory similar to , but does so after relocating the DOS data segment. Compare with INSTCDEX.
- Refer to , , or for related functions.
- See for additional notes.
- Consult sources for detailed usage.
- Activates console and command line history buffer with enhanced pattern search capabilities.
- Defines the segment address of the High Memory Area (HMA).
- Configures energy-saving settings related to the HLT instruction.
- Specifies whether to perform system checks for boot sector viruses during startup.
- Loads installable file system drivers.
- Prevents execution of certain subsections within CONFIG.SYS. See for details.
- Grants specific programs permission to run at CPU ring 2, allowing direct hardware I/O access.
- Includes directives from another menu section, which can be emulated using GOSUB/RETURN in DR-DOS.
- Sets the status of the keyboard Insert mode.
- Loads a TSR program into memory.
- Installs a TSR program into upper memory, equivalent to HIINSTALL in DR DOS 5.0.
- Installs a TSR after relocating the DOS data segment. Compare with INSTCDEX.
- Adjusts PIC controller interrupt priorities to assign highest priority to a specified IRQ.
KTemplate:NbndM
- Defines the keyboard layout configuration.
- Specifies the memory address of the relocated keyboard buffer.
- Sets the maximum number of drives accessible by DOS.
- Similar to LASTDRIVE but loads the Current Directory Structure (CDS) into upper memory areas.
- Lists directories searched when loading DLLs.
- Manages compatibility settings for legacy applications.
- Determines the number of file locks allowed simultaneously.
- Configures display options for boot logos when using PTS-DOS boot manager.
- Defines count, logical sequence, I/O port address, and timeout parameters for the LPT1 parallel port device.
- Identical configuration as LPT1 but applied to LPT2 device.
- Same as LPT1 configuration but targeting LPT3 device.
- Enables and configures settings for LPT4 parallel port device.
- Sets delay time before increasing process priority in scheduling.
- Configures strategy used by DOS for memory allocation management.
- Specifies default memory allocation method used by DOS systems.
- Defines options available within a menu interface.
- Sets color schemes for menus, which can be emulated through ECHO commands under DR-DOS environments.
- Specifies default menu block, emulatable via TIMEOUT and SWITCH commands under DR-DOS systems.
- Defines a menu block that can be mimicked using ECHO and SWITCH commands in DR-DOS implementations.
- Enables support for multitrack disk operations during disk access processes.
- Continues processing CONFIG.SYS from an external file after loading a device driver and sets %NEWFILE% environment variable accordingly.
NTemplate:NbndQ
- Defines the default character representing No () in Yes/No/Resume prompt dialogs.
- Sets the state of the keyboard’s Num Lock key upon startup (on or off).
- Enables conditional command execution based on error status codes, such as .
- Displays text and waits for a key press, functioning similarly to and commands in DR-DOS systems.
- Requires user confirmation upon encountering errors during CONFIG.SYS processing.
- Configures buffer sizes allocated to LPT port devices.
- Allows conditional command execution based on detection of PC-compatible hardware platforms.
- Sets priority levels within task scheduling routines.
- Adjusts disk input/output priority settings for running programs.
- Changes default printer device driver assignment among LPT1 through LPT4 ports.
- Controls whether DOS applications are permitted to execute under current settings.
- Loads a user interface shell environment during startup sequences.
- Enables conditional execution tailored to IBM PS/1-compatible systems only.
- Enables conditional command execution specific to IBM PS/2-compatible machines exclusively.
- Suppresses output directed to standard output (STDOUT) streams.
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.
- Sets the default character used for Resume () prompts.
- Returns control from nested CONFIG.SYS processing back to the previous GOSUB or SWITCH statement, optionally with a return code.
- Defines the size of real mode memory available.
- Allows simultaneous loading of programs in CONFIG.SYS in the background, functioning similarly to CALL or INSTALL commands under DOS.
- Saves the initial character of deleted files in the reserved FAT area.
- Determines video mode under FreeDOS or screen access protocols in PTS-DOS.
- Controls the Scroll Lock key state on the keyboard, enabling it on or off.
- Establishes environment variables within the system.
- Loads the command interpreter shell.
- Similar to SHELL but includes a SIZE parameter to pre-allocate COMMAND.COM in HMA or UMBs, minimizing fragmentation when using third-party shells.
- Configures keyboard modifier keys such as Shift Lock, Num Lock, Scroll Lock, and Insert mode.
- Specifies whether files should close when Ctrl+Alt+Del is pressed.
- Skips the Power-On Self-Test (POST) during system reboots.
- , STACKSIZE, STACKSHIGH
- Set hardware interrupt stack sizes and buffer locations across multiple DOS versions.
- , SYSBOOT, SYSGEN, SYSLOAD
- Control boot management and system loading primarily in PTS-DOS environments.
- (DOS 6.0+) Defines submenu structures within CONFIG.SYS (unsupported by DR-DOS and FreeDOS).
- , SWAPPATH
- OS/2-specific settings for error logging and swap file directory paths.
- , SWITCHES
- Directives for conditional processing within CONFIG.SYS based on keypresses, specific to DR DOS.
- Sets the default switch character ('/' or '-') across various DOS platforms.
- , THREADS, TIMESLICE
- OS/2 settings related to hardware fixes, threading capabilities, and scheduler time slices.
- , TRACE, TRACEBUF
- Manage timeouts and enable single-step debugging of CONFIG.SYS and AUTOEXEC.BAT scripts, with variations depending on the operating system.
- , TRAPDUMP
- Handles temporary file extensions in PTS-DOS and error logging in OS/2.
UTemplate:NbndZ
- Assigns a particular segment for use as an Upper Memory Block (UMB) in DOS.
- Configures the server responsible for managing UMBs.
- Defines address ranges allocated for UMB memory areas.
- Enables or disables verification of disk writes.
- Sets the DOS version number reported to applications.
- Controls VGA display status settings.
- Specifies the active video mode, comparable to FreeDOS's SCREEN command functionality.
- Enables virtual DMA (Direct Memory Access) support.
- Manages processor Virtual Mode Extensions (VME) settings.
- Configures Virtual Device Drivers (VxDs) for Windows environments.
- Adjusts Windows system support parameters.
- Oversees relocation of the Extended BIOS Data Area (EBDA).
- Executes conditionally on XT-compatible machines only.
- Configures built-in support for Year 2000 compliance features.
- Defines default response character for Yes/No prompts.
- Tracks file deletion operations.
Issues
While it is possible for a system to start without CONFIG.SYS or AUTOEXEC.BAT files, these configurations remain crucial for tailoring the operating system and loading necessary software components. When these files become corrupted or damaged, troubleshooting is required.
If a SHELL directive is missing from CONFIG.SYS or if the file itself is absent or damaged, DOS attempts to locate COMMAND.COM in the root directory of the boot drive. Versions prior to 6.0 will fail if COMMAND.COM is not found there. However, MS-DOS 6.0/PC DOS 6.1, Novell DOS 7, and subsequent versions prompt users to specify a path to a command processor. This prompt also appears if the command interpreter terminates unexpectedly or exits intentionally, offering limited shell functionality without a reboot.
Due to incompatibilities between MS-DOS versions 7.0 and later COMMAND.COM and DR-DOS systems, DR-DOS version 7.02 and above restrict bypassing SHELL directives during skip, trace, or step modes. Users must specify a valid shell before COMMAND.COM can be launched from the root directory.
CONFIG.SYS file size limits differ depending on the DOS variant—MS-DOS and PC DOS typically restrict file size from several kilobytes up to a maximum of 64 KB in later releases. Conversely, DR-DOS imposes no practical size limit because it interprets CONFIG.SYS line-by-line. This approach grants DR-DOS enhanced flexibility over driver and TSR load sequencing via DEVICE and INSTALL commands, aiding conflict resolution and debugging processes.
In MS-DOS/PC DOS versions from 2.0 through 4.01, SHELL directives are limited to lines no longer than 31 characters. Later releases extend this limit up to 128 characters, while DR-DOS supports lines as long as 255 characters. It is important to note that none of these CONFIG.SYS directives accommodate long filename usage.
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, to enable dual boot functionality between Windows 9x and DOS. During a DOS startup, these files are temporarily reverted to their original filenames. Meanwhile, backups of the Windows 95 versions are stored under the names CONFIG.W40 and AUTOEXEC.W40.
In setups where Caldera DR-DOS 7.02 or 7.03 coexists with Windows 95, the original CONFIG.SYS and AUTOEXEC.BAT files used by Windows remain intact. Instead, DR-DOS relies on alternative startup scripts named DCONFIG.SYS and AUTODOS7.BAT.
OS/2 and Windows NT
OS/2 makes extensive use of the CONFIG.SYS file to manage system settings, load device drivers, and configure the environment prior to launching its graphical user interface.
Within the OS/2 subsystem on Windows NT, the CONFIG.SYS file as perceived by OS/2 applications is actually maintained within the Windows registry rather than as a traditional file.
OS/2 employs numerous CONFIG.SYS commands that are not publicly documented.
The CONFIG.SYS configuration file continues to be utilized by OS/2 successors like 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
- 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 explanations
- PTS-DOS 2000 Pro User Manual covering CONFIG.SYS directives (partial)
- Unofficial German PTS-DOS FAQ (2004) featuring additional CONFIG.SYS commands
- ↑ Cite error: Invalid
<ref>tag; no text was provided for refs namedPaul_2000_CONFIG