RESUMECHAR (CONFIG.SYS directive)
| Company type | Configuration file |
|---|---|
| Industry | Computer software |
| Founded | 1983 |
| Products | Configuration for DOS and OS/2 startup |
CONFIG.SYS serves as the main configuration file for DOS and OS/2 operating systems. This plain text file contains setup instructions that the operating system's DOS BIOS—typically found in IBMBIO.COM or IO.SYS—processes during startup. CONFIG.SYS was first introduced with DOS version 2.0.
Usage
The directives within CONFIG.SYS are used to configure DOS settings related to hardware devices, software applications, and memory allocation. Once CONFIG.SYS has been executed, DOS launches the command interpreter defined by the SHELL directive; if none is specified, it defaults to COMMAND.COM, which then executes commands from AUTOEXEC.BAT.
This file primarily consists of name=value pairs that specify adjustable parameters or load components such as device drivers and terminate-and-stay-resident programs (TSRs). In DOS environments, CONFIG.SYS is located in the root directory of the bootable drive.
Certain DOS variants check for alternative configuration filenames that override CONFIG.SYS:
Early versions of Concurrent DOS did not support CONFIG.SYS; however, later releases including Concurrent DOS 386, Concurrent DOS XM, Multiuser DOS, and REAL/32 search for CCONFIG.SYS or CCONFIG.INI (in Multiuser DOS) and MCONFIG.SYS (in REAL/32). These systems utilize advanced configuration settings saved in binary files like CCONFIG.BIN, which can be edited using CONFIG.EXE.
In DR DOS starting from version 3.31 and later editions such as PalmDOS, Novell DOS, and OpenDOS, the DCONFIG.SYS file takes priority over CONFIG.SYS. This naming scheme originated from disk compression utilities and multi-boot setups, allowing multiple configuration profiles. OpenDOS 7.01 and DR-DOS 7.02+ also recognize ODCONFIG.SYS or DRCONFIG.SYS. From DR-DOS 6.0 onward, users can modify default system file extensions through the SYS /DR:ext command, facilitating parallel sets of system files managed by boot loaders like LOADER.
The SHELL directive supports specifying alternate AUTOEXEC.BAT files using /P[:filename.ext], with COMMAND.COM allowing extensions other than ".BAT" in this context—a capability also present in 4DOS. DR-DOS 6.0+ introduces a CHAIN=filespec command to continue processing another configuration file, optionally specifying a label with CHAIN=filespec,label. Additionally, DR-DOS 7.03+ includes a SYS /A option that copies CONFIG.SYS and AUTOEXEC.BAT alongside system files during installation.
Other operating systems use similar but differently named configuration files: FDCONFIG.SYS in FreeDOS, RXCONFIG.SYS in RxDOS, and CONFIG.PTS in PTS-DOS.
In Windows 95 and 98—which rely on DOS—both CONFIG.SYS and AUTOEXEC.BAT are present but usually remain empty. Windows Me does not process CONFIG.SYS during startup; instead, it loads environment variables directly from the Windows Registry at:
- HKLM\System\CurrentControlSet\Control\SessionManager\Environment
For FlexOS, CONFIG.SYS is a binary file responsible for defining resource managers and device drivers.
Example
Here 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 points for , , , , and commands.
- Functions like but allows for inline comments following other CONFIG.SYS commands. (Note: MS-DOS/PC DOS processes inline comments differently when enclosed in double quotes.)
- Used to initiate inline comments together with the ; directive.
- Prompts a Yes/No confirmation, optionally displaying a message before executing subsequent CONFIG.SYS commands. (FreeDOS supports conditional execution with boot menus but lacks optional messages.) DOS version 6.0 and later provide a similar feature by appending after directives.
- Executes the next CONFIG.SYS command unconditionally.
ATemplate:NbndC
- Determines whether programs can be interrupted upon encountering errors.
- Sets which drives record file access timestamps within FAT directory entries.
- Enables conditional execution on AT-compatible systems.
- Boot manager utility.
- Adjusts verbosity level of error messages.
- Changes the default serial device driver associated with the AUX device.
- Prevents access to character devices located outside the phantom \DEV directory.
- Loads a base device driver into memory.
- Produces a beep sound even if system notifications are disabled.
- Specifies the operating system to boot next.
- Enables or disables extended Ctrl+C signal checking.
- Assigns the number of disk buffers to allocate.
- Similar to BUFFERS but loads buffers into High Memory Area (HMA) or Upper Memory Blocks (UMB).
- Defines the maximum count of cache blocks allocated from the system pool.
- Sets maximum duration before unused cache blocks are returned to the system pool.
- Specifies maximum delay before dirty cache blocks are flushed to disk.
- Loads programs within CONFIG.SYS and runs them in the foreground, halting further processing until completion.
- Configures keyboard Caps Lock state.
- Designates the CD-ROM hardware driver name.
- Sets the number of buffers used for CD-ROM access.
- Continues processing of CONFIG.SYS from a new file or label.
- Defines the system clock type.
- Clears the display screen.
- Specifies OEM code page(s).
- Defines CMOS RAM address location.
- Sets colors for boot menu display.
- , ;, ;, ;
These directives (available since DR-DOS 7.02) specify count, sequence, I/O address, and timeout settings for COM ports.[1]
- , ;, ;, ;, ;, ;, ; and CPU-specific commands configure device buffers, comments, internationalization support, cursor positioning, codepage switching, RAM refresh rates, and CPU conditional execution respectively—primarily relevant for specialized DOS variants such as PTS-DOS and Embedded DOS.
DTemplate:NbndF
- Configures relocation parameters for drive descriptor tables.
- Sets memory segment limits for multi-sector disk data deblocking operations.
- Activates internal debugger support features.
- Boot manager configuration options.
- Loads device drivers into conventional memory.
- Loads device drivers into upper memory areas (equivalent to in DRDOS 5.0).
- Configures country and codepage settings affecting keyboard (KBD), screen (SCR), and printer (LPT) devices.
- Adjusts cache memory size allocations.
- Defines floppy disk compatibility modes.
- Specifies font used for display output.
- Controls loading of DOS into high memory and usage of upper memory blocks.
- Loads DOS internal tables (BUFFERS, FCBS, FILES, LASTDRIVE, STACKS) into upper memory regions.
- Specifies an alternative directory path for DOS system files.
- Defines search paths for data files.
- Specifies parameters for physical disk drives.
- Establishes settings for drives not recognized by default configurations.
- See .
- Enables error logging via PDUMP.nnn files and designates target drive for logs.
- Displays messages on screen during processing.
- Displays messages including ANSI escape sequences for enhanced formatting.
- Enables additional validation checks when launching programs.
- Sets assumed error or return codes for subsequent commands execution.
- Controls A20 gate state during program startup sequences.
- Terminates CONFIG.SYS processing early except for certain directives that must still be processed.
- Configures hash table size used to accelerate file open operations—distinct from MS-DOS/PC DOS FASTOPEN driver implementation.
- Sets number of cached File Control Blocks open simultaneously (shares buffer space with FILES in DR-DOS).
- Similar to FCBS but loads File Control Blocks into upper memory areas.
- Boot manager configuration options continue here.
- Defines maximum number of open files allowed concurrently.
- Same as FILES but loads file handles into upper memory regions.
- Includes execution of specified CONFIG.SYS subsections (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 CONFIG.SYS processing at a designated label.
- Continues nested CONFIG.SYS processing at a specified label, then returns to the prior position.
- Refer to , , or for additional information.
- See also .
- Refer to .
- Consult or for details.
- Consult or for details.
- Refer to .
- Loads a TSR program into memory following DOS data segment relocation. Compare with INSTCDEX.
- See , , or for more.
- Refer to .
- See or for further details.
- Activates console and command line history buffers along with enhanced pattern searching.
- Defines the HMA segment address.
- Configures energy-saving mode using HLT instruction.
- Specifies system boot sector virus scanning settings.
- Loads installable file system drivers.
- Prevents execution of specified CONFIG.SYS subsections.
- Permits certain programs to execute at ring 2, allowing direct hardware I/O access.
- Incorporates directives from another menu block (simulated via GOSUB/RETURN in DR-DOS).
- Sets the status of keyboard Insert mode.
- Loads 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. Compare with INSTCDEX.
- Adjusts PIC interrupt priorities to assign highest priority to a specified IRQ number.
KTemplate:NbndM
- Defines the keyboard layout configuration.
- Specifies the address of the relocated keyboard buffer.
- Sets the maximum number of accessible drive letters.
- Similar to LASTDRIVE but additionally loads Current Directory Structure into upper memory.
- Lists search paths for dynamic link libraries (DLLs).
- Manages backward compatibility for legacy applications.
- Sets the quantity of file locks allowed.
- Configures boot logo display and startup messages using PTS-DOS boot manager.
- Defines count, order, I/O address, and timeout parameters for LPT1 device.
- Defines count, order, I/O address, and timeout parameters for LPT2 device.
- Defines count, order, I/O address, and timeout parameters for LPT3 device.
- Enables and configures LPT4 device similarly to other LPT ports.
- Sets delay duration before increasing process priority.
- Configures strategy for memory allocation.
- Specifies default DOS memory allocation method.
- Defines options available in menus.
- Sets menu color schemes (also emulatable in DR-DOS).
- Specifies default menu block (emulatable in DR-DOS).
- Defines specific menu blocks (emulatable in DR-DOS).
- Enables or disables multitrack disk operations functionality.
- Continues CONFIG.SYS processing in another file after loading device drivers and sets %NEWFILE% environment variable accordingly.
NTemplate:NbndQ
- Sets default "No" character used in Yes/No/Resume prompts.
- Determines whether keyboard [[Num Lock|Template:Keypress]] is activated or deactivated.
- Enables conditional execution based on previous error code, e.g., .
- Displays a message and waits for key input, similar to and commands in DR-DOS.
- Requires user confirmation on errors encountered in CONFIG.SYS processing.
- Configures buffer size settings for LPT ports.
- Enables conditional execution on PC-compatible hardware platforms.
- Sets scheduler priority level.
- Establishes priority level for disk I/O operations programs.
- Changes default printer device driver assignment (e.g., switching from LPT1 to LPT3 or LPT4).
- Specifies whether DOS applications are permitted to execute.
- Loads user interface shell program.
- 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 reboot upon encountering errors.
- Permits inclusion of comments within CONFIG.SYS (not processed in PTS-DOS).
- Reserves a drive letter for local block device drivers.
- Sets the default character used for Resume () prompts in Yes/No/Resume dialogs.
- Returns nested CONFIG.SYS execution to the previous GOSUB or SWITCH point, optionally with a return code.
- Defines the amount of real mode memory available.
- Enables concurrent program loading in CONFIG.SYS, functioning similarly to CALL or INSTALL in other DOS variants.
- Determines whether the first character of deleted files is stored in the FAT reserved area.
- Specifies video modes under FreeDOS or screen access methods under PTS-DOS.
- Configures the keyboard Scroll Lock state (on or off).
- Sets environment variables.
- Loads the command interpreter shell.
- Functions like SHELL but includes a size parameter to relocate COMMAND.COM into HMA or UMBs for better memory management.
- Specifies keyboard modifier states such as Shift Lock, Num Lock, Scroll Lock, and Insert mode.
- Controls whether files close upon pressing Ctrl+Alt+Del.
- Skips the POST process during system reboot.
- , STACKSIZE, STACKSHIGH
- Parameters controlling stack allocation across various DOS platforms, some ignored in newer releases or specific systems.
- , SYSBOOT, SYSGEN, SYSLOAD
- PTS-DOS commands handling boot manager configuration, alternative OS boot files, memory locations for DOS components, and system loading from alternate disk areas.
- , SWITCH
- Directives managing control flow within nested CONFIG.SYS processing; SWITCH enables conditional execution based on key input while RETURN resumes previous control flow.
- , SWAPPATH
- OS/2 settings for designating drives for error logging and swap file path configuration.
- , SWITCHES
- Define default switch characters ('/' or '-') and special options applicable to different DOS versions.
- , TRACE
- Sets timeouts for CONFIG.SYS operations and activates single-step execution globally or locally across DOS variants including DR-DOS, PTS-DOS, FreeDOS, and OS/2, with varying functionality.
- Additional entries specify system pool sizes, thread counts, trace buffer dimensions, trap dump settings, temporary file extensions, A20 gate control, popup suppression measures, and hardware fixes primarily relevant to OS/2 or specialized DOS environments.
UTemplate:NbndZ
- Configures DOS to allocate a specific segment as Upper Memory Block (UMB).
- Specifies which UMB server is utilized.
- Defines address ranges designated as UMB RAM.
- Enables or disables verification of disk writes.
- Sets the DOS version reported to applications.
- Configures VGA display status indicators.
- Defines the current video mode setting.
- Indicates whether virtual DMA usage is permitted.
- Determines if processor Virtual Mode Extensions should be disabled.
- Configures VxD drivers for Windows environments.
- Sets system support parameters for Windows operation.
- Manages relocation of the Extended BIOS data area (EBDA).
- Allows conditional execution on XT-compatible machines.
- Enables integrated Year 2000 compliance support.
- Specifies the default character used for affirmative responses in prompts.
- Controls deletion tracking features.
Issues
Although the system can initiate booting without CONFIG.SYS present or if it is corrupted, this file together with AUTOEXEC.BAT remains critical for complete boot customization and fulfilling software dependencies. Repairing these files is necessary if they become damaged.
When CONFIG.SYS lacks a SHELL command (or is missing/corrupted), DOS attempts to locate COMMAND.COM in the root directory. Versions predating 6.0 will fail to boot without it. However, MS-DOS 6.0/PC DOS 6.1 and Novell DOS 7 and later will prompt users to provide a command processor path. This prompt also appears if the primary shell aborts or exits intentionally, allowing limited shell replacement at runtime without rebooting.
Since MS-DOS version 7.0 and above COMMAND.COM is incompatible with DR-DOS but often resides on C:\ during dual-boot setups, DR-DOS versions 7.02 and later prevent skipping SHELL directives when using skip/trace/step modes (Ctrl+F5/F7/F8). Subsequent updates introduced Ctrl+F6 to recover from invalid SHELL arguments. If no SHELL directive is found during skipped CONFIG.SYS processing, users are prompted to enter a valid shell filename before COMMAND.COM loads from root.
CONFIG.SYS size restrictions differ: MS-DOS/PC DOS limits CONFIG.SYS up to 64 KB in recent editions while DR-DOS imposes no explicit size limit beyond filesystem constraints. MS-DOS compiles CONFIG.SYS into tokenized form prior to processing directives sequentially (loading device drivers before TSRs). Conversely, DR-DOS parses CONFIG.SYS line-by-line enabling precise control over driver and TSR load order through DEVICE and INSTALL commands. This approach facilitates resolving load conflicts and supports conditional execution based on hardware detection or user input, enhancing customization and debugging options.
MS-DOS/PC DOS versions from 2.0 through 4.01 restrict SHELL command line length to 31 characters. Later versions expand this limit up to 128 characters while DR-DOS accepts up to 255 characters. Directives within CONFIG.SYS do not support long filenames.
Dual Booting Between 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. This adjustment supports dual boot functionality, allowing users to switch between Windows 9x and DOS. Selecting DOS at startup temporarily reverts these files to their original names, while the Windows 95 versions are preserved under the filenames CONFIG.W40 and AUTOEXEC.W40.
In configurations where Caldera DR-DOS versions 7.02 or 7.03 coexist with Windows 95, the Windows CONFIG.SYS and AUTOEXEC.BAT files remain intact. DR-DOS employs its own initialization files named DCONFIG.SYS and AUTODOS7.BAT for booting.
OS/2 and Windows NT
OS/2 depends extensively on CONFIG.SYS to load drivers and set environment parameters prior to launching its graphical user interface.
Within the OS/2 subsystem integrated into Windows NT, the file recognized as CONFIG.SYS by OS/2 applications is actually maintained within the system registry.
Several CONFIG.SYS commands utilized by OS/2 are either undocumented or lack comprehensive documentation.
CONFIG.SYS remains an active configuration file 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 | Computer Hope | 2017-12-29 | [1]
- Overview of Windows 98 / MS-DOS 7.10 CONFIG.SYS commands | Microsoft Support (archived)
- CONFIG.SYS command guide | Caldera (1998) | [2] (archived; DR-DOS 7 commands)
- FreeDOS CONFIG.SYS directives description | [3]
- PTS-DOS 2000 Pro manual including CONFIG.SYS directives | Paragon Software | [4]
- Unofficial German PTS-DOS FAQ (PTS/FAQD) | 2004-04-25 | [5]
- ↑ Cite error: Invalid
<ref>tag; no text was provided for refs namedPaul_1997_OD-A3