SUBMENU (CONFIG.SYS directive)
| Company type | Configuration file |
|---|---|
| Industry | Computer software |
| Founded | 1983 |
| Products | Configuration instructions for DOS and OS/2 operating systems |
CONFIG.SYS serves as the chief configuration file for DOS and OS/2 operating systems. This plain text file, written in ASCII format, holds setup instructions that the operating system's DOS BIOS—commonly found in IBMBIO.COM or IO.SYS—interprets during the boot process. CONFIG.SYS made its debut with DOS version 2.0.
Usage
The directives within CONFIG.SYS are responsible for configuring DOS to manage hardware devices, software applications, and memory allocation. Once CONFIG.SYS has been processed, DOS initiates the command interpreter defined by the SHELL statement; if none is specified, it defaults to COMMAND.COM, which subsequently executes AUTOEXEC.BAT.
Typically, the file consists of name=value pairs that set adjustable parameters or load device drivers and terminate-and-stay-resident (TSR) programs into memory. In DOS environments, CONFIG.SYS is located in the root directory of the system's boot drive.
Certain DOS variants employ alternative filenames that override CONFIG.SYS:
- Advanced editions such as Concurrent DOS 386, Concurrent DOS XM, Multiuser DOS, System Manager, and REAL/32 utilize CCONFIG.SYS or CCONFIG.INI (in Multiuser DOS) and MCONFIG.SYS (in REAL/32). These support extended configuration options stored in a binary file named CCONFIG.BIN, which is typically edited through CONFIG.EXE.
- In DR DOS versions 3.31 onward—including PalmDOS 1.0 and Novell DOS 7—the file DCONFIG.SYS takes precedence over CONFIG.SYS to facilitate multi-boot configurations and disk compression setups. Additionally, OpenDOS 7.01 and DR-OpenDOS 7.02 recognize ODCONFIG.SYS or DRCONFIG.SYS.
- Beginning with DR DOS 6.0, the command SYS /DR:ext enables customization of system file extensions, allowing multiple configurations to coexist and be selected via boot loaders such as LOADER in Multiuser DOS and DR-DOS 7.x. The SHELL directive can specify alternative AUTOEXEC.BAT files using the /P[:filename.ext] option. Furthermore, the CHAIN=filespec command permits chaining to another configuration file located anywhere on the disk, with optional label targeting introduced in DR-DOS 7.02 and later versions.
- From DR-DOS 7.03 onward, the SYS /A command copies both CONFIG.SYS and AUTOEXEC.BAT alongside system files.
Other DOS-compatible systems provide similar functionality through different filenames: - FDCONFIG.SYS is used by FreeDOS, - RXCONFIG.SYS is employed by RxDOS version 7.24 and above, - CONFIG.PTS is utilized by PTS-DOS.
For Windows 95 and Windows 98 boot drives—which are based on DOS—CONFIG.SYS and AUTOEXEC.BAT files exist but are generally left blank. 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.
In contrast, under FlexOS, CONFIG.SYS is a binary configuration file that specifies resource managers and device drivers loaded during system initialization.
Example
Sample CONFIG.SYS content 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>
:;*?!
- Marks labels in CONFIG.SYS to serve as jump destinations for , , , , and commands.
- Functions like , suitable for inline comments following other directives. (Note: Inline comments enclosed in double quotes are not disregarded under MS-DOS/PC DOS.)
- Used to introduce inline comments in conjunction with the ; directive.
- Prompts a Yes/No confirmation before executing subsequent CONFIG.SYS commands. (FreeDOS supports optional conditional prompts via boot menus.)
- Executes the next CONFIG.SYS command without condition.
ATemplate:NbndC
- Determines whether programs can be interrupted upon encountering errors.
- Sets drives to record file access date stamps within FAT file systems.
- Enables conditional execution on AT-compatible hardware.
- Acts as a boot manager.
- Adjusts verbosity level of error messages.
- Alters the default internal serial device driver used for the AUX device.
- Prevents character devices from being accessible outside the virtual \DEV directory.
- Loads a fundamental device driver into memory.
- Produces a brief beep sound even if notification sounds are disabled.
- Indicates which operating system should be booted next.
- Enables or disables extended Ctrl+C interruption checks.
- Defines the number of disk buffers to allocate.
- Similar to BUFFERS but loads buffers into HMA or UMB areas.
- , CACHETTL, CACHEFLUSH (Embedded DOS 6-XL)
- Control cache block allocation and flushing intervals.
- Loads executable programs within CONFIG.SYS, running them in the foreground and halting further processing until completion.
- (DR-DOS 7.02+)
- Sets Caps Lock state during system boot.
- , CDDBUFFERS (PTS-DOS)
- Specifies CD-ROM driver name along with buffer sizes.
- (DR DOS 5.0+, Embedded DOS)
- Continues processing CONFIG.SYS from a specified file or label.
- , CLS (PTS-DOS, DR DOS)
- Defines clock type or clears the screen during startup.
- , COUNTRY (OS/2, DOS)
- Configures OEM code pages and internationalization settings.
- , COM2, COM3, COM4 (DR-DOS 7.02+)
- Sets serial port configurations and timeout parameters.
- , COMMENTS (DOS 4.0+, RxDOS)
- Redefines characters initiating inline comments or instructs to ignore specific lines.
Other directives manage hardware behavior, conditional execution based on CPU type (e.g., CPU386), buffer allocations, device drivers, and system parameters essential for optimizing DOS-based business environments.
DTemplate:NbndF
- Adjusts relocation settings for drive descriptor tables.
- Defines the memory segment limit for multi-sector disk data deblocking operations.
- Activates internal debugger support features.
- Functions as a boot manager.
- Loads a device driver into conventional memory.
- Loads a device driver into upper memory blocks (equivalent to in DRDOS 5.0).
- Configures country and codepage settings for keyboard, screen, and printer devices.
- Sets cache memory size parameters.
- Specifies compatibility mode for floppy disk drives.
- Selects the display font used by the system.
- Controls loading of DOS into high memory area and/or 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.
- Provides an alternate directory path to locate DOS system files.
- Defines search paths for data files used by applications.
- Specifies physical characteristics of disk drives connected to the system.
- Establishes parameters for unrecognized or unknown drives.
- Refer to for additional information.
- Enables creation of PDUMP.nnn error log files on a specified drive.
- Outputs a message on the screen during startup or processing.
- Displays messages that include ANSI escape sequences for formatting.
- Determines whether extra validation checks occur when launching programs.
- Sets an assumed error or return code for subsequent operations.
- Controls the state of the A20 gate when starting applications.
- Terminates CONFIG.SYS processing prematurely before reaching file end (except under certain conditions involving SWITCHES and SHELL directives).
- Configures hash table size to optimize file opening speed (differs from MS-DOS/PC DOS FASTOPEN driver).
- Specifies how many cached File Control Blocks can be opened simultaneously (FCBS and FILES share buffers under DR-DOS).
- Similar to FCBS but explicitly loads FCBs into upper memory areas.
- Acts as a boot manager utility.
- Defines maximum number of files that can be opened at once.
- Similar to FILES but loads file handles explicitly into upper memory blocks.
- Includes execution of designated CONFIG.SYS subsections (see IGNORE).
GTemplate:NbndI
- Waits for a keystroke (or timeout) and assigns the error level to the corresponding ASCII value (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 previous point.
- Refer to , , or for further details.
- Consult for additional information.
- See for related commands.
- Refer to or for more context.
- Consult or for supplementary data.
- See for relevant instructions.
- Loads a TSR application into memory following DOS data segment relocation; compare with INSTCDEX.
- Refer to , , or for further insight.
- See for additional guidance.
- Consult or for related usage.
- Activates console and command line history buffer featuring advanced pattern search capabilities.
- Defines the address of the HMA segment.
- Sets HLT mode for power saving.
- Enables scanning for boot sector viruses.
- Loads installable file system drivers.
- Prevents execution of specified CONFIG.SYS subsections.
- Allows programs to execute in ring 2, granting direct hardware I/O access.
- Incorporates directives from another menu section (simulated via GOSUB/RETURN in DR-DOS).
- Configures the keyboard Insert mode status.
- Loads TSR programs into memory.
- Installs TSR programs into upper memory area (similar to HIINSTALL in DR DOS 5.0).
- Loads TSR utilities after relocating DOS data segment.
- Rotates PIC interrupt priorities to assign highest precedence to a chosen IRQ number.
KTemplate:NbndM
- Specifies the keyboard layout configuration.
- Defines the relocated address of the keyboard buffer.
- Sets the maximum number of accessible drives.
- Similar to LASTDRIVE but additionally loads Current Directory Structure into upper memory.
- Specifies paths searched for DLL files.
- Manages compatibility settings for legacy software.
- Determines the number of file locks allowed.
- Configures boot logo display when using PTS-DOS boot manager.
- Defines count, sequence, I/O port, and timeout parameters for LPT1 device.
- Provides comparable configuration options for LPT2 device.
- Configures LPT3 device similarly to LPT1 and LPT2 settings.
- Enables and sets parameters for LPT4 device similarly.
- Sets delay time before increasing process priority.
- Configures memory allocation policies and strategies.
- Specifies default DOS memory allocation approach.
- Defines menu option entries.
- Sets menu color schemes (emulatable in DR-DOS).
- Assigns default menu block (emulatable in DR-DOS).
- Defines a menu block structure (emulatable in DR-DOS).
- Enables or disables multitrack disk operation support.
- Continues processing CONFIG.SYS from 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.
- Indicates whether keyboard [[Num Lock|Template:Keypress]] is enabled or disabled.
- Executes conditionally based on last error code, e.g., .
- Displays text and waits for user key press, similar to and commands in DR-DOS environments.
- Requires user acknowledgment of errors during CONFIG.SYS processing.
- Configures buffer size settings for LPT1 through LPT3 devices.
- Conditional execution on PC-compatible systems only.
- Adjusts scheduler priority levels.
- Sets priority specifically for disk I/O operations programs.
- Changes default printer device driver from LPT1 to LPT3 or LPT4 as specified.
- Determines whether DOS applications are permitted to run.
- Loads user interface components or modules.
- Executes conditionally on IBM PS/1-compatible hardware platforms.
- Executes conditionally on IBM PS/2-compatible hardware platforms.
- Suppresses output sent to STDOUT.
RTemplate:NbndT
- Activates automatic system reboot upon encountering errors.
- Permits inclusion of comments within CONFIG.SYS files.
- Allocates drive letters for local block device drivers.
- Defines the default character for Resume () prompts.
- Allows nested CONFIG.SYS processing to return to the previous GOSUB or SWITCH location, optionally with a return code.
- Specifies the size of real mode memory.
- Enables simultaneous loading of programs in CONFIG.SYS, functioning similarly to CALL or INSTALL commands in DOS variants.
- Determines whether the first character of a deleted file is stored in the FAT reserved area.
- Sets video display modes under FreeDOS or specifies screen access methods for PTS-DOS.
- Indicates the status of the keyboard Scroll Lock key.
- Establishes environment variables.
- Loads the command interpreter shell.
- Functions like SHELL but includes a size parameter to pre-allocate memory for COMMAND.COM, enhancing memory efficiency.
- Configures keyboard modifier states such as Shift Lock, Num Lock, Scroll Lock, and Insert mode.
- Defines file closure behavior triggered by Ctrl+Alt+Del key combination.
- Bypasses Power-On Self Test (POST) during system reboot.
- , STACKSIZE, STACKSHIGH
- Adjust hardware interrupt stack sizes and buffer locations across various DOS and Embedded DOS platforms to improve performance and memory management.
- , SYSBOOT, SYSGEN, SYSLOAD
- PTS-DOS commands managing boot configurations including system boot files, memory layouts, and alternative disk areas.
- , SUPPRESSPOPUPS, SWAPPATH
- OS/2-specific directives controlling user interface submenu displays, error log locations, and swap file directories to enhance system stability and usability.
- , SWITCHES
- Conditional execution commands used in DR DOS and Novell DOS allowing dynamic CONFIG.SYS processing based on user input or system conditions.
- , STRING
- Defines default switch characters for system commands and internal parameters ensuring compatibility across different DOS versions.
- , THREADS, TIMESLICE
- OS/2 commands managing hardware floating-point unit fixes, setting concurrent thread limits, and controlling scheduler time slices for improved multitasking efficiency.
- , TRACE, TRACEBUF
- Configure timeouts for CONFIG.SYS execution with options to enable or disable single-step debugging and set trace buffer sizes across DR-DOS, PTS-DOS, FreeDOS, and OS/2 environments.
- , TRAPDUMP
- Specifies temporary file extensions in PTS-DOS and detailed error logging options in OS/2 to facilitate system diagnostics and troubleshooting.
UTemplate:NbndZ
- Assigns a specific memory segment as an Upper Memory Block (UMB) for DOS usage.
- Selects the UMB server to be utilized.
- Defines address ranges designated as UMB RAM areas.
- Enables or disables verification of disk write operations.
- Sets the DOS version number reported to software applications.
- Manages VGA display settings.
- Specifies the active video mode similar to FreeDOS's SCREEN command.
- Activates virtual Direct Memory Access (DMA) functionality.
- Controls enabling of processor Virtual Mode Extensions (VME).
- Configures Virtual Device Drivers (VxD) for Windows environments.
- Sets parameters supporting Windows system operations.
- Relocates the Extended BIOS Data Area (XBDA) in memory.
- Executes commands conditionally on XT-compatible computer systems.
- Configures built-in support for Year 2000 compliance.
- Defines the default character used for Yes responses in prompts.
- Manages tracking of file deletions.
Issues
While the system can initiate startup without CONFIG.SYS or AUTOEXEC.BAT, these files are crucial for comprehensive DOS customization and meeting software demands. Any corruption or absence of these files necessitates diagnostic efforts.
If the CONFIG.SYS file does not include a SHELL command or is missing/corrupted, DOS attempts to locate COMMAND.COM in the root directory of the boot drive. Versions of MS-DOS/PC DOS prior to 6.0 will fail to boot if COMMAND.COM is not found. In contrast, MS-DOS 6.0 and later, PC DOS 6.1, and Novell DOS 7 and newer will prompt the user to specify the path to the command interpreter. This prompt also appears if the primary command shell terminates intentionally or unexpectedly, allowing a limited shell replacement during runtime without requiring a reboot.
Due to compatibility issues between MS-DOS 7+ COMMAND.COM and DR-DOS, DR-DOS versions 7.02 and above prevent skipping SHELL directives during skip, trace, or step modes to avoid boot failures. When bypassing CONFIG.SYS processing, users are asked to provide a valid shell filename before COMMAND.COM loads.
Under MS-DOS/PC DOS, CONFIG.SYS size is restricted to a few kilobytes (up to 64 KB in more recent editions), whereas DR-DOS imposes no such limit thanks to its line-by-line parsing approach. This allows meticulous management of driver and TSR loading sequences, resolving conflicts and enabling dynamic flow control based on system status or user interaction. The INSTALL directive further permits embedding non-resident software within CONFIG.SYS.
Earlier MS-DOS iterations limited the length of the SHELL command line to 31 characters; this was extended up to 128 characters in later versions. DR-DOS supports up to 255 characters for this directive. 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 as CONFIG.DOS and AUTOEXEC.DOS respectively, enabling dual boot functionality between Windows 9x and DOS. During a DOS boot, these files are temporarily reverted to their original names. Backups of the Windows 95 versions are preserved as CONFIG.W40 and AUTOEXEC.W40.
In setups where Caldera DR-DOS 7.02 or 7.03 coexists with Windows 95, the Windows CONFIG.SYS and AUTOEXEC.BAT remain intact. DR-DOS utilizes separate startup files named DCONFIG.SYS and AUTODOS7.BAT.
OS/2 / Windows NT
OS/2 depends extensively on CONFIG.SYS for driver configuration and environment setup prior to launching its graphical user interface.
Within the OS/2 subsystem of Windows NT, CONFIG.SYS appears accessible to OS/2 applications but is actually maintained within the system registry.
There exist several undocumented CONFIG.SYS directives specific to OS/2.
CONFIG.SYS continues to play a vital role in OS/2-based operating systems 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 CONFIG.SYS directives description (archived)
- PTS-DOS 2000 Pro User Manual with CONFIG.SYS commands (archived)
- German-language unofficial PTS-DOS FAQ (archived) – including additional CONFIG.SYS directives