MENU (CONFIG.SYS directive)
| Company type | Configuration file |
|---|---|
| Industry | Operating systems |
| Founded | 1983 |
| Products | System configuration commands for DOS and OS/2 |
CONFIG.SYS serves as the main configuration file for the DOS and OS/2 operating system families. This plain text file, written in ASCII, holds configuration commands accessible to users, which are interpreted by the operating system's DOS BIOS 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 specified in the SHELL directive; if none is provided, it defaults to COMMAND.COM. This shell then executes the instructions found in AUTOEXEC.BAT.
Typically, the file is composed of name=value pairs that adjust system parameters or load components such as device drivers and terminate-and-stay-resident programs (TSRs) into memory. In DOS environments, CONFIG.SYS is located in the root directory of the bootable drive.
Certain DOS variants prioritize alternative filenames over CONFIG.SYS. For instance, Concurrent DOS 386, Concurrent DOS XM, Multiuser DOS, and REAL/32 use CCONFIG.SYS or CCONFIG.INI, with configuration data maintained in a binary file named CCONFIG.BIN. These files are commonly edited through CONFIG.EXE.
In versions of DR DOS starting from 3.31 and later releases such as Novell DOS 7 and DR-DOS 7.02+, the file DCONFIG.SYS (derived from "DR DOS") takes precedence over CONFIG.SYS. This arrangement supports multi-boot configurations and disk compression drivers that alter drive letter assignments. Additionally, OpenDOS 7.01 and DR-OpenDOS 7.02 recognize alternative filenames like ODCONFIG.SYS or DRCONFIG.SYS.
Beginning with DR DOS 6.0, the SYS /DR:ext command enables users to define custom extensions for system files, allowing multiple system setups to coexist within a single root directory and be selected via boot loaders such as LOADER used by Multiuser DOS and DR-DOS 7.x series. The SHELL directive can specify alternative AUTOEXEC.BAT files using the /P[:filename.ext] option, a feature also supported by 4DOS. The CHAIN=filespec command permits continuation of processing from another configuration file—even if it resides outside the root directory—with optional label targeting functionality available in DR-DOS 7.02 and newer.
Starting with DR-DOS 7.03, the command SYS /A facilitates copying CONFIG.SYS and AUTOEXEC.BAT along with other system files.
FreeDOS employs FDCONFIG.SYS, while RxDOS version 7.24 and above uses RXCONFIG.SYS. The operating system PTS-DOS utilizes CONFIG.PTS.
Both CONFIG.SYS and AUTOEXEC.BAT are present in the root directories of Windows 95 and Windows 98 boot drives due to their DOS heritage; however, these files are usually left empty. Windows Me does not process CONFIG.SYS during startup, instead loading environment variables directly from the Windows Registry.
In contrast, under FlexOS, CONFIG.SYS is a binary file that specifies resource managers and device drivers loaded when the system boots.
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>
:;*?!
- Defines labels within CONFIG.SYS that serve as jump points for , , , , and commands.
- Functions similarly to , also used for inline comments following other directives. (Note that MS-DOS/PC DOS handles inline comments enclosed in double quotes differently.)
- Marks inline comments as an alternative to ;.
- Prompts a Yes/No confirmation before executing subsequent CONFIG.SYS commands.[1] (FreeDOS lacks support for optional messages but allows conditional execution via boot menus.) From DOS version 6.0 onward, similar functionality can be achieved by appending after directives.
- Forces unconditional execution of the next directive.
ATemplate:NbndC
- Determines whether programs can be terminated upon encountering errors.
- Sets which drives record file access timestamps within FAT file systems.
- Enables conditional execution on AT-compatible hardware.
- Manages the boot process.
- Adjusts the level of detail in error messages.
- Alters the default serial port driver (COM1 through COM4) assigned to the AUX device.
- Prevents access to character devices outside the virtual \DEV directory.
- Loads a fundamental device driver into system memory.
- Produces a brief beep sound even when audible alerts are turned off.
- Defines the operating system designated for the next boot sequence.
- Activates or deactivates extended Ctrl+C interrupt checking.
- Allocates a specific quantity of disk buffers.
- Similar to BUFFERS, but places buffers into High Memory Area (HMA) or Upper Memory Blocks (UMB).
- , , (Embedded DOS 6-XL exclusive)
- Sets cache size, expiration time, and flush intervals.
- Executes programs listed in CONFIG.SYS, pausing further processing until completion.
- Establishes keyboard Caps Lock state.
- , (PTS-DOS only)
- Defines CD-ROM driver name and buffer quantity.
- Continues CONFIG.SYS processing from an alternate file or label.
- , , along with other PTS-DOS-specific commands, configure system clock type and screen clearing behavior.
- (OS/2 exclusive)
- Specifies OEM codepage settings.
- (DR-DOS 7.02 and later)
- Configures serial port parameters including count, order, I/O addresses, and timeouts.
- , (DOS 4.0 and newer)
- Redefines inline comment lead characters or ignores subsequent lines.
- , (DOS 3.0+, DR DOS 3.31+, OS/2)
- Enables and configures internationalization support.
- CPU directives such as CPU88, CPU86, CPU386, CPU486 specify conditional execution based on processor type, primarily for PTS-DOS and DR-DOS.
This concise overview presents essential CONFIG.SYS directives pertinent to business professionals managing DOS environments or embedded systems, emphasizing device control, memory management, boot configuration, and internationalization critical for enterprise functionality.
DTemplate:NbndF
- Adjusts relocation settings for drive descriptor tables.
- Assigns memory segment address used for multi-sector disk data deblocking operations.
- Activates internal debugger capabilities.
- Controls boot management functions.
- Loads device drivers into conventional memory space.
- Loads device drivers into upper memory area (equivalent to in DRDOS 5.0).
- Sets country code and codepage parameters for keyboard, screen, and printer devices.
- Configures sizes of cache memory blocks.
- Defines compatibility mode for floppy disk drives.
- Selects display font settings.
- Manages loading of DOS into high or upper memory regions (similar to in DRDOS 5.0).
- Loads DOS internal tables (BUFFERS, FCBS, FILES, LASTDRIVE, STACKS) into upper memory blocks.
- Specifies an alternative path for DOS file searches.
- Defines search path for data files.
- Sets parameters related to physical disk drives.
- Establishes parameters for drives not natively recognized by the system.
- Refer to .
- Enables logging drive for PDUMP.nnn error reports.
- Controls display of messages on screen output devices.
- Enables message display using ANSI escape codes.
- Adds extra validation checks when launching programs.
- Defines assumed error or return codes for subsequent commands.
- Sets A20 line gate state upon program startup.
- Terminates processing of CONFIG.SYS early except for SWITCHES and SHELL directives under certain conditions.
- Configures hash table size to accelerate file opening operations, distinct from MS-DOS/PC DOS FASTOPEN driver behavior.
- Specifies number of cached File Control Blocks (FCBs) that can be open simultaneously (shares buffer space with FILES under DR-DOS).
- Similar to FCBS but explicitly loads FCBs into upper memory segments.
- Manages boot operations.
- Sets maximum allowable open files count.
- Like FILES but ensures file handles are loaded into upper memory explicitly.
- Includes execution of designated CONFIG.SYS subsections via IGNORE directive.
GTemplate:NbndI
- Awaits key press or timeout, setting error level to ASCII code or 1024 if timed out.
- Resumes CONFIG.SYS processing at the indicated label.
- Continues nested CONFIG.SYS processing at the given label; then returns to previous point.
- Refer to , , or .
- Refer to .
- Refer to .
- Refer to or .
- Refer to or .
- Refer to .
- Loads TSR program into memory following DOS data segment relocation; see INSTCDEX for comparison.
- Refer to , , or .
- Refer to .
- Refer to or .
- Activates console and command line history buffer with advanced pattern search.
- Indicates HMA segment address.
- Configures HLT power-saving mode.
- Enables scanning for boot sector viruses.
- Loads installable file systems.
- Prevents executing designated CONFIG.SYS subsections.
- Permits specified programs to operate at ring 2 for direct hardware I/O access.
- Incorporates directives from another menu block (can be emulated by GOSUB/RETURN in DR-DOS).
- Sets keyboard Insert mode status.
- Loads TSR programs into memory.
- Loads TSR programs into upper memory (equivalent to HIINSTALL in DR DOS 5.0).
- Loads TSR programs after DOS data segment relocation; see INSTCDEX for comparison.
- Rotates PIC interrupt priorities, assigning highest priority to the specified IRQ number.
KTemplate:NbndM
- Defines the keyboard layout.
- Sets the address for the relocated keyboard buffer.
- Establishes the maximum number of accessible drives.
- Similar to LASTDRIVE but loads Current Directory Structure into upper memory.
- Specifies DLL search directories.
- Handles compatibility with legacy applications.
- Sets the number of file locks allowed.
- Controls display of boot logo.
- Configures count, order, I/O address, and timeout for LPT1 device.
- Configures LPT2 device similarly.
- Configures LPT3 device similarly.
- Enables and configures LPT4 device.
- Defines wait time before elevating process priority.
- Sets memory allocation strategy.
- Establishes default DOS memory allocation approach.
- Defines menu options.
- Specifies menu colors (can be emulated in DR-DOS).
- Sets default menu block (emulatable in DR-DOS).
- Defines a menu block (emulatable in DR-DOS).
- Enables multitrack disk operations.
- Continues CONFIG.SYS processing in a new file after loading device drivers and setting %NEWFILE% environment variable.
NTemplate:NbndQ
- Defines default No () response for Yes/No/Resume prompts.
- Indicates whether keyboard [[Num Lock|Template:Keypress]] is enabled or disabled.
- Conditional execution based on last return code or error status, e.g., .
- Similar to and , displays text and waits for key press.
- Specifies if user confirmation is required for errors in CONFIG.SYS.
- Sets buffer size for LPT ports.
- Conditional execution limited to PC-compatible machines only.
- Configures priority scheduler settings.
- Adjusts priority for disk I/O processes.
- Changes default printer device driver (e.g., from LPT1 to LPT3 or LPT4).
- Specifies whether DOS programs are permitted to execute.
- Loads user interface components.
- Conditional execution on IBM PS/1-compatible machines only.
- Conditional execution on IBM PS/2-compatible machines only.
- Suppresses output sent to STDOUT.
RTemplate:NbndT
- Determines whether the system should reboot automatically upon encountering errors.
- Enables inclusion of comments within CONFIG.SYS.
- Assigns drive letters reserved by local block device drivers.
- Sets the default Resume () character used in Yes/No/Resume prompts.
- Returns control from nested CONFIG.SYS processing to the previous GOSUB or SWITCH point, optionally providing a return code.
- Specifies the size of real mode memory.
- Allows programs in CONFIG.SYS to load simultaneously in the background, functioning similarly to CALL or INSTALL commands under DOS.
- Indicates whether the first character of deleted files is stored in the FAT reserved area.
- Configures video mode for FreeDOS or determines screen access methods under PTS-DOS.
- Sets the status of the keyboard Scroll Lock key, toggling it on or off.
- Defines environment variables.
- Loads the command interpreter shell.
- Similar to SHELL but supports a SIZE parameter to pre-allocate COMMAND.COM into HMA or UMBs, enhancing memory efficiency with third-party shells.
- Specifies keyboard modifier key states such as Shift Lock, Num Lock, Scroll Lock, and Insert mode.
- Determines whether files close automatically when Ctrl+Alt+Del is pressed.
- Indicates if POST should be bypassed during reboot.
- Serves as a compatibility placeholder due to differing stack layouts in earlier DR DOS versions.
- Sets the number of hardware interrupt stacks.
- Defines the default stack size for newly created threads.
- Functions like STACKS but explicitly loads buffers into upper memory areas.
- Configures boot manager settings.
- Directive intended for internal use only.
- Manages behavior of the XMS A20 gate.
- Defines submenu blocks (emulatable under DR-DOS).
- {{nobold|(OS/2 3.0+)} }
- Redirects error information logging to a drive instead of displaying a popup screen.
- {{nobold|(OS/2)} }
- Specifies the path for swap files.
- {{nobold|(DR DOS 6.0+)} }
- Enables conditional continuation of nested CONFIG.SYS processing at specified labels based on key input, with RETURN restoring control.[2]
- {{nobold|(DOS 2.x, DOS Plus, DR-DOS 7.02+, PTS-DOS, FreeDOS, RxDOS)} }
- Sets the default switch character ('/' or '-').
- {{nobold|(DOS 4.0, Novell DOS 7+)} }
- Defines special options that are ignored by PTS-DOS.
- {{nobold|(OS/2 Warp 4 FixPak 1+)} }
- Activates a fix addressing an FPU rounding error.
- {{nobold|(PTS-DOS)} }
- Specifies an alternative DOS OS filename for booting purposes.
- {{nobold|(PTS-DOS)} }
- Configures memory locations for various DOS components.
- {{nobold|(PTS-DOS)} }
- Enables system loading from an alternate disk region.
- {{nobold|(Embedded DOS 6-XL)} }
- Determines the size of the dynamic system memory pool allocation.
- {{nobold|(PTS-DOS)} }
- Loads DOS data and code into upper memory blocks (UMBs).
- {{nobold|(OS/2)} }
- Specifies the number of threads that can run concurrently.
- {{nobold|(DR DOS 6+, PTS-DOS)} }
- Sets timeouts for single-stepping through CONFIG.SYS and defines default responses for queries and selections.[2]
- {{nobold|(OS/2)} }
- Adjusts minimum and maximum values for scheduler time slices.
- {{nobold|(PTS-DOS)} }
- Specifies file extensions used for temporary files.
- {{nobold|(DR-DOS 7.02+, PTS-DOS, OS/2)} }
- Enables or disables single-step execution of CONFIG.SYS (and AUTOEXEC.BAT) globally or locally.[3]
- {{nobold|(OS/2)} }
- Defines the buffer size used by the TRACE directive for logging purposes.
- {{nobold|(OS/2 3.0+)} }
- Logs comprehensive error details during traps and errors.
UTemplate:NbndZ
- Directs DOS to assign a particular memory segment as an Upper Memory Block (UMB).
- Sets up the UMB management service.
- Defines the address intervals allocated for UMB RAM.
- Toggles verification of disk write operations.
- Determines the DOS version presented to applications.
- Manages VGA display settings.
- Indicates the active video mode, functioning similarly to FreeDOS's SCREEN command.
- Activates virtual DMA functionality.
- Regulates the processor's Virtual Mode Extensions (VME).
- Configures the Windows VxD driver.
- Sets parameters for Windows system compatibility.
- Adjusts relocation for the Extended BIOS Data Area (XBDA).
- Enables conditional execution on XT-compatible hardware.
- Implements integrated Year 2000 compliance features.
- Defines the default affirmative character in prompt responses.
- Controls tracking of file deletions.
Issues
Although the system can initiate booting without CONFIG.SYS or AUTOEXEC.BAT, these configuration files are critical for thorough boot customization and meeting software prerequisites. Their corruption or absence necessitates diagnostic measures.
If CONFIG.SYS does not include a SHELL directive or if it is missing or damaged, DOS attempts to locate COMMAND.COM in the root directory of the boot drive. Versions prior to 6.0 will fail to boot if COMMAND.COM is unavailable. Starting with MS-DOS 6.0/PC DOS 6.1 and Novell DOS 7 and later, users are prompted to specify a command interpreter path if COMMAND.COM cannot be found, offering a limited shell replacement at runtime without requiring a reboot.
The COMMAND.COM from MS-DOS 7.0 and later is incompatible with DR-DOS, preventing bypassing of SHELL commands during skip, trace, or step debugging modes in DR-DOS versions 7.02 and above. Recovery mechanisms may include prompting for a valid shell filename before loading COMMAND.COM.
CONFIG.SYS file size restrictions differ across operating systems—MS-DOS and PC DOS impose limits of several kilobytes (up to approximately 64 KB in later editions), whereas DR-DOS does not enforce a practical maximum beyond file system constraints. MS-DOS processes CONFIG.SYS by converting it into tokenized memory blocks, ensuring drivers load before TSRs. In contrast, DR-DOS reads directives sequentially, supporting precise control over loading order and conditional execution based on hardware detection, user input, error status, or software return codes.
This flexibility in DR-DOS allows incorporation of temporary external utilities through INSTALL, enhancing customization options and debugging support.
Earlier MS-DOS releases capped the SHELL directive line length at 31 characters, while subsequent versions permit up to 128 characters. DR-DOS extends this limit further to allow up to 255 characters. CONFIG.SYS directives do not support long filenames.
Dual booting DOS and Windows 9x
During installation of Windows 95 over an existing DOS/Windows environment, CONFIG.SYS and AUTOEXEC.BAT are renamed CONFIG.DOS and AUTOEXEC.DOS respectively to enable dual-boot functionality between Windows 9x and DOS. When booting into DOS mode, these files are temporarily restored as CONFIG.SYS and AUTOEXEC.BAT. Backup copies of Windows 95 configuration files are saved as CONFIG.W40 and AUTOEXEC.W40.
On systems running Caldera DR-DOS versions 7.02 or 7.03 alongside Windows 95, the Windows CONFIG.SYS and AUTOEXEC.BAT remain intact. Instead, DR-DOS utilizes DCONFIG.SYS and AUTODOS7.BAT files for its startup configuration.
OS/2 / Windows NT
OS/2 heavily depends on CONFIG.SYS to set up device drivers and environment variables prior to initiating its graphical user interface.
Within the OS/2 environment embedded in Windows NT, CONFIG.SYS configurations are represented as OS/2 programs but are maintained within the system registry.
OS/2 employs a variety of CONFIG.SYS commands that are not officially documented.
The role of CONFIG.SYS continues to be essential in OS/2-based 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
- Information on AUTOEXEC.BAT and CONFIG.SYS at Computer Hope
- Overview of CONFIG.SYS directives for Windows 98 / MS-DOS 7.10 (archived)
- Caldera’s CONFIG.SYS Command Reference (archived) – summary of DR-DOS 7 directives
- Guide to FreeDOS CONFIG.SYS commands
- PTS-DOS 2000 Pro User Manual – detailing PTS-DOS CONFIG.SYS directives (archived)
- Unofficial German PTS-DOS FAQ (PTS/FAQD) covering CONFIG.SYS commands (archived)