COMMENT (CONFIG.SYS directive)
| Company type | Configuration file |
|---|---|
| Industry | Computer software |
| Founded | 1983 |
| Headquarters | N/A |
| Products | Configuration commands for DOS and OS/2 |
CONFIG.SYS serves as the chief configuration file for DOS and OS/2 operating systems. This plain text file, written in ASCII, contains configuration commands that the operating system's DOS BIOS—usually found in IBMBIO.COM or IO.SYS—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 to manage devices, applications, and memory allocation. Once CONFIG.SYS has been processed, DOS launches the command interpreter indicated on the SHELL line; if none is specified, it defaults to COMMAND.COM, which subsequently executes AUTOEXEC.BAT.
CONFIG.SYS primarily consists of name=value statements that configure parameters or load components such as device drivers and terminate-and-stay-resident programs (TSRs). In DOS environments, this file is located in the root directory of the boot drive.
The same filename is also utilized by (DCP), an MS-DOS variant developed by East-German manufacturer VEB Robotron.
Certain DOS versions prioritize alternative configuration filenames over CONFIG.SYS:
- Advanced editions of Concurrent DOS 386, Concurrent DOS XM, Multiuser DOS, and REAL/32 prefer CCONFIG.SYS or CCONFIG.INI. In some cases, REAL/32 uses MCONFIG.SYS. These platforms support supplementary settings saved in binary files such as CCONFIG.BIN, typically edited through CONFIG.EXE.
- Within DR DOS 3.31 and later versions—including PalmDOS, Novell DOS, and OpenDOS—the file DCONFIG.SYS overrides CONFIG.SYS. This arrangement aids disk compression and multi-boot setups. OpenDOS additionally recognizes ODCONFIG.SYS, while certain DR-DOS releases employ DRCONFIG.SYS. The command SYS /DR:ext allows users to specify custom default extensions for system files, facilitating multiple concurrent configurations within a single root directory managed by boot loaders like LOADER.
- Starting with DR-DOS 6.0, enhanced SHELL directives permit specifying alternative AUTOEXEC.BAT files and support other file extensions; these capabilities are also available in 4DOS. The CHAIN=filespec directive enables continuation of processing from another configuration file, optionally targeting specific labels.
- DR-DOS 7.03 and newer introduce SYS /A, a command to copy CONFIG.SYS and AUTOEXEC.BAT alongside system files.
Other DOS derivatives also provide similar alternatives: FDCONFIG.SYS in FreeDOS, RXCONFIG.SYS in RxDOS, and CONFIG.PTS in PTS-DOS.
In Windows 95 and 98—which are based on DOS—CONFIG.SYS and AUTOEXEC.BAT remain present but are frequently left empty. Windows Me does not process CONFIG.SYS; instead, it loads environment variables directly from the Windows Registry.
For FlexOS, CONFIG.SYS is a binary file that specifies resource managers and device drivers.
Example
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>
:;*?!
- Serves as a label marker within CONFIG.SYS for use as jump destinations with , , , , and commands.
- Functions similarly to , but is also employed for inline comments following other directives in CONFIG.SYS. (Note that under MS-DOS/PC DOS, inline comments enclosed in double quotes are not ignored.)
- Used at the beginning of inline comments alongside the ; symbol.
- Prompts a Yes/No confirmation before executing subsequent CONFIG.SYS commands. (FreeDOS supports conditional boot menus but lacks optional message prompts.) Starting with DOS 6.0, a comparable feature exists by appending after a directive (for example, ).
- Executes the following CONFIG.SYS directive without conditions.
ATemplate:NbndC
- Determines whether programs can be terminated upon encountering errors.
- Sets which drives record file access timestamps within FAT file systems.
- Enables conditional command execution on AT-compatible computers.
- Manages boot operations.
- Adjusts the level of detail in error messages.
- Changes the default serial driver assigned to the AUX device.
- Prevents character devices from operating outside the phantom \DEV directory.
- Loads the fundamental device driver into system memory.
- Produces a brief beep even if sound notifications are disabled.
- Defines the operating system to boot next.
- Activates or deactivates enhanced Ctrl+C detection.
- Specifies the quantity of disk buffers to allocate.
- Similar to BUFFERS but allocates buffers in HMA or UMB memory regions.
- Maximum number of cache blocks reserved from the system pool.
- Maximum duration before unused cache blocks are returned to the system pool.
- Maximum interval before dirty cache blocks are written back to disk.
- Loads programs listed in CONFIG.SYS, pausing further processing until completion.
- Sets the Caps Lock key status on the keyboard.
- Defines the name of the CD-ROM hardware driver.
- Determines the number of buffers allocated for CD-ROM operations.
- Continues processing CONFIG.SYS using a different file or label.
- Specifies the type of system clock used.
- Clears the display screen.
- Defines OEM codepage(s) used by the system.
- Specifies the CMOS RAM address location.
- Sets color schemes for boot menus.
- , ;, ;, ;
- Configures count, sequence, I/O addresses, and timeout values for COM ports (available in DR-DOS 7.02 and later).
- Defines DMA buffer memory area.
- Reassigns lead-in characters for inline comments or causes subsequent lines to be ignored (behavior varies by OS).
- Enables and configures internationalization support (varies depending on OS).
- Positions display cursor for configuration menus (introduced in DR DOS 6.0 and newer).
- Executes commands conditionally based on CPU type (applicable in PTS-DOS and DR-DOS).
DTemplate:NbndF
- Configures relocation settings for drive descriptor tables.
- Specifies segment address in memory for multi-sector disk data deblocking operations.
- Activates internal debugger features.
- Manages boot operations.
- Loads device drivers into conventional memory space.
- Loads device drivers into upper memory blocks (equivalent to in DRDOS 5.0).
- Sets country and codepage information for keyboard, screen, and printer devices.
- Adjusts cache memory size parameters.
- Defines compatibility mode settings for floppy disk drives.
- Specifies font used for display output.
- Controls loading of DOS into high memory and utilization of upper memory areas.
- Loads DOS tables such as BUFFERS, FCBS, FILES, LASTDRIVE, and STACKS into upper memory regions.
- Specifies an alternative directory path for DOS system files.
- Defines search paths for data files used by DOS utilities.
- Provides parameters for physical disk drives configuration.
- Sets parameters for drives that are not recognized by default configurations.
- See .
- Enables creation of PDUMP.nnn error logs and assigns drive location for them.
- Displays a message on the screen during startup or processing.
- Displays messages including ANSI escape codes for formatting and control sequences.
- Adds extra verification checks when launching programs.
- Defines expected error or return codes from executed programs.
- Controls A20 line state when starting applications to manage memory addressing modes.
- Terminates CONFIG.SYS processing prematurely except under certain conditions affecting SWITCHES and SHELL directives.
- Sets size of hash table used to accelerate file open operations, differing from MS-DOS/PC DOS FASTOPEN driver behavior.
- Number of cached File Control Blocks that can remain open concurrently (shares buffer space with FILES parameter under DR-DOS).
- Forces loading of FCBs into upper memory explicitly rather than default locations.
- Boot manager functionality to control boot sequence or options.
- Specifies maximum number of files that may be opened simultaneously by the system or applications.
- Allocates file handles explicitly into upper memory areas instead of conventional memory space.
- Allows execution of particular CONFIG.SYS subsections as specified (refer to IGNORE directive).
GTemplate:NbndI
- Waits for a key press or timeout, returning an error level corresponding to the ASCII code or 1024 if timed out.
- Resumes processing of CONFIG.SYS at the specified label.
- Continues nested CONFIG.SYS processing at the given label, then returns to the previous point.
- Refer to , , or for additional details.
- See also .
- Consult .
- Refer to or for more information.
- See or for related functionality.
- Consult .
- Loads a TSR program into memory following relocation of the DOS data segment. Compare with INSTCDEX.
- Refer to , , or for further details.
- See .
- Consult or for related commands.
- Activates console and command line history buffers with advanced pattern searching capabilities.
- Defines the address of the HMA segment.
- Configures power-saving behavior via HLT instruction.
- Specifies whether to perform a boot sector virus check during startup.
- Loads installable file system drivers.
- Prevents execution of certain CONFIG.SYS subsections.
- Lists programs authorized to operate at ring 2 with direct hardware I/O privileges.
- Incorporates directives from another menu block, emulated by GOSUB/RETURN in DR-DOS environments.
- Sets the status of the keyboard Insert mode.
- Loads a TSR program into memory.
- Installs a TSR program into upper memory area (equivalent to HIINSTALL in DR DOS 5.0).
- Loads a TSR program after relocating the DOS data segment. Compare with INSTCDEX.
- Adjusts PIC interrupt priorities by rotating them so that a specified number receives highest priority.
KTemplate:NbndM
- Defines the keyboard layout in use.
- Specifies the location of the relocated keyboard buffer in memory.
- Sets the maximum count of accessible drives.
- Functions like LASTDRIVE but also loads Current Directory Structure (CDS) into upper memory.
- Lists directories searched for dynamic link libraries (DLLs).
- Manages loading of legacy applications.
- Determines the number of file locks allowed.
- Enables boot logo support, allowing startup messages when using the PTS-DOS boot manager.
- Configures count, sequence, I/O port address, and timeout parameters for LPT1 device.[1]
- Applies identical settings as LPT1 for LPT2 device.[1]
- Sets similar configurations for LPT3 device.[1]
- Enables and configures LPT4 parallel port device.
- Defines timeout duration before a waiting process is elevated in priority.
- Determines strategy for memory allocation management.
- Sets default DOS memory allocation policy.
- Defines menu option entries.
- Specifies color schemes for menus (can be simulated using under DR-DOS).
- Sets default menu block (can be emulated with and commands in DR-DOS).
- Defines a menu block construct (emulatable via and in DR-DOS).
- Enables operations involving multitrack disks.
- Continues CONFIG.SYS processing within a new file, optionally after loading a driver and setting the %NEWFILE% environment variable.[2]
NTemplate:NbndQ
- Defines the default 'No' () response character used in Yes/No/Resume prompts.
- Sets whether the keyboard's [[Num Lock|Template:Keypress]] state is enabled or disabled at startup.
- Allows conditional execution based on the previous error code, such as .
- Displays text and waits for user key input, similar to and commands under DR-DOS.
- Requires user confirmation when errors occur during CONFIG.SYS processing.
- Configures buffer sizes for LPT1 through LPT3 devices.
- Enables conditional execution on PC-compatible hardware platforms.
- Sets parameters for priority scheduling of processes.
- Assigns priority levels specifically for disk I/O operations.
- ; Changes default printer driver assignment among LPT1, LPT2, LPT3, or LPT4 devices.
- ; Specifies whether DOS applications are permitted to execute.
- ; Loads a user interface shell environment.
- ; Enables conditional execution on IBM PS/1-compatible systems.
- ; Enables conditional execution on IBM PS/2-compatible systems.
- ; Suppresses output display sent to STDOUT.
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 Resume () character used in prompts.
- Enables returning from nested CONFIG.SYS processing to the prior GOSUB or SWITCH point, optionally providing a return code.
- Defines the size of real mode memory available.
- Allows simultaneous loading of programs in CONFIG.SYS, running them in the background similarly to CALL or INSTALL commands under DOS/OS2.
- Determines whether the first character of deleted files is saved in the FAT reserved area.
- Sets video display mode under FreeDOS; under PTS-DOS, it specifies methods for screen access.
- Controls the Scroll Lock key status (on/off).
- Establishes environment variables.
- Loads the command interpreter shell.
- Functions like SHELL but includes a SIZE parameter to pre-allocate COMMAND.COM into HMA or UMBs, enhancing memory efficiency with third-party shells.
- Specifies keyboard modifier states such as Shift Lock, Num Lock, Scroll Lock, and Insert mode.
- Defines file closure behavior when Ctrl+Alt+Del is pressed.
- Determines whether POST is bypassed during reboot.
- Sets the number of stacks for hardware interrupts.
- Specifies default stack size for newly created threads.
- Similar to STACKS but loads buffers into upper memory areas.
- Configures boot manager settings.
- Manages XMS A20 gate operations.
- Defines submenu blocks (with emulation under DR-DOS).
- Redirects error logging to a drive instead of displaying popup messages.
- Sets the path for swap files.
- Allows conditional continuation of nested CONFIG.SYS processing at specified labels based on key input, with RETURN returning control to the previous location.
- Defines the default command switch character (either '/' or '-').
- Specifies special option flags.
- Enables correction for FPU rounding errors.
- Specifies an alternative DOS OS filename to boot from.
- Configures memory placement for DOS components.
- Loads system files from an alternative disk location.
- Determines the size of dynamically allocated system memory pools.
- Indicates whether DOS data and code are loaded into UMBs (Upper Memory Blocks).
- Sets the maximum number of concurrent threads allowed by the scheduler.
- Configures timeouts for CONFIG.SYS single-stepping and default responses to Yes/No queries (PTS-DOS supports timeout settings).
- Adjusts scheduler time slice minimum and maximum values.
- Defines temporary file extensions used by the system.
- Enables or disables single-step execution of CONFIG.SYS and AUTOEXEC.BAT globally or locally (functionality varies under OS/2).
- Specifies the size of the TRACE log buffer.
- Records detailed error information upon traps or faults.
UTemplate:NbndZ
- Configures DOS to utilize a designated segment as UMB memory space.
- Specifies which UMB server is employed by the system.
- Defines address ranges allocated as UMB RAM segments.
- Enables or disables verification of disk writes.
- Sets the DOS version number reported to applications.
- Controls VGA display status indicators.
- Specifies current video mode, analogous to FreeDOS's SCREEN command.
- Determines whether virtual DMA usage is permitted.
- Controls deactivation of processor Virtual Mode Extensions features.
- Configures VxD driver settings for Windows environments.
- Establishes system support parameters for Windows operation.
- Manages relocation settings for Extended BIOS Data Area (XBDA).
- Enables conditional execution specifically on XT-compatible machines.
- Configures integrated Year 2000 compliance support features.
- Sets default affirmative response character in prompt dialogs.
- Manages tracking behavior for file deletions.
Issues
Although the system can initiate without CONFIG.SYS or AUTOEXEC.BAT, these files remain crucial for comprehensive DOS customization and fulfilling application demands. Any corruption or damage to these files necessitates diagnostic efforts.
In the absence of a SHELL directive within CONFIG.SYS—or if the file is missing or compromised—DOS attempts to locate COMMAND.COM in the root directory of the boot drive. Older DOS versions will fail to boot without this file, whereas MS-DOS 6.0, PC DOS 6.1, and Novell DOS 7 and later versions will prompt the user to enter a path for the command processor if it cannot be found. This prompt also appears if the primary command interpreter terminates unexpectedly or is exited intentionally, offering a limited shell replacement during runtime without requiring a reboot.
Because MS-DOS 7.x’s COMMAND.COM is incompatible with DR-DOS, dual-boot configurations impose restrictions on bypassing SHELL directives when using skip, trace, or step modes in DR-DOS 7.02 and later. Recovery methods include requesting the user to specify a valid shell before loading COMMAND.COM from the root directory.
Under MS-DOS and PC DOS, CONFIG.SYS is constrained in size to a few kilobytes (with modern versions allowing up to 64 KB), while DR-DOS imposes no fixed limit aside from the constraints of the underlying file system. MS-DOS processes CONFIG.SYS by compiling it into a tokenized and sorted format that loads device drivers prior to TSR programs. In contrast, DR-DOS interprets CONFIG.SYS directives sequentially, enabling precise control over loading order and conditional execution based on hardware detection or error conditions. This approach also supports temporary integration of external utilities via the INSTALL command.
From MS-DOS/PC DOS versions 2.0 through 4.01, the SHELL command line was restricted to 31 characters; subsequent releases expanded this limit to 128 characters, while DR-DOS accepts up to 255 characters. It is important to note that CONFIG.SYS directives do not accommodate long filenames.
Dual booting DOS and Windows 9x
When Windows 95 is installed over an existing DOS or Windows environment, it renames CONFIG.SYS and AUTOEXEC.BAT to CONFIG.DOS and AUTOEXEC.DOS respectively, facilitating dual-boot functionality between Windows 9x and DOS. During boot into DOS mode, these renamed files are temporarily restored. Additionally, backups of the original Windows 95 configuration files are saved as CONFIG.W40 and AUTOEXEC.W40.
In setups where Caldera DR-DOS 7.02 or 7.03 coexists with Windows 95, Windows’ CONFIG.SYS and AUTOEXEC.BAT remain untouched. Instead, DR-DOS relies on DCONFIG.SYS and AUTODOS7.BAT for its startup configuration.
OS/2 / Windows NT
OS/2 depends extensively on CONFIG.SYS for configuring system parameters, loading device drivers, and establishing environment variables prior to launching its graphical user interface.
Within the OS/2 subsystem embedded in Windows NT, CONFIG.SYS settings are maintained within the system registry rather than as standalone configuration files.
Numerous CONFIG.SYS commands utilized by OS/2 have not been officially documented.
CONFIG.SYS continues to be employed by OS/2 derivatives 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
- 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 documentation on CONFIG.SYS commands
- User manual for PTS-DOS 2000 Pro including CONFIG.SYS directives summary
- Unofficial German PTS-DOS FAQ (PTS/FAQD) featuring additional CONFIG.SYS directives