HIDOS (CONFIG.SYS directive)
| Company type | Configuration file |
|---|---|
| Industry | Operating systems |
| Founded | 1983 |
| Products | Configuration commands for DOS and OS/2 |
CONFIG.SYS serves as the chief configuration file within DOS and OS/2 operating systems. This plain text file, written in ASCII, holds configuration commands that the operating system's DOS BIOS interprets during the boot sequence. It was first introduced with DOS version 2.0.
Usage
The directives contained in CONFIG.SYS tailor DOS settings for hardware devices, software applications, and memory handling. Once CONFIG.SYS is processed, DOS initiates the command interpreter specified by the SHELL directive, defaulting to COMMAND.COM if none is defined. Subsequently, the shell executes commands found in AUTOEXEC.BAT.
CONFIG.SYS mainly includes name=value pairs that establish system parameters or load components such as device drivers and TSR programs into memory. This file is located in the root directory of the boot drive.
The same filename is also utilized by (DCP), a variant of MS-DOS developed by East-German manufacturer VEB Robotron.
Certain DOS variants check for alternative filenames that override CONFIG.SYS:
Advanced iterations of Concurrent DOS 386, Concurrent DOS XM, Multiuser DOS, System Manager, and REAL/32 employ CCONFIG.SYS (derived from "Concurrent") instead of CONFIG.SYS. Some Multiuser DOS releases use CCONFIG.INI, while REAL/32 seeks MCONFIG.SYS. These platforms support extended configuration options stored in binary files like CCONFIG.BIN, typically edited through CONFIG.EXE.
In DR DOS 3.31, PalmDOS 1.0, Novell DOS 7, OpenDOS 7.01, and DR-DOS 7.02 and later versions, DCONFIG.SYS (standing for "DR DOS") takes precedence over CONFIG.SYS. Originally designed to handle drive letter reassignment for disk compression utilities, it also enables multiple configuration profiles useful in multi-boot environments.
OpenDOS 7.01 and DR-OpenDOS 7.02 look for ODCONFIG.SYS, whereas some DR-DOS 7.02+ editions search for DRCONFIG.SYS. Starting with DR DOS 6.0, the command SYS /DR:ext allows users to modify default file extensions to support parallel sets of configuration files selectable through boot managers such as LOADER included with Multiuser DOS and DR-DOS 7.x.
The SHELL command permits specifying alternate AUTOEXEC.BAT files via the /P[:filename.ext] option; in this context, COMMAND.COM accepts extensions beyond ".BAT". This capability is also present in 4DOS. From DR-DOS 6.0 onward, the CHAIN=filespec directive enables continuation of processing additional files that can reside outside the root directory; versions 7.02 and newer support optional label arguments.
With DR-DOS 7.03 and later, a SYS /A parameter was introduced to copy matching CONFIG.SYS and AUTOEXEC.BAT files alongside system files during setup.
FreeDOS utilizes FDCONFIG.SYS, while RxDOS version 7.24 and above uses RXCONFIG.SYS, and PTS-DOS employs CONFIG.PTS.
In Windows 95 and Windows 98, both CONFIG.SYS and AUTOEXEC.BAT exist in the root directory of the boot partition but generally remain empty.
Unlike earlier versions, Windows Me does not process CONFIG.SYS at startup; instead, it retrieves environment variables directly from the Windows Registry at: HKLM\System\CurrentControlSet\Control\SessionManager\Environment
For the FlexOS operating system, CONFIG.SYS is a binary file that specifies resource managers and device drivers loaded during system initialization.
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>
:;*?!
- Used to define labels within CONFIG.SYS, serving as jump targets for directives like , , , and .
- Functions similarly to , but also marks inline comments that follow other CONFIG.SYS commands. (Note: In MS-DOS/PC DOS, inline comments enclosed in double quotes are not ignored.)
- Introduces inline comments alongside the ; directive.
- Presents a Yes/No prompt to confirm execution of subsequent CONFIG.SYS commands. (FreeDOS supports conditional boot menus with and , but lacks custom messages.) DOS version 6.0 and later provide a comparable function by appending after the directive, e.g., .
- Forces unconditional execution of the following CONFIG.SYS command.
ATemplate:NbndC
- Determines whether programs can be aborted upon errors.
- Specifies which drives maintain file access dates in the reserved FAT directory entry areas.
- Enables conditional execution on AT-compatible hardware.
- Functions as a boot manager.
- Adjusts the level of detail for error messages.
- Changes the default internal serial device driver (from COM1: to COM4:) assigned to the AUX device.
- Prevents loading of character devices outside the virtual \DEV directory.
- Loads a base device driver into memory.
- Produces a brief beep even when audible alerts are disabled.
- Defines the operating system to boot next.
- Enables or disables extended Ctrl+C checking.
- Sets the number of disk buffers to allocate.
- Similar to BUFFERS but loads buffers into HMA or UMB memory areas.
- , CACHETTL, CACHEFLUSH (Embedded DOS 6-XL only)
- Configure cache block parameters and flushing behavior.
- Loads specified programs within CONFIG.SYS and pauses processing until they return.
- (DR-DOS 7.02+)
- Sets keyboard Caps Lock status.
- , CDDBUFFERS (PTS-DOS only)
- Configures CD-ROM driver buffers.
- (DR DOS 5.0+, Embedded DOS)
- Continues processing CONFIG.SYS from another file or label.
- , CLS, CODEPAGE (PTS-DOS, OS/2)
- Controls system clock type, screen clearing commands, and OEM codepage settings.
- (DR-DOS 7.02+)
- Configures COM port count, order, I/O addresses, and timeouts.
- , COMMENT(S), COUNTRY, CPOS, CPSW (various OS versions)
- Manage device buffers, inline comments, internationalization support, cursor positioning, and codepage switching.
- , CPU88+, CPU86+, CPU286+, CPU386+, CPU486+ (PTS-DOS and DR-DOS)
- Conditional execution based on CPU type.
DTemplate:NbndF
- Controls relocation of drive descriptor tables in memory.
- Sets segment limits for multi-sector disk data deblocking operations.
- Enables support for an internal debugger.
- Functions as a boot manager.
- Loads device drivers into conventional memory.
- Loads device drivers into upper memory blocks (equivalent to in DRDOS 5.0).
- Configures country and codepage settings for keyboard, screen, and printer devices.
- Sets cache memory sizes for improved performance.
- Determines floppy disk compatibility mode.
- Specifies font used for display output.
- Controls loading of DOS into high memory and use of upper memory areas.
- Loads DOS system tables (such as BUFFERS, FCBS, FILES, LASTDRIVE, STACKS) into upper memory regions.
- Defines an alternate path location for DOS files.
- Specifies search paths for data files used by DOS utilities.
- Defines physical disk drive parameters for proper recognition.
- Sets parameters for drives that are not otherwise recognized by the system.
- See .
- Enables error logging with PDUMP.nnn files on specified drives.
- Outputs a message on the display screen.
- Displays messages including ANSI escape sequences for formatting.
- Activates additional verification checks when launching programs.
- Assigns assumed error or return codes for subsequent commands.
- Controls A20 gate state when initiating programs for memory management purposes.
- Terminates CONFIG.SYS processing early except for SWITCHES and SHELL directives under certain conditions.
- Sets hash table size to optimize file open operations differently than MS-DOS/PC DOS FASTOPEN driver behavior.
- Specifies how many File Control Blocks can be cached simultaneously (shares buffer space with FILES under DR-DOS).
- Same as FCBS but explicitly loads these structures into upper memory areas.
- Functions as a boot manager component.
- Sets maximum number of files that can be opened concurrently.
- Same as FILES but explicitly loads file handles into upper memory blocks.
- Includes execution of specified subsections within CONFIG.SYS (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 specified label.
- Continues nested CONFIG.SYS execution at a given label, returning control to the previous point afterward.
- Refer to , , or for related commands.
- See also .
- Consult for additional details.
- Refer to or for further information.
- See or for related instructions.
- Consult for more context.
- Loads a TSR program into memory following DOS data segment relocation. Compare with INSTCDEX.
- See , , or for similar commands.
- Refer to for more details.
- See or for related usage.
- Activates and sets up console and command line history buffers with enhanced pattern search capabilities.
- Defines the address of the High Memory Area (HMA) segment.
- Configures CPU HLT mode to reduce power consumption.
- Indicates whether the system performs boot sector virus scanning.
- Loads installable file system drivers.
- Prevents execution of designated CONFIG.SYS subsections (see also: ).
- Lists programs permitted to operate at ring 2 level with direct hardware I/O access.
- Incorporates directives from another menu section (can be emulated via GOSUB/RETURN in DR-DOS).
- Sets the status of the keyboard Insert mode.
- Loads a TSR program into memory.
- Loads a TSR program into upper memory, equivalent to HIINSTALL in DR DOS 5.0.
- Loads TSR after relocating DOS data segment (compare INSTCDEX).
- Adjusts PIC interrupt priorities to assign highest priority to a specified IRQ line.
KTemplate:NbndM
- Defines the keyboard layout configuration.
- Specifies the relocated keyboard buffer's memory address.
- Sets the maximum number of accessible drives.
- Similar to LASTDRIVE but additionally loads Current Directory Structure (CDS) into upper memory areas.
- Lists directories searched for DLL files.
- Handles compatibility settings for legacy applications.
- Determines the number of file locks allowed.
- Manages boot logo display and startup messages using PTS-DOS boot manager features.
- Configures count, sequence, I/O port address, and timeout parameters for LPT1 device.
- Provides similar configuration options for LPT2 device.
- Configures LPT3 device in a comparable manner.
- Enables and configures LPT4 device support.
- Sets delay before increasing process priority level.
- Controls strategy used for memory allocation.
- Defines default DOS memory allocation method.
- Specifies options available in a menu interface.
- Sets color schemes for menus (can be emulated under DR-DOS).
- Determines default menu block (emulatable in DR-DOS).
- Defines individual menu blocks (emulatable under DR-DOS).
- Enables or disables multitrack disk read/write operations.
- Continues CONFIG.SYS processing from a new file, optionally loading a driver and assigning %NEWFILE% environment variable.
NTemplate:NbndQ
- Sets the default No () character used in Yes/No/Resume prompts.
- Turns keyboard [[Num Lock|Template:Keypress]] on or off by default.
- Enables conditional command execution based on the last error code, e.g., .
- Displays a message and waits for key input, similar to and commands in DR-DOS environments.
- Requires user confirmation when errors occur during CONFIG.SYS processing.
- Adjusts buffer sizes for LPT port operations.
- Executes commands conditionally on PC-compatible hardware platforms.
- Sets scheduler priority levels for processes.
- Assigns priority specifically for disk input/output operations.
- Changes the default printer device driver among LPT1 through LPT4 ports.
- Restricts execution of DOS programs under certain conditions.
- Loads a user interface shell environment.
- Conditional execution tailored for IBM PS/1-compatible systems.
- Conditional execution tailored for IBM PS/2-compatible systems.
- Suppresses output sent to STDOUT.
RTemplate:NbndT
- Activates automatic system reboot upon encountering errors.
- Permits inclusion of comments within CONFIG.SYS files.
- Allocates a specific drive letter for local block device drivers.
- Establishes the default character for Resume () options in Yes/No/Resume prompts.
- Enables nested CONFIG.SYS processing to return to the previous GOSUB or SWITCH point, optionally with a return code.
- Sets the size of real mode memory available.
- Allows concurrent loading of programs in CONFIG.SYS, functioning similarly to INSTALL in DOS and CALL in OS/2 environments.
- Saves the initial character of deleted files in the reserved FAT area.
- Determines video mode settings under FreeDOS or screen access methods within PTS-DOS.
- Controls the status of the Scroll Lock key, turning it on or off.
- Defines environment variables for system use.
- Loads the command interpreter shell.
- Functions like SHELL but supports a SIZE parameter to pre-allocate COMMAND.COM in HMA or UMBs, reducing fragmentation.
- Specifies keyboard modifier states such as Shift Lock, Num Lock, Scroll Lock, and Insert mode.
- Manages file closure behavior when Ctrl+Alt+Del is pressed.
- Bypasses POST during system reboot sequences.
- , STACKSIZE, STACKSHIGH
- Configure hardware interrupt stack sizes across various DOS versions, with some options enabling upper memory loading.
- , SYSBOOT, SYSGEN, SYSLOAD
- PTS-DOS-specific commands for managing boot processes and system loading locations.
- Defines submenu blocks available in DOS 6.0 and later (unsupported by DR-DOS and FreeDOS).
- , SWAPPATH, THREADS, TIMESLICE
- OS/2-specific parameters controlling error logging paths, swap file locations, thread concurrency levels, and scheduler timeslice durations.
- , SWITCHES
- Conditional processing directives utilized in DR DOS and Novell DOS environments, with limited support under PTS-DOS.
- , TMPEXT
- Sets default switch characters ('/' or '-') and temporary file extensions across multiple DOS variants including DR-DOS, PTS-DOS, FreeDOS, and RxDOS.
- , TRACEBUF
- Enables or disables single-stepping execution of CONFIG.SYS and adjusts trace buffer size across DR-DOS, PTS-DOS, and OS/2 systems, with functionality varying per operating system.
- , SXFAKEHWFPU
- OS/2 options providing enhanced error logging and fixes for floating-point unit bugs.
This segment details essential configuration commands affecting system operation and resource allocation across diverse DOS versions and OS/2 platforms. These options are instrumental for fine-tuning system efficiency and stability within professional settings.
UTemplate:NbndZ
- Assigns a specific memory segment for use as Upper Memory Block (UMB) space by DOS management.
- Determines which UMB server is employed by the system.
- Defines address ranges designated as UMB RAM areas.
- Toggles disk write verification on or off.
- Sets the DOS version string reported to applications.
- Manages VGA display status configurations.
- Specifies the current video mode setting, analogous to FreeDOS's SCREEN command.
- Indicates whether virtual DMA capabilities are enabled.
- Enables or disables the processor's Virtual Mode Extensions (VME).
- Configures Virtual Device Drivers (VxD) for Windows environments.
- Sets up system-level support parameters for Windows operation.
- Controls relocation settings for the Extended BIOS Data Area (XBDA).
- Allows conditional execution specifically on XT-compatible hardware platforms.
- Configures integrated Year 2000 compliance features.
- Defines the default character used to confirm Yes responses in prompts.
- Manages tracking of file deletions within the system.
Issues
Although a system can initiate booting without the presence of CONFIG.SYS or AUTOEXEC.BAT, these files are crucial for a full DOS startup process and system customization, particularly to meet specific software requirements. Any corruption or damage to these files requires diagnostic efforts.
If the CONFIG.SYS file does not include a SHELL command or is missing or corrupted, DOS attempts to locate COMMAND.COM in the root directory of the boot drive. In DOS versions prior to 6.0, the absence of COMMAND.COM results in a failure to boot. Starting with MS-DOS 6.0, PC DOS 6.1, Novell DOS 7, and later releases, a prompt appears requesting the user to input the path to a command processor if it cannot be found automatically. This recovery prompt also occurs if the command processor terminates unexpectedly, enabling users to temporarily replace the shell without restarting the system.
Due to compatibility issues between MS-DOS versions 7.0 and above of COMMAND.COM and DR-DOS, DR-DOS versions 7.02 and later prevent skipping SHELL directives during skip, trace, or step modes (such as those accessed via Ctrl+F5/F7/F8). However, subsequent updates restored the ability to skip using Ctrl+F6, facilitating recovery from invalid SHELL parameters. When no SHELL directive is encountered during CONFIG.SYS skipping, users are prompted to provide a valid shell filename before COMMAND.COM is loaded.
The maximum allowable size for CONFIG.SYS varies depending on the operating system: MS-DOS and PC DOS impose a limit of up to 64 KB in newer versions, whereas DR-DOS does not enforce a practical size restriction because it processes CONFIG.SYS line-by-line instead of tokenizing it. This design grants DR-DOS enhanced flexibility in managing the loading order of device drivers and TSRs through DEVICE and INSTALL commands, allowing solutions for conflicts during loading and enabling temporary programs to be integrated seamlessly into CONFIG.SYS execution.
In MS-DOS/PC DOS versions from 2.0 through 4.01, the length of the SHELL directive was capped at 31 characters; this limit was expanded to 128 characters in later editions. 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 configuration, the original CONFIG.SYS and AUTOEXEC.BAT files are renamed as CONFIG.DOS and AUTOEXEC.DOS respectively to enable dual boot functionality. Upon booting into DOS mode, these files are temporarily restored under their conventional names: CONFIG.SYS and AUTOEXEC.BAT. Additionally, backups of the Windows 95 versions are preserved as CONFIG.W40 and AUTOEXEC.W40.
When Caldera DR-DOS versions 7.02 or 7.03 are installed alongside Windows 95, the Windows startup files retain their standard names (CONFIG.SYS and AUTOEXEC.BAT), while DR-DOS employs alternative filenames such as DCONFIG.SYS and AUTODOS7.BAT for its configuration during startup.
OS/2 / Windows NT
OS/2 relies heavily on CONFIG.SYS for configuring system settings, loading device drivers, and establishing environment variables prior to launching its graphical user interface.
Within the OS/2 subsystem included in Windows NT, CONFIG.SYS appears under its traditional name to OS/2 applications but is actually stored within the Windows registry. OS/2 utilizes numerous undocumented directives within CONFIG.SYS.
CONFIG.SYS continues to play a vital role 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 Windows 98 / MS-DOS 7.10 CONFIG.SYS directives (archived)
- Caldera’s CONFIG.SYS Command Reference (archived) – summary of DR-DOS 7 directives
- Details on FreeDOS CONFIG.SYS directives
- PTS-DOS 2000 Pro User Manual including CONFIG.SYS commands
- Unofficial German-language PTS-DOS FAQ (PTS/FAQD) with CONFIG.SYS directive explanations