HIFCBS (CONFIG.SYS directive)
| Company type | Configuration file |
|---|---|
| Industry | Computer software |
| Founded | DOS version 2.0 |
| Products | Configuration commands for DOS and OS/2 startup |
CONFIG.SYS serves as the chief configuration file for DOS and OS/2 operating systems. This plain text file, written in ASCII, holds configuration commands that the operating system's DOS BIOS—commonly found in IBMBIO.COM or IO.SYS—processes during system startup. The CONFIG.SYS file 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 is processed, DOS launches the command interpreter specified on the SHELL directive line; if none is provided, it defaults to COMMAND.COM, which subsequently runs the AUTOEXEC.BAT script.
Typically, this file contains name=value pairs that either configure parameters or load essential files—primarily device drivers and terminate-and-stay-resident programs (TSRs)—into memory.
In DOS environments, CONFIG.SYS is located in the boot drive's root directory.
Certain DOS versions employ alternative filenames that take precedence over CONFIG.SYS:
- Advanced iterations of Concurrent DOS 386, Concurrent DOS XM, Multiuser DOS, System Manager, and REAL/32 replace CONFIG.SYS with CCONFIG.SYS or CCONFIG.INI (in Multiuser DOS). REAL/32 may also utilize MCONFIG.SYS. These platforms support extended configuration options stored in binary files like CCONFIG.BIN, which are generally edited using CONFIG.EXE.
- In DR DOS 3.31 and later versions—including PalmDOS, Novell DOS, and OpenDOS variants—the file DCONFIG.SYS overrides CONFIG.SYS. This feature facilitates disk compression and multi-boot configurations by maintaining multiple setup profiles. Additionally, OpenDOS 7.01 and DR-OpenDOS 7.02 recognize ODCONFIG.SYS, while certain DR-DOS editions also check for DRCONFIG.SYS.
- Starting with DR DOS 6.0, users can modify default system file extensions via SYS /DR:ext, allowing several sets of system files to coexist in a single directory and be selected by boot managers such as LOADER.
- The SHELL command permits specifying alternative AUTOEXEC.BAT files through the /P[:filename.ext] option, which is also supported by enhanced shells like 4DOS.
- DR-DOS introduces the CHAIN=filespec directive to continue processing additional configuration files; this can include optional labels (CHAIN=filespec,label) to jump to specific sections.
- From version 7.03 onward, DR-DOS adds the SYS /A command to duplicate CONFIG.SYS and AUTOEXEC.BAT alongside system files during setup.
Other DOS variants offer comparable functionalities: for instance, FDCONFIG.SYS in FreeDOS, RXCONFIG.SYS in RxDOS, and CONFIG.PTS in PTS-DOS.
Both CONFIG.SYS and AUTOEXEC.BAT are present in the root directories of Windows 95 and Windows 98 boot drives but often remain unused. Unlike its predecessors, Windows Me does not process CONFIG.SYS during startup; instead, it retrieves environment variables from the Windows Registry at:
- HKLM\System\CurrentControlSet\Control\SessionManager\Environment
In contrast, under FlexOS, CONFIG.SYS exists as a binary configuration file that specifies resource managers and device drivers loaded at boot time.
Example
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 that serve as jump targets for , , , , and commands.
- Functions similarly to , but additionally permits in-line comments following other CONFIG.SYS instructions. (Under MS-DOS/PC DOS, inline comments enclosed in double quotes are not disregarded.)
- Initiates in-line comments alongside the ; command.
- Presents a Yes/No prompt to confirm execution of subsequent CONFIG.SYS commands. (FreeDOS supports optional conditions with boot menus but lacks message prompts.) DOS version 6.0 and later offers a comparable feature by appending after the command (e.g., ).
- Executes the next CONFIG.SYS command without conditions.
ATemplate:NbndC
- Determines whether programs can be terminated upon encountering errors.
- Specifies which drives maintain file access date stamps within FAT directory entries.
- Enables conditional execution on AT-compatible hardware.
- Boot manager utility.
- Adjusts the level of detail shown in error messages.
- Alters the default serial device driver assigned to the AUX device.
- Disables character device availability outside the phantom \DEV directory.
- Loads a fundamental device driver into memory.
- Produces a beep sound even if audible alerts are disabled.
- Indicates the operating system to be booted next.
- Enables or disables extended Ctrl+C monitoring.
- Defines the quantity of disk buffers to allocate.
- Similar to BUFFERS but loads buffers into High Memory Area (HMA) or Upper Memory Blocks (UMB).
- , ,
- Configures allocation and timing for cache blocks.
- Loads programs specified in CONFIG.SYS, pausing further processing until they return control.
- Sets keyboard Caps Lock state.
- ,
- Specifies CD-ROM driver name and buffer count.
- Continues processing CONFIG.SYS from a new file or label.
- , , , etc.
- Various system configuration commands, primarily relevant to PTS-DOS or OS/2 systems.
- , ...,
- Configures serial COM ports including count, sequence, I/O addresses, and timeout settings.
- , etc.
- Redefines inline comment characters or ignores lines under particular DOS variants.
- , etc.
- Enables internationalization support and configures codepages.
Additional CPU-specific conditional directives such as CPU88, CPU286, CPU386 exist mainly in PTS-DOS and DR-DOS environments for processor-optimized execution.
DTemplate:NbndF
- Adjusts relocation of drive descriptor tables.
- Defines memory segment address used for multi-sector disk data deblocking.
- Activates internal debugger support.
- Boot manager component.
- Loads device drivers into conventional memory.
- Loads device drivers into upper memory blocks (similar to in DRDOS 5.0).
- Sets country and codepage configurations for keyboard, screen, and printer devices.
- Configures cache memory sizes for improved performance.
- Sets compatibility mode for floppy disk drives.
- Specifies display font settings.
- Controls loading of DOS into high or upper memory areas (comparable to in DRDOS 5.0).
- Loads DOS tables such as BUFFERS, FCBS, FILES, LASTDRIVE, STACKS into upper memory space.
- Specifies an alternative search path for DOS system files.
- Defines search paths for data files used by DOS utilities.
- Sets parameters for physical disk drives.
- Establishes configurations for unrecognized drive types.
- See .
- Enables and designates drive location for PDUMP.nnn error logging files.
- Displays a message on screen during boot or configuration stages.
- Outputs messages including ANSI escape sequences for formatting effects.
- Specifies additional verification checks when launching programs.
- Assigns an error or return code to subsequent operations.
- Manages A20 line gate state when starting applications.
- Terminates CONFIG.SYS processing prematurely except under certain conditions involving SWITCHES and SHELL directives.
- Defines hash table size to accelerate file open operations, differing from the MS-DOS/PC DOS FASTOPEN driver approach.
- Sets the number of cached File Control Blocks (FCBs) allowed simultaneously (under DR-DOS, FCBS and FILES share buffer space).
- Similar to FCBS but loads these buffers into upper memory areas.
- Boot manager functionality.
- Determines maximum number of files that can be open concurrently.
- Same as FILES but loads handles into upper memory regions.
- Incorporates execution of specific CONFIG.SYS subsections (refer to 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 processing of CONFIG.SYS at a designated label.
- Continues nested CONFIG.SYS processing at a specified label, then returns to the previous point.
- Refer to , , or for further details.
- Consult .
- See also .
- Refer to or as needed.
- See or for additional information.
- Refer to .
- Loads a TSR program into memory following DOS data segment relocation. Compare with INSTCDEX.
- Consult , , or for more details.
- See .
- Refer to or for configuration options.
- Activates and sets up console and command line history buffers along with extended pattern search capabilities.
- Defines the address of the High Memory Area (HMA) segment.
- Configures energy-saving mode using HLT instruction.
- Enables verification of system boot sector viruses.
- Loads file systems that can be installed dynamically.
- Prevents execution of specific CONFIG.SYS subsections. See also: .
- Specifies programs authorized to operate at ring 2 level for direct hardware input/output access.
- Incorporates directives from another menu block, emulated via GOSUB/RETURN in DR-DOS.
- Sets the keyboard Insert mode status.
- Loads a TSR program into memory.
- Installs TSR software into upper memory (equivalent to HIINSTALL in DR DOS 5.0).
- Loads TSR after relocating 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 area.
- Sets the maximum number of accessible drive letters.
- Equivalent to LASTDRIVE and explicitly loads Current Directory Structure (CDS) into upper memory.
- Lists directories for DLL search paths.
- Manages compatibility settings for legacy software applications.
- Specifies the number of allowable file locks.
- Controls boot logo display when using PTS-DOS boot manager.
- Configures parameters such as count, order, I/O address, and timeout for the LPT1 device.[1]
- Applies the same settings as LPT1 for LPT2.[1]
- Mirrors LPT1 configuration for LPT3.[1]
- Enables and configures LPT4 device similarly to others.
- Sets delay before elevating process priority.
- Determines strategy for memory allocation management.
- Defines default method used by DOS for memory allocation.
- Specifies menu option settings.
- Sets menu color schemes (can be emulated in DR-DOS).
- Defines default menu block (emulatable in DR-DOS).
- Declares a menu block (emulatable in DR-DOS).
- Enables operations involving multitrack disks.
- Continues processing CONFIG.SYS from a new file after driver loading and setting the %NEWFILE% environment variable.[2]
NTemplate:NbndQ
- Sets default character for No () responses in Yes/No/Resume prompts.
- Determines whether keyboard [[Num Lock|Template:Keypress]] is enabled or disabled by default.
- Executes commands conditionally based on last return code or error status, e.g., .
- Displays text and waits for a key press, similar to and commands under DR-DOS.
- Specifies if user acknowledgment is required upon CONFIG.SYS errors.
- Configures buffer sizes for LPT1, LPT2, and LPT3 devices.
- Enables conditional execution on PC-compatible hardware platforms.
- Adjusts priority scheduling parameters.
- Sets priority levels for programs performing disk input/output operations.
- Changes default printer device driver assignment (from LPT1 to LPT3 or LPT4) associated with PRN device.
- Specifies whether DOS applications are permitted to execute.
- Loads user interface components.
- Enables conditional execution on IBM PS/1-compatible systems.
- Enables conditional execution on IBM PS/2-compatible systems.
- Suppresses display output sent to STDOUT.
RTemplate:NbndT
- Determines whether the system should automatically reboot when errors occur.
- Permits inclusion of comments within CONFIG.SYS files.
- Reserves a specific drive letter from local block device drivers.
- Establishes the default Resume () response character in Yes/No/Resume prompts.
- Returns nested CONFIG.SYS execution to the preceding GOSUB or SWITCH command location, optionally providing a return code.
- Sets 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/OS/2.
- Determines whether the initial character of deleted files is saved in the FAT reserved section of directory entries.
- Defines video mode (FreeDOS) or screen access methods (PTS-DOS).
- Sets the status of the keyboard Scroll Lock key as enabled or disabled.
- Assigns environment variables.
- Loads the command interpreter shell.
- Similar to SHELL but supports a SIZE parameter to pre-load COMMAND.COM into HMA or UMBs, minimizing fragmentation with third-party shells.
- Specifies keyboard modifier states such as Shift Lock, Num Lock, Scroll Lock, and Insert mode.
- Determines if files should be closed upon pressing Ctrl+Alt+Del.
- Indicates whether POST should be bypassed during reboot sequences.
- Defines the number of stacks allocated for hardware interrupts.
- Sets the default stack size for newly created threads.
- Functions like STACKS but loads buffers into upper memory areas.
- Configures boot manager settings.
- Controls behavior of the XMS A20 gate.
- Defines submenu blocks, which can be emulated on DR-DOS systems.
- Logs error information to a drive instead of displaying popup error screens.
- Specifies the path for swap file storage.
- (DR DOS 6.0+)
- Enables conditional continuation of nested CONFIG.SYS processing at designated labels based on keys pressed, with RETURN resuming previous locations.
- Defines the system's default switch character ('/' or '-') used across DOS versions from 2.x through DR-DOS 7.02+.
- Specifies special options applicable in DOS 4.0 and Novell DOS 7+, disregarded by PTS-DOS.
- (OS/2 Warp 4 FixPak+) Activates a fix addressing an FPU rounding issue.
- (PTS-DOS) Indicates an alternative DOS OS filename for boot operations.
- (PTS-DOS) Sets memory addresses for DOS components.
- (PTS-DOS) Loads system files from an alternate disk area.
- (Embedded DOS 6-XL) Defines dynamic system memory pool size allocation.
- (PTS-DOS) Determines if DOS data and code are loaded into Upper Memory Blocks (UMBs).
- (OS/2) Specifies the number of concurrent threads allowed.
- (DR-DOS 6.0+, PTS-DOS) Sets timeouts for CONFIG.SYS single-stepping and default responses for queries and selections.
- (OS/2) Configures minimum and maximum scheduler time slices.
- (PTS-DOS) Specifies temporary file extensions used by the system.
- Enables or disables global or local single-stepping through CONFIG.SYS/AUTOEXEC.BAT scripts (DR-DOS 7.02+, PTS-DOS, OS/2).
- (OS/2) Sets the size of the TRACE log buffer.
- (OS/2 3.0+) Records detailed error information during trap events.
UTemplate:NbndZ
- Directs DOS management to allocate a specific segment as UMB memory space.
- Specifies which UMB server is utilized by the system.
- Defines address ranges designated as UMB RAM regions.
- Enables or disables verification of disk writes.
- Reports a specified DOS version to running programs.
- Configures VGA display settings and status indicators.
- Sets the current video mode in use by the system.
- Determines if virtual DMA functionality is permitted.
- Controls whether Virtual Mode Extensions on the processor are deactivated.
- Manages VxD driver configurations for Windows environments.
- Adjusts system support parameters for Windows operating systems.
- Configures relocation settings for the Extended BIOS data area (EBDA).
- Enables conditional execution tailored for XT-compatible hardware platforms.
- Activates built-in Year 2000 compliance support features.
- Establishes the default affirmative character used in query prompts.
- Manages tracking settings for file deletions.
Issues
The system is capable of booting even if CONFIG.SYS is absent or corrupted; however, both this file and AUTOEXEC.BAT are crucial for a full DOS startup sequence. They tailor the operating system and define necessary software components. If these files become compromised, diagnostic measures are required.
When CONFIG.SYS does not include a SHELL directive—or if it is damaged or missing—DOS attempts to locate COMMAND.COM in the root directory. Earlier versions prior to 6.0 will fail if COMMAND.COM is not found, whereas MS-DOS 6.0/PC DOS 6.1, Novell DOS 7+, and related versions will prompt users to specify the path to a command processor. This prompt also appears if the primary command interpreter terminates unexpectedly or exits by user command, offering a minimal runtime shell alternative without needing a reboot.
COMMAND.COM from MS-DOS 7.0 onward is incompatible with DR-DOS, which impacts dual-boot configurations where DR-DOS 7.02+ no longer permits bypassing SHELL directives during skip, trace, or step operations (such as Ctrl+F5/F7/F8). Some subsequent releases introduced Ctrl+F6 to restore previous skipping behavior, allowing recovery from invalid SHELL parameters. If no SHELL directive is encountered when skipping CONFIG.SYS processing, the user is prompted to enter a valid shell filename before COMMAND.COM loads from the root directory.
CONFIG.SYS file size restrictions differ: MS-DOS/PC DOS limits range from a few kilobytes up to 64 KB in recent editions, whereas DR-DOS imposes no practical maximum because it interprets the file line-by-line rather than tokenizing it. This design grants DR-DOS users comprehensive control over the sequence of driver and TSR loading via DEVICE and INSTALL commands, facilitating resolution of load order conflicts and enabling conditional execution based on hardware status or user input. Additionally, INSTALL can execute non-resident programs integrated within the CONFIG.SYS processing flow.
The maximum length of the SHELL line was capped at 31 characters in MS-DOS/PC DOS versions 2.0 through 4.01, expanded to 128 characters in later releases, and extended up to 255 characters in DR-DOS. CONFIG.SYS directives do not support long filenames.
Dual booting DOS and Windows 9x
When Windows 95 is installed over an existing DOS/Windows environment, it renames CONFIG.SYS and AUTOEXEC.BAT to CONFIG.DOS and AUTOEXEC.DOS respectively to enable dual-boot functionality. During DOS startup, these files are temporarily restored to their original filenames. Backup copies of Windows 95 versions are saved as CONFIG.W40 and AUTOEXEC.W40.
In systems where Caldera DR-DOS 7.02/7.03 coexists with Windows 95, Windows’ CONFIG.SYS and AUTOEXEC.BAT remain unaltered. Instead, DR-DOS employs DCONFIG.SYS and AUTODOS7.BAT as its configuration files during boot.
OS/2 / Windows NT
OS/2 relies heavily on CONFIG.SYS for loading drivers and setting environment parameters prior to launching its graphical user interface.
Within the OS/2 subsystem of Windows NT, the CONFIG.SYS perceived by OS/2 applications is actually stored within the Windows registry.
Numerous CONFIG.SYS directives in OS/2 are either undocumented or lack comprehensive documentation.
CONFIG.SYS continues to be utilized by OS/2 descendants 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 available 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
- Details on FreeDOS CONFIG.SYS directives (archived)
- PTS-DOS 2000 Pro User Guide featuring CONFIG.SYS directives (archived)
- German-language unofficial PTS-DOS FAQ (PTS/FAQD) with extended CONFIG.SYS directive information (archived)