DISKETTE (CONFIG.SYS directive)
| Company type | Configuration file |
|---|---|
| Industry | Computer software |
| Founded | 1983 |
| Products | Configuration file for DOS and OS/2 |
CONFIG.SYS serves as the principal configuration file for the DOS and OS/2 operating systems. This plain text file, written in ASCII, holds setup commands that are interpreted by the DOS BIOS—usually within IBMBIO.COM or IO.SYS—during the system startup process. CONFIG.SYS was first introduced with DOS version 2.0.
Usage
The directives inside CONFIG.SYS are utilized to configure DOS settings related to hardware devices, software applications, and memory allocation. Once CONFIG.SYS has been processed, DOS initiates the command interpreter specified by the SHELL directive; if this is missing, it defaults to COMMAND.COM, which then executes AUTOEXEC.BAT.
Typically, the file is composed of name=value pairs that either define configuration parameters or load specific files such as device drivers and terminate-and-stay-resident (TSR) programs. CONFIG.SYS is located in the root directory of the bootable drive.
The CONFIG.SYS filename is also recognized by (DCP), an MS-DOS variant developed by the East-German company VEB Robotron.
In certain DOS derivatives, alternative filenames take precedence over CONFIG.SYS:
- Advanced editions of Concurrent DOS 386, Concurrent DOS XM, Multiuser DOS, System Manager, and REAL/32 adopt CCONFIG.SYS instead, supporting enhanced configuration options stored in a binary file named CCONFIG.BIN, which is commonly edited using CONFIG.EXE.
- Versions of DR DOS starting from 3.31, including PalmDOS, Novell DOS, and OpenDOS, prioritize DCONFIG.SYS, facilitating multi-boot environments and disk compression setups.
- OpenDOS 7.01 and DR-OpenDOS 7.02 additionally search for ODCONFIG.SYS, while some DR-DOS releases also look for DRCONFIG.SYS.
- From DR DOS 6.0 onward, users can modify default system file extensions through SYS /DR:ext, allowing multiple system files with different extensions to coexist in a single root directory managed by boot loaders like LOADER.
- The SHELL command supports specifying alternative AUTOEXEC.BAT scripts using /P[:filename.ext], a feature also supported by 4DOS.
- DR DOS offers a CHAIN=filespec directive to continue processing another configuration file, optionally using a label parameter to jump to specific sections.
- Starting with DR-DOS 7.03, the command SYS /A can copy CONFIG.SYS and AUTOEXEC.BAT files alongside other system files.
Other DOS variants employ distinct configuration filenames: FDCONFIG.SYS for FreeDOS, RXCONFIG.SYS for RxDOS version 7.24 and above, and CONFIG.PTS for PTS-DOS.
In Windows 95 and Windows 98, both CONFIG.SYS and AUTOEXEC.BAT reside in the root directory of the boot drive but are generally left empty. Windows Me does not process CONFIG.SYS during startup; instead, it loads environment variables directly from the Windows Registry at:
- HKLM\System\CurrentControlSet\Control\SessionManager\Environment
For FlexOS, CONFIG.SYS is a binary file that specifies resource managers and device drivers to be loaded during initialization.
Example
Below is an example configuration of CONFIG.SYS for MS-DOS version 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 that can be targeted by , , , , and commands.
- Functions like , but additionally allows inline comments following other directives in CONFIG.SYS. (Note that in MS-DOS/PC DOS, inline comments are not ignored if enclosed within double quotes.)
- Used at the start of inline comments alongside ;.
- Prompts a Yes/No confirmation before executing subsequent CONFIG.SYS commands. (FreeDOS does not support custom messages but allows conditional execution via boot menus.)
- Forces unconditional execution of the next directive in CONFIG.SYS.
ATemplate:NbndC
- Determines whether programs can be terminated upon encountering errors.
- Defines which drives record file access timestamps within FAT file systems.
- Enables conditional execution on AT-compatible hardware.
- Manages the boot loader functionality.
- Adjusts the verbosity level of error messages.
- Alters the default internal serial device driver assigned to the AUX port.
- Prevents character devices from being accessible outside the virtual \DEV directory.
- Loads a fundamental device driver into system memory.
- Produces a brief beep sound even if sound notifications are disabled.
- Indicates the operating system to launch next during boot.
- Enables or disables extended Ctrl+C interrupt checking.
- Determines the quantity of disk buffers to allocate.
- Functions similarly to BUFFERS but loads buffers into High Memory Area (HMA) or Upper Memory Blocks (UMB).
- , CACHETTL, CACHEFLUSH (Embedded DOS 6-XL only)
- Control cache block allocation and timing for flushing operations.
- Executes programs listed in CONFIG.SYS in the foreground, pausing further processing until completion.
- (DR-DOS 7.02+)
- Sets keyboard Caps Lock state to on or off.
- , CDDBUFFERS (PTS-DOS only)
- Defines CD-ROM driver name along with buffer quantity.
- (DR DOS 5.0+, Embedded DOS)
- Continues processing CONFIG.SYS from a new file or label section.
- , CLS, CODEPAGE (PTS-DOS or OS/2)
- Configure clock type, clear display screen, and assign OEM codepages respectively.
- , COLOR (PTS-DOS only)
- Sets CMOS RAM address and defines colors for the boot menu interface.
- , COM2, COM3, COM4 (DR-DOS 7.02+)
- Specifies parameters for serial devices including I/O addresses and timeout settings.
- , COMMENT(S), COUNTRY, CPOS, CPSW (various DOS versions)
- Manage DMA buffers, inline comments, internationalization support, cursor positioning, and codepage switching capabilities respectively.
- CPU and CPU-specific directives (PTS-DOS and DR-DOS) allow conditional execution based on CPU model or features.
DTemplate:NbndF
- Adjusts relocation settings for drive descriptor tables.
- Specifies memory segment address used for multi-sector disk data deblocking processes.
- Activates internal debugger support features.
- Controls boot manager operations.
- Loads device drivers into memory space.
- Loads device drivers into upper memory areas, similar to in DRDOS 5.0.
- Configures country and codepage settings for keyboard, screen, and printer devices.
- Sets cache memory size parameters.
- Defines floppy disk compatibility modes.
- Selects display font characteristics.
- Manages loading of DOS into high memory and utilization of upper memory blocks.
- Specifies loading of DOS internal tables such as BUFFERS, FCBS, FILES, LASTDRIVE, STACKS into upper memory regions.
- Indicates alternative directory paths for DOS system files.
- Defines search paths for data files used by the system.
- Specifies physical parameters for disk drives.
- Sets configuration details for unknown or unsupported drives.
- Refer to for additional information.
- Enables PDUMP.nnn error log generation and assigns drive location for storage.
- Displays a message on the screen during processing.
- Outputs messages that include ANSI escape sequences for formatting purposes.
- Enforces extra validation checks when launching programs.
- Assigns a presumed error or return code for subsequent commands or operations.
- Sets the A20 gate line state prior to program execution.
- Terminates CONFIG.SYS processing prematurely except for certain specified directives.
- Configures hash table size to optimize file open operation speed, differing from MS-DOS/PC DOS FASTOPEN driver behavior.
- Defines how many File Control Blocks (FCBs) can be cached simultaneously (shares buffer space with FILES in DR-DOS).
- Similar to FCBS but loads FCBs into upper memory areas instead of conventional memory.
- Boot manager control directive.
- Sets maximum number of files that can be opened at once by the system.
- Equivalent to FILES but loads file handles into upper memory regions rather than conventional memory space.
- Allows execution of specific CONFIG.SYS subsections as defined by IGNORE directive.
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 processing of CONFIG.SYS at a designated label.
- Continues nested CONFIG.SYS processing at a specified label, returning afterwards to the prior location.
- Refer to , , or for additional details.
- Consult for further information.
- See for more context.
- Refer to or for related topics.
- See or for further explanation.
- Consult as well.
- Loads TSR programs similarly to , but after relocating the DOS data segment. Compare with INSTCDEX.
- Refer to , , or for more details.
- See .
- Consult or for further guidance.
- Activates console and command line history buffer with advanced pattern search capabilities.
- Defines the address of the High Memory Area (HMA) segment.
- Configures the HLT instruction’s energy-saving mode.
- Enables scanning for boot sector viruses.
- Loads installable file system drivers.
- Prevents execution of specified CONFIG.SYS subsections (also see ).
- Permits programs to operate at CPU ring 2, allowing direct hardware I/O access.
- Incorporates directives from another menu block (emulatable using GOSUB/RETURN in DR-DOS).
- Sets the keyboard’s Insert mode status.
- Installs TSR programs into memory space.
- Loads TSR utilities into upper memory areas (similar to HIINSTALL in DR DOS 5.0).
- Installs TSR programs following relocation of the DOS data segment (compare INSTCDEX).
- Adjusts PIC interrupt priorities, assigning highest priority to a specified IRQ line.
KTemplate:NbndM
- Defines the keyboard layout configuration.
- Sets the relocated keyboard buffer’s memory address.
- Specifies the maximum number of accessible drives.
- Functions like LASTDRIVE but also loads the Current Directory Structure into upper memory.
- Lists directories included in DLL search paths.
- Controls execution behavior of legacy applications.
- Determines the number of file locks allowed.
- Configures display options for boot logos and startup messages.
- Specifies count, order, I/O port address, and timeout parameters for LPT1 device.
- Sets count, order, I/O port address, and timeout values for LPT2 device.
- Defines count, order, I/O port address, and timeout settings for LPT3 device.
- Enables and configures LPT4 device with similar parameters.
- Establishes wait time before elevating process priority level.
- Adjusts memory allocation strategy settings.
- Specifies default method for DOS memory allocation management.
- Defines available menu options within CONFIG.SYS.
- Sets color schemes for menus (emulatable under DR-DOS).
- Designates default menu block (emulatable under DR-DOS).
- Defines menu blocks structure (emulatable under DR-DOS).
- Activates multitrack disk operation capability.
- Continues CONFIG.SYS processing using a new file after loading a device driver and setting %NEWFILE% environment variable.
NTemplate:NbndQ
- Sets default No () character used in Yes/No/Resume prompts.
- Controls keyboard [[Num Lock|Template:Keypress]] state—on or off by default.
- Enables conditional execution based on previous error code, such as .
- Displays text and pauses until a key is pressed, similar to DR-DOS commands and .
- Requires user confirmation upon encountering errors during CONFIG.SYS processing.
- Configures buffer size parameters for LPT ports.
- Enables conditional execution on PC-compatible systems.
- Sets configurations for priority scheduling of processes.
- Modifies priority levels assigned to disk I/O programs.
- ; Changes default printer device driver among LPT1 through LPT4 options.
- ; Restricts execution of DOS programs under certain conditions.
- ; Loads a user interface shell environment.
- ; Enables conditional execution on IBM PS/1-compatible hardware platforms.
- ; Enables conditional execution on IBM PS/2-compatible hardware platforms.
- ; Suppresses output sent to STDOUT.
RTemplate:NbndT
- Activates automatic system reboot upon encountering errors.
- Permits inclusion of comments within CONFIG.SYS files.
- Allocates a drive letter for local block device drivers.
- Defines the default character used for Resume () prompts.
- Returns control from nested CONFIG.SYS processing to the previous GOSUB or SWITCH point, optionally with a return code.
- Specifies the size of real mode memory available.
- Enables concurrent loading of programs within CONFIG.SYS, functioning similarly to CALL or INSTALL commands in DOS.
- Saves the initial character of deleted files in the FAT reserved space.
- Determines video mode on FreeDOS or screen access method on PTS-DOS.
- Configures the keyboard’s Scroll Lock state, either on or off.
- Establishes environment variables for the session.
- Loads the command interpreter shell program.
- Similar to SHELL but supports pre-allocating memory size for relocating COMMAND.COM into HMA or UMBs, enhancing memory usage with third-party shells.
- Sets keyboard modifier keys such as Shift Lock, Num Lock, Scroll Lock, and Insert mode states.
- Controls whether files are closed automatically when pressing Ctrl+Alt+Del.
- Bypasses POST during the reboot sequence.
- , STACKSIZE, STACKSHIGH
- Configure interrupt stack sizes and buffer locations across various DOS versions and embedded systems with specialized memory management capabilities.
- , SYSBOOT, SYSGEN, SYSLOAD, SYSTOUMB
- PTS-DOS-specific commands managing boot procedures, system memory allocations, alternative boot file usage, and loading into upper memory blocks (UMBs).
- , SWITCH, SWITCHES
- Facilitate conditional processing and submenu blocks within CONFIG.SYS across multiple DOS variants, with some restrictions in DR-DOS and FreeDOS implementations.
- , SWAPPATH, THREADS, TIMESLICE
- OS/2-specific parameters controlling error logging suppression, swap file directory paths, concurrent thread limits, and scheduler time slice settings.
- , TRACE, TRACEBUF
- Manage execution timeouts and logging buffers for CONFIG.SYS primarily in DR-DOS, PTS-DOS, and OS/2 platforms.
- Additional PTS-DOS options such as TMPEXT (temporary file extensions), STUBA20 (XMS A20 gate control), SXFAKEHWFPU (FPU bug workaround), TRAPDUMP (error logging), among others support advanced system configurations.
UTemplate:NbndZ
- Assigns a particular segment for use as UMB memory under DOS management.
- Selects the UMB server implementation to be utilized.
- Defines address ranges designated as UMB RAM areas.
- Toggles disk write verification on or off.
- Sets the DOS version string reported to applications.
- Controls VGA display status settings.
- Indicates the current video mode configuration.
- Enables or disables virtual DMA capabilities.
- Determines whether processor Virtual Mode Extensions (VME) are deactivated.
- Configures VxD driver parameters for Windows environments.
- Sets system support options related to Windows operation.
- Manages relocation of the Extended BIOS Data Area (XBDA).
- Executes conditionally on XT-compatible hardware platforms.
- Enables built-in Year 2000 compliance features.
- Specifies the default affirmative character used in prompts.
- Configures tracking of file deletion events.
Issues
While the system can initiate booting without CONFIG.SYS or AUTOEXEC.BAT files present, these components are critical for comprehensive operating system customization and meeting software requirements. Damage or loss of these files necessitates troubleshooting efforts.
If a SHELL directive is missing from CONFIG.SYS or if CONFIG.SYS itself is absent or corrupted, DOS attempts to locate COMMAND.COM in the root directory of the boot drive. Earlier DOS releases will fail to boot without this file. However, MS-DOS 6.0/PC DOS 6.1 and Novell DOS 7 and later versions prompt users to specify an alternative command interpreter path. This prompt also appears if COMMAND.COM is aborted or exited deliberately at runtime, allowing temporary replacement of the shell without rebooting.
COMMAND.COM from MS-DOS version 7.0 and above is incompatible with DR-DOS systems but often remains installed in C:\ during dual-boot scenarios. DR-DOS version 7.02 and later prevent bypassing SHELL directives when using skip/trace/step modes to avoid conflicts. Subsequent updates partially restored skip functionality to recover from invalid SHELL arguments. If no SHELL directive is detected during skipping of CONFIG.SYS processing, users must manually enter a valid shell filename before COMMAND.COM loads.
The size of CONFIG.SYS is restricted to several kilobytes in MS-DOS/PC DOS (with a maximum of up to 64 KB in newer editions) but remains unlimited under DR-DOS except for filesystem constraints. MS-DOS converts CONFIG.SYS into a tokenized form stored in memory that organizes directives by type—device drivers precede TSRs. Conversely, DR-DOS processes directives sequentially line-by-line, allowing exact control over load order using DEVICE and INSTALL commands. This approach aids in resolving driver conflicts and facilitates debugging. The INSTALL command can also execute non-resident programs integrated into CONFIG.SYS processing.
From MS-DOS/PC DOS versions 2.0 through 4.01, the maximum length of a SHELL command line was limited to 31 characters. Later versions extended this limit up to 128 characters while DR-DOS supports lengths up to 255 characters. It should be noted that CONFIG.SYS directives do not support long filenames.
Dual Booting DOS and Windows 9x
During the installation of Windows 95 over a pre-existing DOS or Windows environment, the system renames CONFIG.SYS and AUTOEXEC.BAT to CONFIG.DOS and AUTOEXEC.DOS to enable dual boot functionality between Windows 9x and DOS. When the system boots into DOS mode, these files are temporarily reverted to CONFIG.SYS and AUTOEXEC.BAT. Meanwhile, backup copies of the Windows 95 versions are saved as CONFIG.W40 and AUTOEXEC.W40.
In cases where Caldera DR-DOS 7.02 or 7.03 is installed alongside Windows 95, the original CONFIG.SYS and AUTOEXEC.BAT files used by Windows remain untouched. Instead, DR-DOS employs its own startup scripts named DCONFIG.SYS and AUTODOS7.BAT.
OS/2 / Windows NT
OS/2 relies heavily on CONFIG.SYS for loading drivers and setting up the environment prior to launching its graphical user interface.
Within the OS/2 subsystem found in Windows NT, the configuration typically stored in CONFIG.SYS is instead maintained within the system registry rather than as a separate file.
There are numerous CONFIG.SYS commands specific to OS/2 that are not officially documented.
The use of CONFIG.SYS continues 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
- Information on AUTOEXEC.BAT and CONFIG.SYS – Computer Hope
- Overview of CONFIG.SYS directives in Windows 98 / MS-DOS 7.10
- Caldera’s CONFIG.SYS Command Reference (partial list of DR-DOS 7 directives)
- Details on FreeDOS CONFIG.SYS commands
- PTS-DOS 2000 Pro User Guide including CONFIG.SYS entries (partial)
- Unofficial German PTS-DOS FAQ (PTS/FAQD) from 2004 with additional CONFIG.SYS directives