KEYBOARD (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 main configuration file for DOS and OS/2 operating systems. This plain text file in ASCII format holds configuration commands that the operating system's DOS BIOS—usually found in IBMBIO.COM or IO.SYS—interprets during the boot sequence. CONFIG.SYS was first introduced with DOS version 2.0.
Usage
The directives within CONFIG.SYS tailor DOS settings for hardware devices, software applications, and memory allocation. Once CONFIG.SYS has been processed, DOS proceeds to load the command interpreter specified by the SHELL directive; if none is defined, it defaults to COMMAND.COM. Following this, the shell executes the commands listed in the AUTOEXEC.BAT file.
Primarily, this file consists of name=value instructions that set adjustable parameters or initiate loading of device drivers and terminate-and-stay-resident (TSR) programs into memory.
In DOS systems, CONFIG.SYS is located in the root directory of the bootable drive.
The same filename is also utilized by (DCP), a variant of MS-DOS developed by the former East German company VEB Robotron.
Certain DOS derivatives check for alternative configuration filenames, which take precedence over CONFIG.SYS:
- Advanced editions of Concurrent DOS 386, Concurrent DOS XM, Multiuser DOS, System Manager, and REAL/32 prioritize CCONFIG.SYS (denoting "Concurrent") instead of CONFIG.SYS. Some Multiuser DOS releases employ CCONFIG.INI, while REAL/32 looks for MCONFIG.SYS. These platforms store extra configuration data in CCONFIG.BIN, generally edited via CONFIG.EXE.
- From version 3.31 onwards, including PalmDOS 1.0, Novell DOS 7, OpenDOS 7.01, and DR-DOS 7.02+, DR DOS favors DCONFIG.SYS (derived from "DR DOS") over CONFIG.SYS to support disk compression and multi-boot environments.
- OpenDOS 7.01 and DR-OpenDOS 7.02 also scan for ODCONFIG.SYS, with some DR-DOS 7.02+ variants additionally checking for DRCONFIG.SYS.
- Starting with DR DOS 6.0, users can modify default configuration file extensions using SYS /DR:ext, allowing multiple system files to coexist and be selected by boot loaders such as LOADER.
- The SHELL command permits specifying alternate AUTOEXEC.BAT files through /P[:filename.ext], and COMMAND.COM accepts extensions other than .BAT in this context (a feature also supported by 4DOS).
- Beginning with DR-DOS 6.0, the CHAIN=filespec directive enables continuation to another configuration file, optionally targeting specific labels with CHAIN=filespec,label.
- DR-DOS 7.03+ introduces SYS /A, which copies CONFIG.SYS and AUTOEXEC.BAT alongside system files during setup.
FreeDOS employs a similar configuration file named FDCONFIG.SYS; RxDOS versions 7.24 and above use RXCONFIG.SYS; while PTS-DOS relies on CONFIG.PTS.
Although both CONFIG.SYS and AUTOEXEC.BAT reside in the root directory of Windows 95 and Windows 98 boot drives, these files are generally left blank.
Unlike its predecessors, Windows Me does not process CONFIG.SYS at startup; instead, it loads environment variables directly from the Windows Registry at HKLM\System\CurrentControlSet\Control\SessionManager\Environment.
In contrast, under FlexOS, CONFIG.SYS is a binary format file that specifies resource managers and device drivers to be 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>
:;*?!
- Marks labels within CONFIG.SYS to serve as jump points for , , , , and .
- Functions similarly to , used for inline commentary after directives. (In MS-DOS/PC DOS, inline comments inside quotes are not disregarded.)
- Introduces inline remarks alongside the ; directive.
- Prompts user with a Yes/No confirmation before executing subsequent CONFIG.SYS commands.[nb 1] (FreeDOS incorporates optional conditions via boot menus.) DOS 6.0 and later versions support a comparable feature by appending after directives, which is also compatible with DR DOS.
- Executes the next directive without conditions.
ATemplate:NbndC
- Determines whether programs can be interrupted upon errors.
- Sets drives to maintain file access timestamps within FAT file systems.
- Enables conditional execution on AT-compatible hardware.
- Manages boot loading.
- Adjusts verbosity of error messages.
- Changes the default serial device driver assigned to the AUX port.
- Prevents character devices from being accessible outside the virtual \DEV directory.
- Loads fundamental device drivers into memory.
- Triggers a beep sound even when notifications are disabled.
- Defines the operating system to be loaded next.
- Enables or disables extended Ctrl+C checking functionality.
- Specifies how many disk buffers should be allocated.
- Similar to BUFFERS but loads disk buffers into HMA or UMB memory areas.
- , , (Embedded DOS 6-XL only)
- Controls cache allocation and flushing intervals.
- Executes programs from CONFIG.SYS, pausing processing until they return control.
- (DR-DOS 7.02+)
- Sets the Caps Lock key status on the keyboard.
- , (PTS-DOS only)
- Configures CD-ROM driver parameters and buffer sizes.
- (DR DOS 5.0+, Embedded DOS)
- Continues parsing CONFIG.SYS from a new file or label location.
- , , and other PTS-DOS commands adjust system clock type, clear screen behavior, and more.
- (OS/2 only)
- Specifies OEM codepage configurations.
- , ..., (DR-DOS 7.02+)
- Sets up serial COM ports including I/O addresses and timeout values.
- , (DOS 4.0+ and RxDOS) redefine inline comment characters or ignore specific lines based on DOS variant rules.
- , (DOS 3.0+, DOS Plus 2.1, DR DOS 3.31+, OS/2) enable internationalization and configure related settings.
- CPU-specific directives (CPU88, CPU86, CPU286, CPU386, CPU486, etc.) apply conditional execution depending on CPU type (PTS-DOS and DR-DOS).
DTemplate:NbndF
- Configures relocation of drive descriptor tables in memory.
- Defines memory segment address for multi-sector disk data deblocking operations.
- Activates internal debugger support features.
- Manages boot loading processes.
- Loads device drivers into conventional memory areas.
- Loads device drivers into upper memory blocks (equivalent to in DRDOS 5.0).
- Sets country and codepage information for keyboard, screen, and printer devices.
- Adjusts cache memory size settings.
- Specifies compatibility modes for floppy disk drives.
- Determines display font selection.
- Controls whether DOS loads into high or upper memory regions (similar to in DRDOS 5.0).
- Loads DOS internal tables such as BUFFERS, FCBS, FILES, LASTDRIVE, STACKS into upper memory areas.
- Defines alternative paths for DOS system files.
- Specifies search paths for data files used by DOS utilities and drivers.
- Describes physical characteristics of disk drives to the system.
- Sets parameters for drives that are not natively recognized by DOS.
- Refer to .
- Enables PDUMP error logging and designates the target drive for logs PDUMP.nnn files.
- Displays text messages on screen during processing.
- Displays messages including ANSI escape sequences for enhanced formatting.
- Specifies additional checks when launching programs to ensure proper execution conditions.
- Defines expected error or return codes for subsequent commands in CONFIG.SYS scripts.
- Controls A20 gate state during program startup to manage memory addressing modes.
- Terminates CONFIG.SYS parsing early except when SWITCHES and SHELL directives must still be processed under certain circumstances.
- Sets hash table size used for accelerating file opening operations, differing from 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).
- Functions like FCBS but loads these structures into upper memory areas instead of conventional memory.
- Boot management directive controlling startup sequence behavior.
- Defines maximum number of files that can be open at once in the system environment.
- Similar to FILES but loads file handle tables into upper memory blocks for optimization purposes.
- Includes execution of designated subsections within CONFIG.SYS scripts (see IGNORE directive).
GTemplate:NbndI
- Waits for a keystroke or timeout, then sets 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 execution at a specified label, returning afterward to the original point.
- Refer to , , or for additional details.
- Consult for further information.
- See also .
- Refer to or for related commands.
- Consult or for more context.
- Additional information available in .
- Loads a TSR program into memory following DOS data segment relocation; compare with INSTCDEX.
- See , , or for related functions.
- Refer to for more details.
- See or for related utilities.
- Activates and configures the console and command line history buffer, including pattern search capability.
- Defines the address of the HMA segment.
- Configures energy-saving settings for the HLT instruction.
- Specifies system verification for boot sector virus detection.
- Loads installable file system drivers.
- Prevents execution of specified subsections within CONFIG.SYS.
- Permits certain programs to operate at ring 2, granting direct hardware I/O access.
- Incorporates directives from an alternate menu block, emulated via GOSUB/RETURN in DR-DOS.
- Sets the status of the keyboard Insert mode.
- Installs a TSR program into memory.
- Loads a TSR program into upper memory, functioning like HIINSTALL in DR-DOS 5.0.
- Installs TSR programs after relocating the DOS data segment, similar in function to INSTALL.
- Adjusts PIC interrupt priorities by rotating them to assign highest priority to a specified number.
KTemplate:NbndM
- Defines the keyboard layout configuration.
- Specifies the relocated address of the keyboard buffer.
- Sets the maximum number of accessible drives.
- Similar to LASTDRIVE, but additionally loads Current Directory Structure into upper memory.
- Lists paths used for DLL searching.
- Manages compatibility with legacy programs.
- Sets the quantity of file locks allowed.
- Enables support for boot logos with PTS-DOS boot manager integration.
- Configures count, sequence, I/O address, and timeout values for the LPT1 device.
- Equivalent configuration parameters applied to LPT2 device as with LPT1.
- Same configuration settings as LPT1 applied to LPT3 device.
- Enables and configures LPT4 device functionality.
- Determines delay before elevating process priority during wait states.
- Configures strategy for memory allocation management.
- Specifies default DOS memory allocation approach.
- Defines menu options available to users.
- Sets menu color schemes, emulatable under DR-DOS environments.
- Designates default menu block, with emulation support in DR-DOS.
- Defines individual menu blocks (emulatable under DR-DOS).
- Activates multitrack disk operation capabilities.
- Continues CONFIG.SYS processing within a new file, optionally after loading a device driver and setting the %NEWFILE% environment variable.
NTemplate:NbndQ
- Sets default No () response character used in Yes/No/Resume prompts.
- Enables or disables keyboard [[Num Lock|Template:Keypress]] status at startup.
- Allows conditional execution based on the last error code (e.g., ).
- Displays text and waits for a key press, similar in function to and commands in DR-DOS.
- Requires user confirmation of errors encountered during CONFIG.SYS processing.
- Configures buffer size parameters for LPT ports.
- Enables conditional execution on PC-compatible systems only.
- Adjusts parameters of the priority scheduler system.
- Modifies priority levels assigned to disk I/O-related programs.
- Changes default printer device driver assignment among LPT1 through LPT4 devices.
- Controls whether DOS applications are permitted to run on the system.
- Loads a user interface shell environment.
- Enables conditional execution specific to IBM PS/1-compatible machines only.
- Enables conditional execution specific to IBM PS/2-compatible machines only.
- Suppresses output directed to STDOUT.
RTemplate:NbndT
- Activates automatic system reboot upon encountering errors.
- Allows insertion of annotations within CONFIG.SYS files.
- Reserves a drive letter to prevent conflicts with local block devices.
- Establishes the default Resume () character displayed in command prompts.
- Returns control from nested CONFIG.SYS processing back to the previous GOSUB or SWITCH statement, optionally providing a return code.
- Specifies the size of real mode memory available to the system.
- Enables simultaneous loading of programs within CONFIG.SYS, functioning similarly to CALL or INSTALL commands found in other DOS variants.
- Designates storing the first character of deleted files in the FAT's reserved region.
- Sets video display mode (in FreeDOS) or determines screen access techniques (in PTS-DOS).
- Controls the Scroll Lock key status on the keyboard, turning it on or off.
- Assigns environment variables for system use.
- Loads the command interpreter shell into memory.
- Loads the shell with memory pre-allocated in High Memory Area (HMA) or Upper Memory Blocks (UMBs) to reduce fragmentation, supporting a SIZE parameter.
- Defines keyboard modifier states such as Shift Lock, Num Lock, Scroll Lock, and Insert mode.
- Determines whether files are closed automatically upon pressing Ctrl+Alt+Del.
- Skips the Power-On Self Test (POST) during reboot sequences.
- , STACKSIZE, STACKSHIGH
- Configure stacks for hardware interrupts and buffer sizes across different DOS versions, with some directives ignored in particular implementations for compatibility purposes.
- , SYSBOOT, SYSGEN, SYSLOAD, SYSTOUMB
- Specific to PTS-DOS, these commands manage boot manager settings, alternative system loading methods, placement of DOS components in memory, and utilization of upper memory blocks (UMBs).
- , SWITCH
- Used exclusively in DR DOS to define submenu blocks and enable conditional nested processing within CONFIG.SYS scripts with RETURN functionality.
- , SWAPPATH, THREADS, TIMESLICE
- OS/2-only parameters that govern error popup logging, swap file locations, threading concurrency levels, and scheduler time slice durations.
- , SWITCHES
- Specify default switch characters such as '/' or '-' and other special options across various DOS systems, with some ignored under PTS-DOS environments.
- , TRACE, TRACEBUF, TRAPDUMP
- OS/2-specific directives aimed at resolving hardware FPU bugs and enabling or disabling stepwise execution of CONFIG.SYS with detailed logging.
This segment outlines configuration commands applicable to multiple DOS-based operating systems including DR-DOS, PTS-DOS, FreeDOS, Novell DOS, and OS/2. These settings affect critical aspects such as error management, memory allocation schemes, device handling, interface initialization, and boot sequence control—vital elements for enhancing reliability and performance in legacy systems used within professional business contexts.
UTemplate:NbndZ
- Assigns a specific memory segment for use as Upper Memory Block (UMB) space by DOS.
- Sets parameters for the UMB memory management server.
- Defines address ranges allocated for UMB RAM utilization.
- Enables or disables verification of disk writes to ensure data integrity.
- Specifies the version number of DOS reported to applications running on the system.
- Configures VGA display settings and status indicators.
- Determines the active video mode similarly to FreeDOS's SCREEN directive.
- Enables virtual Direct Memory Access (DMA) operations for improved performance.
- Disables the processor’s Virtual Mode Extensions (VME) functionality when required.
- Configures Virtual Device Drivers (VxD) for Windows compatibility.
- Sets system-wide options to support Windows environments effectively.
- Manages relocation settings for the Extended BIOS Data Area (XBDA).
- Allows conditional execution of commands specifically on XT-compatible hardware platforms.
- Enables built-in support addressing Year 2000 (Y2K) compliance issues.
- Defines the default character used for affirmative responses in prompts.
- Configures tracking mechanisms for file deletions.
Issues
Although the system is capable of booting without CONFIG.SYS or if this file becomes corrupted, these configuration files are crucial for thorough operating system customization and meeting specific software demands. When CONFIG.SYS or AUTOEXEC.BAT is damaged, diagnosing and correcting the problem becomes necessary.
In cases where CONFIG.SYS does not include a SHELL directive or is absent or corrupted, DOS attempts to locate COMMAND.COM in the root directory of the boot drive. Earlier DOS versions prior to 6.0 will fail to boot if COMMAND.COM cannot be found. However, MS-DOS 6.0, PC DOS 6.1, and Novell DOS 7 and later versions will prompt the user to specify a path for the command processor. This recovery prompt also appears if the shell terminates unexpectedly or is exited intentionally, offering a limited shell environment without requiring a system restart.
COMMAND.COM from MS-DOS 7.0 and newer is not compatible with DR-DOS, yet it is commonly placed in the root of drive C: in dual-boot configurations. Starting with DR-DOS 7.02, it is no longer possible to bypass SHELL commands when operating in skip, trace, or step modes; valid shell files must be provided before loading COMMAND.COM from the root directory if no SHELL directive exists.
The maximum size allowed for CONFIG.SYS differs depending on the operating system: MS-DOS and PC DOS versions typically limit it up to 64 KB in later releases, whereas DR-DOS imposes no size restriction beyond what the filesystem permits. MS-DOS processes CONFIG.SYS by compiling it into a tokenized format and executes directives sequentially—loading device drivers before TSR programs. Conversely, DR-DOS parses CONFIG.SYS line-by-line, allowing detailed control over load order through DEVICE and INSTALL commands, which aids in resolving conflicts or debugging driver issues.
Additionally, DR-DOS supports conditional execution based on hardware detection or user input and can incorporate temporary external utilities into the CONFIG.SYS processing sequence using INSTALL. This capability significantly improves system customization options and troubleshooting effectiveness.
Early iterations of MS-DOS restricted the length of the SHELL command line to 31 characters; later editions expanded this limit to 128 characters. DR-DOS allows up to 255 characters for this parameter. It is important to note that CONFIG.SYS directives do not support long file names.
Dual booting DOS and Windows 9x
When Windows 95 is installed over an existing DOS or Windows setup, it renames CONFIG.SYS and AUTOEXEC.BAT to CONFIG.DOS and AUTOEXEC.DOS respectively to enable dual booting functionality. During a DOS boot session, these files are temporarily restored as CONFIG.SYS and AUTOEXEC.BAT, while backups of the original Windows 95 versions are saved under CONFIG.W40 and AUTOEXEC.W40.
In systems where Caldera DR-DOS 7.02 or 7.03 coexists with Windows 95, Windows retains its standard CONFIG.SYS and AUTOEXEC.BAT filenames. Meanwhile, DR-DOS utilizes DCONFIG.SYS and AUTODOS7.BAT as its startup configuration files.
OS/2 / Windows NT
OS/2 depends extensively on CONFIG.SYS for setting up system drivers and environment variables prior to launching its graphical user interface.
Within the OS/2 subsystem present in Windows NT, the functionality of CONFIG.SYS is simulated through registry settings. OS/2 contains numerous undocumented directives within its CONFIG.SYS implementation.
CONFIG.SYS continues to be a vital component 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 available 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
- Details on FreeDOS CONFIG.SYS commands (archived)
- User Guide for PTS-DOS 2000 Pro including CONFIG.SYS directives (archived)
- German-language unofficial PTS-DOS FAQ (archived) – further CONFIG.SYS command explanations
Cite error: <ref> tags exist for a group named "nb", but no corresponding <references group="nb"/> tag was found