SXFAKEHWFPU (CONFIG.SYS directive)
| Company type | Configuration file |
|---|---|
| Industry | Computer software |
| Founded | 1983 |
| Headquarters | N/A |
| Products | Configuration for DOS and OS/2 operating systems |
CONFIG.SYS serves as the main configuration file for DOS and OS/2 operating systems. This plain text file, written in ASCII, holds configuration commands accessible to users, which are interpreted by the operating system's DOS BIOS—typically found in IBMBIO.COM or IO.SYS—during the system's boot sequence. CONFIG.SYS was first introduced with DOS version 2.0.
Usage
The directives within CONFIG.SYS are responsible for setting up DOS to manage hardware devices, applications, and memory allocation. Once CONFIG.SYS has been processed, DOS initiates the command interpreter specified by the SHELL directive; if none is defined, it defaults to COMMAND.COM, which subsequently executes AUTOEXEC.BAT.
This file primarily comprises name=value pairs that configure adjustable parameters or load components such as device drivers and terminate-and-stay-resident programs (TSRs) into memory.
For DOS systems, CONFIG.SYS is located in the root directory of the bootable drive.
The same filename is utilized by (DCP), an MS-DOS variant developed by East-German company VEB Robotron.
Certain DOS versions check for alternative filenames that take precedence over CONFIG.SYS:
Concurrent DOS 386, Concurrent DOS XM, Multiuser DOS, System Manager, and REAL/32 prioritize CCONFIG.SYS instead of CONFIG.SYS. Multiuser DOS may also use CCONFIG.INI, while REAL/32 searches for MCONFIG.SYS. These platforms store extra configuration data in CCONFIG.BIN and employ a configuration tool named CONFIG.EXE.
From version 3.31 onward, including PalmDOS 1.0, Novell DOS 7, OpenDOS 7.01, and DR-DOS 7.02+, DCONFIG.SYS overrides CONFIG.SYS. This naming convention facilitates compatibility with disk compression utilities and supports multi-boot environments by allowing multiple configuration files.
OpenDOS 7.01 and DR-OpenDOS 7.02 additionally look for ODCONFIG.SYS, while some iterations of DR-DOS 7.02+ examine DRCONFIG.SYS. Starting with DR-DOS 6.0, users can modify default file extensions through the SYS /DR:ext command, enabling coexistence of multiple system file sets within a single root directory managed by boot loaders such as LOADER.
In DR-DOS, the SHELL directive permits specifying alternate AUTOEXEC.BAT files using /P[:filename.ext], with COMMAND.COM accepting extensions other than .BAT in this mode—a capability also available in 4DOS.
Beginning with DR-DOS 6.0, the CHAIN=filespec instruction allows continuation of processing another configuration file and supports labels (CHAIN=filespec,label) for targeted jumps within those files.
Versions of DR-DOS from 7.03 onward include a SYS /A option to duplicate CONFIG.SYS and AUTOEXEC.BAT alongside system files during setup.
FreeDOS utilizes FDCONFIG.SYS; RxDOS versions 7.24 and later use RXCONFIG.SYS; while PTS-DOS employs CONFIG.PTS.
Although both CONFIG.SYS and AUTOEXEC.BAT reside in the root directories of Windows 95 and Windows 98 boot drives, they are often left empty. In contrast, Windows Me does not process CONFIG.SYS during startup but instead relies on environment variables stored within the Windows Registry at HKLM\System\CurrentControlSet\Control\SessionManager\Environment.
For systems running FlexOS, CONFIG.SYS is a binary file that specifies resource managers and device drivers loaded at boot time.
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>
:;*?!
- Acts as a label identifier in CONFIG.SYS, serving as a jump target for commands such as , , , , and .
- Functions similarly to , also utilized to insert in-line comments following other directives.
- Used to begin in-line comments alongside the ; directive.
- Prompts a Yes/No confirmation before executing subsequent CONFIG.SYS commands. (FreeDOS does not support optional messages but allows conditional execution via boot menus.) DOS 6.0 and later versions support similar functionality with a trailing after directives.
- Forces unconditional execution of the next directive.
ATemplate:NbndC
- Determines whether programs can be interrupted upon encountering errors.
- Specifies which drives record file access timestamps within FAT file systems.
- Executes conditionally on AT-compatible hardware.
- Boot manager utility.
- Adjusts the verbosity level of error messages.
- Alters the default serial device driver assignment (COM1: through COM4:) for the AUX device.
- Prevents character devices from being accessible outside the virtual \DEV directory.
- Loads a base device driver into memory.
- Produces a brief beep even if sound notifications are disabled.
- Identifies the next operating system to boot.
- Enables or disables extended Ctrl+C interrupt checking.
- Defines the quantity of disk buffers to allocate.
- Similar to BUFFERS but loads buffers into High Memory Area (HMA) or Upper Memory Blocks (UMB).
- , ,
- Manage cache size and timing parameters.
- Loads programs during CONFIG.SYS processing, running them in the foreground and halting further processing until completion.
- Sets the Caps Lock state on the keyboard.
- ,
- Configures CD-ROM hardware drivers and buffer quantities.
- Continues processing CONFIG.SYS from another file or label.
- , , , etc.
- Various system and display settings available across different DOS versions.
- , ...,
- Configure serial COM ports including count, sequence, I/O addresses, and timeout values.
[Additional directives regulate device drivers, memory allocation, and system behavior tailored for specific DOS variants.]
DTemplate:NbndF
- Adjusts relocation parameters for drive descriptor tables.
- Defines memory segment address used for multi-sector disk data deblocking processes.
- Activates internal debugger support features.
- Boot manager utility.
- Loads device drivers into conventional memory.
- Loads device drivers into upper memory areas (equivalent to in DRDOS 5.0).
- Sets country and codepage configurations for keyboard, screen, and printer devices.
- Configures cache memory sizes for improved performance.
- Specifies floppy disk compatibility modes.
- Selects display font settings.
- Controls loading DOS into high memory and usage of upper memory blocks (similar function as in DRDOS 5.0).
- Loads DOS system tables (such as BUFFERS, FCBS, FILES) into upper memory regions.
- Defines an alternative directory path for DOS files.
- Specifies search paths for data files used by DOS.
- Defines physical disk drive parameters for system recognition.
- Sets parameters applicable to unrecognized or unknown drives.
- See .
- Enables error logging with
PDUMP.nnnfiles and designates the drive used for these logs. - Displays a message on screen during boot or execution.
- Shows messages incorporating ANSI Escape sequences for enhanced formatting.
- Adds extra validation checks when launching programs.
- Assigns assumed error or return codes to subsequent commands.
- Sets the A20 line gate state when starting applications to control memory addressing above 1MB.
- Terminates CONFIG.SYS processing prematurely except for certain allowed directives.
- Adjusts hash table size utilized for faster file open operations, differing from MS-DOS/PC DOS FASTOPEN driver behavior.
- Specifies the number of cached File Control Blocks (FCBs) that can be opened simultaneously (shares buffer space with FILES under DR-DOS).
- Similar to FCBS but explicitly loads FCBs into upper memory areas.
- Boot manager utility function.
- Sets maximum number of files that can be opened concurrently by the system.
- Similar to FILES but loads file handles explicitly into upper memory blocks.
- Includes execution of specified subsections within CONFIG.SYS (see IGNORE).
GTemplate:NbndI
- Waits for a key press or timeout, then assigns the error level to the corresponding ASCII value (or 1024 if timed out).
- Resumes CONFIG.SYS processing at a designated label.
- Continues nested CONFIG.SYS execution at a specified label, returning control afterward.
- Refer to , , or for more details.
- Refer to .
- Refer to .
- Consult or for additional information.
- Consult or for further reference.
- See .
- Loads a TSR program into memory following DOS data segment relocation. Compare with INSTCDEX.
- Refer to , , or for more information.
- Refer to .
- See or for further guidance.
- Activates console and command line history buffer with advanced pattern searching capabilities.
- Determines the HMA segment address.
- Configures energy-saving mode using HLT instruction.
- Performs checks for viruses in the boot sector.
- Loads installable file system drivers.
- Prevents execution of certain CONFIG.SYS subsections.
- Permits specified applications to operate at ring 2, enabling 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.
- Installs TSR program into upper memory area (equivalent to HIINSTALL in DR DOS 5.0).
- Loads TSR after relocating DOS data segment (also see INSTCDEX).
- Adjusts PIC interrupt priorities, elevating a specified IRQ to the highest priority.
KTemplate:NbndM
- Defines keyboard layout configuration.
- Specifies the address of the relocated keyboard buffer.
- Sets the maximum number of accessible drives.
- Similar to LASTDRIVE but loads Current Directory Structure into upper memory.
- Lists directories searched for DLLs.
- Controls loading of legacy programs.
- Determines allowed number of file locks.
- Configures display of boot logo screen.
- Sets count, order, I/O address, and timeout parameters for LPT1 device.
- Applies same settings as LPT1 for LPT2 device.
- Applies same settings as LPT1 for LPT3 device.
- Enables and configures LPT4 device parameters.
- Defines delay before waiting processes receive higher priority.
- Configures strategy for memory allocation.
- Sets default DOS memory allocation approach.
- Defines available menu options.
- Specifies menu color scheme (emulatable in DR-DOS).
- Designates default menu block (emulatable in DR-DOS).
- Defines a specific menu block (emulatable in DR-DOS).
- Enables multitrack disk drive operations.
- Continues CONFIG.SYS processing from a new file, optionally loading a device driver and setting %NEWFILE% environment variable.
NTemplate:NbndQ
- Sets default No () character used in Yes/No/Resume prompts.
- Toggles keyboard [[Num Lock|Template:Keypress]] state on or off.
- Executes commands conditionally based on previous error code status.
- Displays text and waits for a key press, similar to ECHO and GETKEY in DR-DOS environments.
- Requires user confirmation when errors occur during CONFIG.SYS processing.
- Configures buffer size settings for LPT ports.
- Executes commands conditionally on PC-compatible systems only.
- Defines priority scheduling configuration settings.
- Sets priority level for disk I/O processes.
- Changes default printer device driver among LPT1, LPT2, LPT3, or LPT4 options.
- Specifies whether DOS programs are permitted to run.
- Loads the user interface shell environment.
- Executes commands conditionally on IBM PS/1-compatible machines only.
- Executes commands conditionally on IBM PS/2-compatible machines only.
- Suppresses output display on 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.
- Sets the default Resume () character in Yes/No/Resume dialog prompts.
- Returns nested CONFIG.SYS processing control to the previous GOSUB or SWITCH command, optionally passing a return code.
- Specifies the size of real mode memory available.
- Allows programs to load simultaneously in the background during CONFIG.SYS execution.
- Stores the initial character of deleted files within the FAT reserved area.
- Determines video mode or screen access methods based on the operating system.
- Controls the keyboard’s Scroll Lock state, turning it on or off.
- Establishes environment variables for system use.
- Loads the command interpreter shell.
- Similar to SHELL but supports a SIZE parameter to pre-allocate COMMAND.COM in HMA or UMBs, enhancing memory efficiency when using third-party shells.
- Defines keyboard modifier key states such as Shift Lock, Num Lock, Scroll Lock, and Insert mode.
- Specifies file closure behavior triggered by Ctrl+Alt+Del key combinations.
- Skips the Power-On Self-Test (POST) during reboot sequences.
- , STACKSIZE, STACKSHIGH
- Configure stack parameters with varied support and behavior across different DOS versions.
- Configures boot manager settings.
- (DOS 6.0+) Defines submenu blocks, which are not natively supported by DR-DOS or FreeDOS but can be simulated through CLS, ECHO, and SWITCH commands.
- (OS/2) Redirects error messages to a drive log instead of displaying popup windows.
- , SWITCHES, SWITCHAR
- Set swap file locations, special options, and default switch characters ('/' or '-') respectively across multiple DOS variants.
- , SYSBOOT, SYSGEN, SYSLOAD
- Specific to OS/2 or PTS-DOS, these commands handle hardware repairs, alternative operating system boot files, memory configuration, and system loading options.
- , SYSTOUMB (Embedded DOS or PTS-DOS)
- Define system memory pools and preferences for loading into upper memory blocks.
- , TIMESLICE (OS/2)
- Manage concurrent thread execution and scheduler time slice durations.
- , TRACE, TRACEBUF
- Control CONFIG.SYS timeout intervals, single-step execution settings, and trace buffer sizes with differing implementations between OS/2 and various DOS versions.
- , (OS/2) Records comprehensive error data for diagnostic purposes.
UTemplate:NbndZ
- Sets a specific segment for DOS to manage as Upper Memory Block (UMB).
- Determines which UMB server is utilized by the system.
- Defines address ranges designated as UMB RAM areas.
- Enables or disables verification of disk write operations.
- Specifies the DOS version reported to applications.
- Configures VGA display status parameters.
- Indicates current video mode settings similar to FreeDOS’s SCREEN command.
- Controls whether virtual DMA is permitted for use.
- Enables or disables processor Virtual Mode Extensions (VME).
- Configures Windows VxD driver settings.
- Establishes system support parameters for Windows environments.
- Manages relocation of the Extended BIOS Data Area (XBDA).
- Executes commands conditionally on XT-compatible hardware only.
- Enables built-in Year 2000 compliance features.
- Defines the default affirmative response character in prompts.
- Configures tracking of file deletions.
Issues
Although the system can initiate boot processes without CONFIG.SYS or AUTOEXEC.BAT files present, these configuration files are crucial for comprehensive operating system customization and meeting software dependencies. Any corruption or damage requires diagnostic intervention.
If a SHELL directive is missing from CONFIG.SYS—or if the file itself is absent or corrupted—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 not found. MS-DOS 6.0/PC DOS 6.1 and Novell DOS 7 and later prompt users to specify a command interpreter path instead. This prompt also appears if the primary shell process terminates unexpectedly. This mechanism allows limited runtime replacement of the shell without requiring a system reboot.
The COMMAND.COM version included with MS-DOS 7.0 and above is incompatible with DR-DOS installations, which commonly reside in C:\ within dual-boot configurations. Beginning with DR-DOS 7.02, skip/trace/step modes (Ctrl+F5/F7/F8) no longer bypass SHELL directives. Subsequent updates introduced Ctrl+F6 to restore skip functionality for recovery from invalid SHELL arguments. If no valid SHELL is found during skip operations, users are prompted to input a shell filename before COMMAND.COM is loaded from the root directory.
The maximum size allowed for CONFIG.SYS varies depending on the operating system version. MS-DOS and PC DOS impose limits up to approximately 64 KB, whereas DR-DOS effectively has no practical size restriction due to its line-by-line interpretation approach rather than tokenization. This design grants DR-DOS enhanced control over driver and TSR loading order through commands like DEVICE and INSTALL, enabling resolution of load conflicts and facilitating temporary external program integration.
In MS-DOS/PC DOS versions from 2.0 through 4.01, the SHELL command line was restricted to a maximum of 31 characters. Later releases expanded this limit up to 128 characters, while DR-DOS supports up to 255 characters for this directive. It should be noted that CONFIG.SYS directives do not accommodate long filename syntax.
Dual Booting Between DOS and Windows 9x
When Windows 95 is installed over a preexisting DOS or Windows environment, the files CONFIG.SYS and AUTOEXEC.BAT are renamed to CONFIG.DOS and AUTOEXEC.DOS respectively. This renaming enables dual boot functionality, allowing the user to switch between Windows 9x and DOS. During a DOS startup, these renamed files are temporarily reverted to their original filenames. Meanwhile, backups of the Windows 95 versions are stored under the names CONFIG.W40 and AUTOEXEC.W40.
In scenarios where Caldera DR-DOS versions 7.02 or 7.03 coexist with Windows 95, the Windows CONFIG.SYS and AUTOEXEC.BAT files remain unaltered. Instead, DR-DOS initiates booting using its own configuration files named DCONFIG.SYS and AUTODOS7.BAT.
OS/2 and Windows NT
OS/2 depends extensively on CONFIG.SYS for setting up device drivers and environment variables prior to launching its graphical user interface.
Within the Windows NT environment, the OS/2 subsystem represents the CONFIG.SYS file internally through the system registry.
Certain CONFIG.SYS commands utilized by OS/2 are undocumented.
The role of CONFIG.SYS continues to be vital 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 commands (archived)
- Caldera’s CONFIG.SYS Command Reference (archived) – summary of DR-DOS 7 directives
- FreeDOS CONFIG.SYS directive descriptions
- PTS-DOS 2000 Pro User Guide with CONFIG.SYS command explanations (archived)
- German unofficial PTS-DOS FAQ (PTS/FAQD) including CONFIG.SYS commands