IFS (CONFIG.SYS directive)
| Company type | Configuration file |
|---|---|
| Industry | Computer software |
| Founded | 1983 |
| Headquarters | N/A |
| Products | System configuration for DOS and OS/2 |
CONFIG.SYS serves as the main configuration file for the DOS and OS/2 operating system families. This particular ASCII text file holds setup instructions accessible to users, which the operating system's DOS BIOS—commonly found in IBMBIO.COM or IO.SYS—interprets during the boot sequence. CONFIG.SYS made its debut with DOS version 2.0.
Usage
Within CONFIG.SYS, directives tailor DOS settings for hardware and software components, including memory handling. Once CONFIG.SYS is processed, DOS initiates the command interpreter specified by the SHELL directive, defaulting to COMMAND.COM if none is provided. Subsequently, this shell executes AUTOEXEC.BAT.
The content of CONFIG.SYS primarily comprises name=value entries that adjust system parameters or load essential files such as device drivers and terminate-and-stay-resident programs (TSRs). This file is located in the root directory of the bootable drive.
The CONFIG.SYS filename is also utilized by (DCP), a variant of MS-DOS developed by the former East-German company VEB Robotron.
Certain DOS derivatives recognize alternative configuration filenames that override CONFIG.SYS:
- Advanced editions of Concurrent DOS 386, Concurrent DOS XM, Multiuser DOS, System Manager, and REAL/32 prioritize CCONFIG.SYS over CONFIG.SYS. Some Multiuser DOS releases use CCONFIG.INI, while REAL/32 looks for MCONFIG.SYS. These platforms support expanded configuration stored in binary files like CCONFIG.BIN, typically edited with CONFIG.EXE.
- In versions such as DR DOS 3.31, PalmDOS 1.0, Novell DOS 7, and DR-DOS 7.02 and later, a file named DCONFIG.SYS takes precedence over CONFIG.SYS. Originally associated with disk compression features, it also enables multi-boot setups.
- OpenDOS 7.01 and DR-OpenDOS 7.02 seek out ODCONFIG.SYS, whereas some DR-DOS 7.02+ variants check for DRCONFIG.SYS. Starting with DR-DOS 6.0, users can alter the default system file extension using SYS /DR:ext, allowing several system files to coexist in one root directory and be selected via boot managers such as LOADER.
- The SHELL command allows specifying alternative AUTOEXEC.BAT files through /P[:filename.ext]. COMMAND.COM supports non-standard extensions for these batch files—a feature also compatible with 4DOS. Additionally, DR-DOS 6.0 and newer introduce a CHAIN=filespec directive to continue processing another configuration file, optionally targeting specific boot labels.
- From DR-DOS 7.03 onward, the command SYS /A copies both CONFIG.SYS and AUTOEXEC.BAT alongside other system files.
Other DOS variants incorporate similar naming conventions: for instance, FreeDOS uses FDCONFIG.SYS, RxDOS employs RXCONFIG.SYS, and PTS-DOS utilizes CONFIG.PTS.
In Windows 95 and Windows 98 environments, both CONFIG.SYS and AUTOEXEC.BAT exist but are generally left empty due to their underlying DOS-based design. Conversely, 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
For FlexOS, CONFIG.SYS differs as a binary file that specifies resource managers and device drivers loaded during system initialization.
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>
:;*?!
- Marks labels within CONFIG.SYS to serve as jump destinations for , , , , and commands.
- Functions like , but also allows inline comments following other directives. (Note: MS-DOS/PC DOS does not ignore inline comments enclosed in double quotes.)
- Used at the start of inline comments alongside the ; directive.
- Prompts a Yes/No confirmation before executing subsequent CONFIG.SYS commands. (FreeDOS supports optional conditions via boot menus but lacks customizable messages.)
- Forces unconditional execution of the next CONFIG.SYS command.
ATemplate:NbndC
- Determines whether programs can be interrupted upon encountering errors.
- Sets which drives record file access timestamps within FAT file systems.
- Enables conditional execution on AT-compatible hardware.
- Manages boot menu functionality.
- Adjusts verbosity level of error messages.
- Changes the default serial device driver assigned to the AUX: port.
- Prevents access to character devices outside of the virtual \DEV directory.
- Loads a fundamental device driver into memory.
- Produces a brief beep sound even if notification sounds are disabled.
- Indicates the operating system designated for the next boot sequence.
- Enables or disables extended Ctrl+C interrupt checking.
- Sets the quantity of disk buffers allocated.
- Explicitly loads buffers into High Memory Area (HMA) or Upper Memory Blocks (UMB).
- Defines the maximum count of cache blocks reserved from the system pool.
- Specifies the maximum duration before unused cache blocks return to the system pool.
- Sets the maximum time before dirty cache blocks are flushed to disk storage.
- Executes programs within CONFIG.SYS and pauses processing until they complete.
- Configures Caps Lock key state as either on or off.
- Defines the name of the CD-ROM hardware driver.
- Specifies the number of buffers allocated for CD-ROM access.
- Continues processing CONFIG.SYS directives from a different file or label.
- Sets the type of system clock in use.
- Clears the display screen.
- Assigns OEM codepages for character encoding.
- Specifies CMOS RAM address settings.
- Defines color schemes for boot menus.
- , ;, ;, ;
- Configure count, order, I/O addresses, and timeout values for COM ports (applicable in DR-DOS 7.02+).
- Designates buffer allocation for Direct Memory Access (DMA) operations (PTS-DOS).
- Allows redefinition of inline comment characters or causes subsequent lines to be ignored (behavior varies by operating system).
- Enables and configures internationalization support (varies across OS implementations).
- , ;, ;CPU-related directives manage cursor positioning, codepage switching, or conditional execution based on CPU type (dependent on OS).
DTemplate:NbndF
- Controls relocation settings for drive descriptor tables.
- Specifies memory segment address used for multi-sector disk data deblocking.
- Activates internal debugger features.
- Manages boot menu options.
- Loads device drivers into memory space.
- Loads device drivers into upper memory areas (similar to in DRDOS 5.0).
- Sets country and codepage information for keyboard, screen, and printer devices.
- Configures sizes for cache memory allocation.
- Determines floppy disk compatibility modes.
- Selects display font parameters.
- Manages loading DOS into high memory and utilization of upper memory blocks (comparable to in DRDOS 5.0).
- Loads DOS-related tables such as BUFFERS, FCBS, FILES, LASTDRIVE, and STACKS into upper memory regions.
- Specifies an alternative directory path for DOS system files.
- Defines search paths for data files used by DOS commands and utilities.
- Describes parameters for physical disk drive configurations.
- Sets parameters applicable to unrecognized or unknown drives.
- Refer to for additional information.
- Enables error logging with PDUMP.nnn files and specifies target drives for these logs.
- Displays text messages on-screen during processing.
- Shows messages incorporating ANSI escape sequences for enhanced formatting.
- Adds extra validation checks when launching programs from CONFIG.SYS or related scripts.
- Assigns assumed error or return codes to subsequent commands executed by DOS.
- Controls A20 gate state settings upon program startup to manage memory addressing beyond 1MB boundary.
- Terminates CONFIG.SYS processing prematurely except for SWITCHES and SHELL commands that must still execute.
- Defines hash table size used to accelerate file open operations (differs from external FASTOPEN drivers in MS-DOS/PC DOS).
- Specifies how many File Control Blocks can be cached simultaneously (shares buffer space with FILES under DR-DOS).
- Similar to FCBS but loads these structures into upper memory areas to conserve conventional memory.
- Boot manager control directive affecting boot sequence handling.
- Sets maximum number of files that can be opened concurrently by DOS processes.
- Functions like FILES but loads file handles into upper memory regions rather than conventional memory space.
- Includes execution of specific subsections within CONFIG.SYS files as designated by IGNORE command.
GTemplate:NbndI
- Pauses for a key press or timeout, setting the error level to the ASCII value 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 additional details.
- See also .
- Consult .
- Refer to or for related information.
- See or for further guidance.
- Consult .
- Loads a TSR program into memory following relocation of the DOS data segment. Compare with INSTCDEX.
- Refer to , , or for more information.
- See also .
- Consult or as applicable.
- Activates console and command line history buffering with advanced pattern search capabilities.
- Designates the HMA segment address.
- Configures the HLT power-saving mode.
- Enables checks for boot sector viruses.
- Loads installable file systems into memory.
- Prevents execution of specific CONFIG.SYS subsections.
- Grants certain programs permission to run at ring 2, allowing direct hardware I/O access.
- Incorporates directives from another menu block (emulated 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 (similar to HIINSTALL in DR DOS 5.0).
- Installs a TSR program after relocating the DOS data segment (see also INSTCDEX).
- Adjusts PIC interrupt priorities to assign the highest priority to a specified IRQ number.
KTemplate:NbndM
- Defines the keyboard layout configuration.
- Sets the address for the relocated keyboard buffer.
- Specifies the maximum number of accessible drives.
- Functions like LASTDRIVE but loads Current Directory Structure into upper memory.
- Lists paths for DLL searches.
- Manages compatibility for legacy programs.
- Sets the number of file locks permitted.
- Configures support for boot logos.
- Specifies count, order, I/O address, and timeout settings for LPT1 device.
- Applies identical settings as LPT1 for LPT2 device.
- Applies identical settings as LPT1 for LPT3 device.
- Enables and configures LPT4 device similarly to others.
- Sets delay before increasing process priority.
- Determines memory allocation strategy parameters.
- Defines default DOS memory allocation values.
- Configures menu options settings.
- Specifies menu colors (can be emulated under DR-DOS).
- Sets default menu block (emulatable in DR-DOS).
- Defines menu blocks (emulation supported in DR-DOS).
- Enables multitrack disk operation support.
- Continues CONFIG.SYS processing from a new file after loading a device driver and setting %NEWFILE% environment variable.
NTemplate:NbndQ
- Sets the default No () character used in Yes/No/Resume prompts.
- Determines whether keyboard [[Num Lock|Template:Keypress]] is enabled or disabled.
- Enables conditional execution based on the last error code, such as .
- Displays text and waits for key input, similar to and commands in DR-DOS.
- Requires user confirmation of errors occurring in CONFIG.SYS processing.
- Configures buffer sizes for LPT1, LPT2, and LPT3 devices.
- Enables conditional execution on PC-compatible systems.
- Sets scheduling priority levels.
- Assigns priority to disk I/O applications.
- Changes default printer device driver (e.g., switching from LPT1 to LPT3 or LPT4).
- Specifies whether DOS programs are permitted to execute.
- Loads the user interface shell environment.
- Conditional execution tailored for IBM PS/1-compatible systems.
- Conditional execution tailored for IBM PS/2-compatible systems.
- Suppresses display output sent to STDOUT.
RTemplate:NbndT
- Activates automatic system reboot when errors occur.
- Permits inclusion of comments within CONFIG.SYS files.
- Allocates a drive letter to local block device drivers.
- Defines the default character for Resume () prompts in Yes/No/Resume queries.
- Enables nested CONFIG.SYS processing to return to the previous GOSUB or SWITCH point with an optional 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 and OS/2.
- Determines whether the first character of deleted files is preserved in the FAT reserved area.
- Sets video mode under FreeDOS and screen access methods under PTS-DOS.
- Controls the keyboard Scroll Lock status, turning it on or off.
- Assigns environment variables.
- Loads the command interpreter shell.
- Functions like SHELL but supports a SIZE parameter to pre-allocate COMMAND.COM into HMA or UMBs, enhancing memory efficiency with third-party shells.
- Defines keyboard modifier states such as Shift Lock, Num Lock, Scroll Lock, and Insert mode.
- Determines whether files close upon pressing Ctrl+Alt+Del.
- Specifies whether POST is bypassed during reboot.
- , STACKSIZE, STACKSHIGH
- Configure stack settings across various DOS systems for handling hardware interrupts and memory management, with some parameters ignored in newer releases or specific environments.
- , SYSBOOT, SYSGEN, SYSLOAD
- PTS-DOS commands used for managing boot configurations, system memory layouts, and alternative boot sources.
- , SWITCH
- Establishes submenu blocks and conditional nested processing of CONFIG.SYS with RETURN support (available from DR DOS 6.0 onwards).
- , SWAPPATH
- OS/2-specific options for defining error log drive and swap file locations.
- , SWITCHES
- Sets the default switch character ('/' or '-') and special options applicable to DOS variants excluding PTS-DOS.
- , THREADS, TIMESLICE
- OS/2 performance tuning parameters including activation of FPU bug fixes, thread quantity control, and scheduler time slice adjustments.
- , TRACE, TRACEBUF
- Manage timeouts for CONFIG.SYS commands (in DR-DOS and PTS-DOS), enable single-step execution globally or locally, and specify trace log buffer size (also relevant for OS/2).
- , TRAPDUMP
- Defines temporary file extensions in PTS-DOS and supports error logging features in OS/2.
UTemplate:NbndZ
- Designates a specific segment for use as Upper Memory Block (UMB) memory in DOS.
- Configures the UMB server functionality.
- Identifies address ranges allocated as UMB RAM.
- Toggles disk write verification on or off.
- Specifies the DOS version reported to software applications.
- Manages VGA display status settings.
- Sets the active video mode.
- Enables virtual DMA capabilities.
- Controls processor Virtual Mode Extensions (VME).
- Configures VxD drivers for Windows environments.
- Adjusts Windows system support parameters.
- Handles relocation of the Extended BIOS Data Area (EBDA).
- Executes conditionally on XT-compatible hardware platforms.
- Manages Year 2000 compatibility support.
- Defines the default character used for Yes responses in prompts.
- Maintains tracking of file deletions.
Issues
Although the system can initiate booting without CONFIG.SYS or AUTOEXEC.BAT files present, these configuration files remain vital for comprehensive operating system customization and meeting application demands. Any corruption or damage requires appropriate troubleshooting measures.
When CONFIG.SYS lacks a SHELL directive or is absent/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 it is missing. However, MS-DOS 6.0/PC DOS 6.1 and Novell DOS 7 and later versions prompt users to specify a command processor path. This prompt also appears if the primary command interpreter terminates unexpectedly or exits intentionally, providing a limited runtime shell replacement without needing a reboot.
COMMAND.COM from MS-DOS 7.0 onwards is incompatible with DR-DOS but is often found in the C: root directory during dual-boot configurations. Starting with DR-DOS 7.02, SHELL directives are enforced during skip/trace/step modes to prevent bypassing—an issue common in earlier releases. Additional key combinations were introduced to recover from invalid SHELL arguments by prompting users for a valid shell filename before loading COMMAND.COM.
CONFIG.SYS file size limitations differ between systems: MS-DOS/PC DOS restricts it (up to 64 KB in later versions), whereas DR-DOS imposes no size restrictions beyond those dictated by the underlying file system. MS-DOS compiles CONFIG.SYS into a tokenized structure sorted by directive type in memory, while DR-DOS processes each directive sequentially as read. This approach grants precise control over driver and TSR loading order through DEVICE and INSTALL commands, facilitating conflict resolution and debugging by adjusting load sequences and incorporating temporary programs during startup.
In MS-DOS/PC DOS versions 2.0 through 4.01, the maximum length for SHELL command lines was limited to 31 characters, later extended up to 128 characters. DR-DOS accepts up to 255 characters for this directive. It should be noted that CONFIG.SYS directives do not support long file names.
Dual Booting DOS and Windows 9x
During the installation of Windows 95 over a pre-existing DOS/Windows environment, the files CONFIG.SYS and AUTOEXEC.BAT are renamed to CONFIG.DOS and AUTOEXEC.DOS to enable dual boot functionality between Windows 9x and DOS. When the system boots into DOS, these files are temporarily reverted to their original names. Meanwhile, the versions used by Windows 95 are backed up under the names CONFIG.W40 and AUTOEXEC.W40.
In setups where Caldera DR-DOS 7.02/7.03 is installed alongside Windows 95, the Windows CONFIG.SYS and AUTOEXEC.BAT files remain intact, whereas DR-DOS utilizes DCONFIG.SYS and AUTODOS7.BAT for its startup configuration.
OS/2 / Windows NT
OS/2 depends extensively on CONFIG.SYS for loading drivers and setting environment parameters before initiating its graphical user interface.
Within the OS/2 subsystem of Windows NT, what OS/2 applications perceive as CONFIG.SYS is actually maintained inside the Windows registry.
OS/2 includes a variety of undocumented CONFIG.SYS commands, reflecting its intricate configuration requirements.
CONFIG.SYS continues to be a fundamental component 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
- Guide to FreeDOS CONFIG.SYS directives
- PTS-DOS 2000 Pro User Manual with CONFIG.SYS directive details
- German unofficial PTS-DOS FAQ (PTS/FAQD) including additional CONFIG.SYS directives