CAPSLOCK (CONFIG.SYS directive)
| Company type | Configuration file |
|---|---|
| Industry | Operating systems |
| Founded | 1983 |
| Products | System configuration for DOS and OS/2 |
CONFIG.SYS serves as the main configuration file for DOS and OS/2 operating system platforms. This plain text file, written in ASCII, holds setup instructions accessible to users, which are interpreted by the operating system's DOS BIOS—commonly found in IBMBIO.COM or IO.SYS—during the boot sequence. The CONFIG.SYS file was first introduced with DOS version 2.0.
Usage
The directives within CONFIG.SYS are utilized to configure DOS for various hardware devices, software applications, and memory management utilities. Once CONFIG.SYS processing is complete, 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 contains name=value pairs that establish configuration parameters or load components such as device drivers and terminate-and-stay-resident programs (TSRs) into system memory.
In DOS environments, CONFIG.SYS is located in the root directory of the bootable drive.
The same filename is also employed by (DCP), an MS-DOS variant 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 utilize CCONFIG.SYS (where "C" stands for "Concurrent") instead of the traditional CONFIG.SYS. Some editions of Multiuser DOS adopt CCONFIG.INI, while REAL/32 seeks MCONFIG.SYS. These platforms feature extended configuration options stored in binary files like CCONFIG.BIN, which are usually edited through CONFIG.EXE.
In versions such as DR DOS 3.31, PalmDOS 1.0, Novell DOS 7, OpenDOS 7.01, and DR-DOS 7.02+, a DCONFIG.SYS file takes precedence over CONFIG.SYS. Originally designed for disk compression scenarios where drive letters shifted (e.g., C: becoming D:), this approach also facilitates multi-boot setups. OpenDOS 7.01 and DR-OpenDOS 7.02 look for ODCONFIG.SYS, whereas some DR-DOS 7.02+ variants check for DRCONFIG.SYS.
Starting with DR DOS 6.0, the command SYS /DR:ext enables users to alter default system file extensions, allowing multiple system files to coexist within a single root directory and be selected by boot managers such as LOADER (utilized in Multiuser DOS and DR-DOS). The SHELL directive supports specifying alternative AUTOEXEC.BAT scripts using /P[:filename.ext], and COMMAND.COM accepts extensions beyond ".BAT", a capability also supported by 4DOS. The CHAIN=filespec command allows continuation of configuration from another file, which can reside outside the root directory; DR-DOS 7.02+ enhances this feature with optional label parameters for precise navigation within chained files.
From version 7.03 onward, DR-DOS supports SYS /A, which copies both CONFIG.SYS and AUTOEXEC.BAT along with other system files.
Other operating systems use distinct configuration filenames: FDCONFIG.SYS in FreeDOS, RXCONFIG.SYS in RxDOS 7.24+, and CONFIG.PTS in PTS-DOS.
Both CONFIG.SYS and AUTOEXEC.BAT are present in the root directories of Windows 95 and Windows 98, although they are generally left empty.
Windows Me does not process CONFIG.SYS during startup; instead, environment variables are loaded from the Windows Registry at:
- HKLM\System\CurrentControlSet\Control\SessionManager\Environment
In the case of FlexOS, CONFIG.SYS is a binary configuration file that specifies resource managers and device drivers to be loaded during system initialization.
Example
A sample CONFIG.SYS file configured 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>
:;*?!
- Serves as labels within CONFIG.SYS, acting as jump targets for , , , , and commands.
- Functions similarly to , and can also be used for inline comments following other directives. (Note: In MS-DOS/PC DOS, inline comments inside double quotes are not ignored.)
- Used at the start of inline comments alongside the ; directive.
- Prompts a Yes/No confirmation before executing subsequent CONFIG.SYS commands. (FreeDOS supports conditional processing with boot menus but lacks customizable messages.) DOS version 6.0 and later offer a comparable function by appending after commands.
- Forces immediate execution of the next CONFIG.SYS command without conditions.
ATemplate:NbndC
- Determines whether programs can be interrupted upon errors.
- Sets which drives record file access timestamps in FAT file systems.
- Enables conditional execution on AT-compatible hardware.
- Acts as a boot manager.
- Controls the verbosity level of error messages.
- Changes the default serial port driver assigned to the AUX device.
- Prevents access to character devices outside the phantom \DEV directory.
- Loads a base device driver into system memory.
- Produces a brief beep sound even when notifications are disabled.
- Specifies the operating system to boot next in sequence.
- Enables or disables extended Ctrl+C checking functionality.
- Sets the amount of disk buffers allocated by the system.
- Similar to BUFFERS but loads buffers into High Memory Area or Upper Memory Blocks.
- , CACHETTL, CACHEFLUSH (Embedded DOS 6-XL)
- Manage cache block allocation durations and flush intervals.
- Loads executable programs during CONFIG.SYS processing, running them in the foreground and pausing further processing until completion.
- (DR-DOS 7.02+)
- Defines keyboard Caps Lock status during boot.
- , CDDBUFFERS (PTS-DOS)
- Configures CD-ROM driver name and buffer sizes.
- (DR DOS 5.0+, Embedded DOS)
- Allows continuation of CONFIG.SYS parsing from another file or label.
- , CLS, CODEPAGE (PTS-DOS, OS/2)
- Set system clock type, clear screen display, and specify OEM codepages.
- , COLOR (PTS-DOS)
- Define CMOS RAM address and colors for boot menus.
- , COM2, COM3, COM4 (DR-DOS 7.02+)
- Configure count, priority, I/O addresses, and timeouts for COM ports.
- , COMMENT(S), COUNTRY, CPOS, CPSW (various OS versions)
- Control DMA buffer settings, inline commentary, internationalization support, cursor positioning, and codepage switching.
- CPU-related directives (PTS-DOS and DR-DOS) specify conditional execution based on CPU model or clock speed.
DTemplate:NbndF
- Configures relocation settings for drive descriptor tables.
- Specifies the memory segment limit up to which multi-sector disk data deblocking is permitted.
- Activates internal debugger functionality.
- Functions as a boot manager.
- Loads device drivers into memory space.
- Loads device drivers into upper memory segments (equivalent to in DRDOS 5.0).
- Sets country and codepage parameters for keyboard, screen, and printer devices.
- Defines cache memory size configurations.
- Selects floppy disk compatibility modes.
- Specifies font settings for display output.
- Controls loading of DOS components into High Memory Area or usage of Upper Memory Blocks (similar to in DRDOS 5.0).
- Determines loading of DOS tables such as BUFFERS, FCBS, FILES, LASTDRIVE, STACKS into upper memory regions.
- Defines an alternate directory path for DOS system files.
- Sets search paths for data files used by DOS utilities.
- Specifies physical characteristics of disk drives connected to the system.
- Defines parameters for unrecognized or non-standard drives.
- See .
- Enables creation of PDUMP.nnn error logs on specified drives.
- Outputs plain text messages on screen during boot or CONFIG.SYS processing.
- Displays messages including ANSI escape sequences for enhanced formatting.
- Adds extra verification steps when launching programs from CONFIG.SYS or command line.
- Assigns an assumed error or return code value for subsequent commands processed by DOS.
- Sets A20 gate state before program execution to control memory addressing behavior.
- Terminates processing of CONFIG.SYS prior to reaching end-of-file (exceptions apply to SWITCHES and SHELL directives under certain conditions).
- Configures hash table size used to accelerate file open operations—distinct from MS-DOS/PC DOS FASTOPEN driver functionality.
- Specifies number of cached File Control Blocks (FCBs) allowed open simultaneously (shares buffer space with FILES under DR-DOS).
- Similar to FCBS but explicitly loads FCBs into upper memory areas for enhanced performance.
- Boot manager functionality integrated within CONFIG.SYS processing sequence.
- Determines maximum number of files that can be opened simultaneously by DOS processes.
- Functions like FILES but allocates file handles within upper memory explicitly for efficiency gains.
- Allows inclusion and execution of specified subsections within CONFIG.SYS files (refer to IGNORE directive).
GTemplate:NbndI
- Awaits 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 designated label.
- Continues nested CONFIG.SYS execution at a specified label, then returns to the previous point.
- Refer to , , or for additional details.
- Consult for further information.
- See for related commands.
- Refer to or for more context.
- See or for related functions.
- Consult for additional guidance.
- Loads a TSR program into memory following DOS data segment relocation. Compare with INSTCDEX.
- Refer to , , or for supplementary details.
- See for related instructions.
- Consult or for more information.
- Activates console and command line history buffer along with enhanced pattern searching capabilities.
- Defines the HMA segment address.
- Sets parameters for HLT power-saving mode.
- Enables scanning of the boot sector for viruses.
- Loads installable file system drivers.
- Prevents execution of specified CONFIG.SYS subsections.
- Permits applications typically running at CPU ring 3 to operate at ring 2, allowing direct hardware I/O access.
- Incorporates directives from another menu block (implemented via GOSUB and RETURN in DR-DOS).
- Configures keyboard Insert mode status.
- Loads a TSR program into memory.
- </nowiki> Loads a TSR program into upper memory (equivalent to HIINSTALL in DR DOS 5.0).
- Installs a TSR program after relocating the DOS data segment. Compare with INSTCDEX.
- Adjusts PIC interrupt priorities to assign the highest priority to a specified interrupt number.
KTemplate:NbndM
- Defines the keyboard layout configuration.
- Sets the address location of the relocated keyboard buffer.
- Determines the maximum number of accessible drives.
- Functions similarly to LASTDRIVE but loads Current Directory Structure (CDS) into upper memory.
- Lists directories searched for DLL files.
- Manages backward compatibility for legacy software.
- Specifies the number of file locks allowed.
- Configures boot logo display and startup messages using PTS-DOS boot manager features.
- Defines count, sequence, I/O port address, and timeout parameters for the LPT1 device.
- Applies similar settings for the LPT2 device.
- Applies similar configurations for LPT3 device.
- Enables and configures LPT4 device functionality correspondingly.
- Sets delay before increasing priority of waiting processes.
- Determines memory allocation policies.
- Specifies default DOS memory allocation strategy settings.
- Defines menu option parameters.
- Sets color schemes for menus (emulatable under DR-DOS).
- Specifies default menu block (emulatable under DR-DOS).
- Defines multiple menu blocks (emulatable under DR-DOS).
- Enables operations involving multitrack disks.
- Continues CONFIG.SYS processing in a new file after loading a device driver, setting the %NEWFILE% environment variable.
NTemplate:NbndQ
- Sets the default character representing No () in Yes/No/Resume prompts.
- Controls the status of keyboard [[Num Lock|Template:Keypress]] key.
- Enables conditional execution based on last error code, e.g., .
- Displays text and waits for user key press, similar to commands in DR-DOS environments.
- Requires user confirmation when errors occur in CONFIG.SYS processing.
- Configures buffer sizes for printers LPT1 through LPT3.
- Allows conditional execution on PC-compatible systems.
- Adjusts scheduler priority settings.
- Sets priority levels for disk I/O operations programs.
- Changes default printer device driver assignments (from LPT1 through LPT4).
- Controls whether DOS applications are permitted to run.
- Loads a user interface shell environment.
- Enables conditional execution on IBM PS/1-compatible hardware platforms.
- Allows conditional execution on IBM PS/2-compatible systems.
- Suppresses output display on STDOUT.
RTemplate:NbndT
- Activates automatic system reboot upon encountering errors.
- Permits inclusion of comments within CONFIG.SYS.
- Prevents local block devices from using a specified drive letter.
- Sets the default character for Resume () prompts.
- Returns nested CONFIG.SYS execution to the previous GOSUB or SWITCH point, optionally providing a return code.
- Specifies the amount of real mode memory available.
- Allows simultaneous loading of programs in CONFIG.SYS in the background, akin to CALL or INSTALL commands in DOS.
- Determines whether the first character of deleted files is saved in the FAT reserved area.
- Defines video modes for FreeDOS or screen access methods for PTS-DOS.
- Controls the status of the keyboard Scroll Lock key.
- Establishes environment variables.
- Loads the command interpreter shell.
- Similar to SHELL but supports pre-allocating COMMAND.COM size for loading into HMA, reducing fragmentation; PTS-DOS attempts loading into UMB.
- Sets keyboard modifier states such as Shift Lock, Num Lock, Scroll Lock, and Insert mode.
- Indicates whether files should be closed upon pressing Ctrl+Alt+Del.
- Specifies whether POST should be bypassed during reboot.
- , STACKSIZE, STACKSHIGH
- Configure hardware interrupt stack sizes and buffer placement across different DOS variants and Embedded DOS editions.
- , SYSBOOT, SYSGEN, SYSLOAD, SYSTOUMB
- PTS-DOS-specific commands managing boot manager behavior, alternative OS booting options, system memory layout, and loading DOS into upper memory blocks.
- , SWITCH, SWITCHES
- Enable conditional processing sections and special options within CONFIG.SYS on various DOS platforms.
- , SWAPPATH, THREADS, TIMESLICE
- OS/2 directives controlling error logging suppression, swap file directories, thread concurrency levels, and scheduler time slice durations.
- , TRACE
- Adjust timeout intervals for CONFIG.SYS prompts and enable single-step execution tracing in DR-DOS, PTS-DOS, and OS/2 environments.
- , TRAPDUMP
- Handles temporary file extensions in PTS-DOS and error logging functions in OS/2.
UTemplate:NbndZ
- Assigns a specific segment for use as UMB memory under DOS management.
- Selects the UMB server implementation employed.
- Defines address ranges designated as UMB RAM.
- Toggles disk write verification on or off.
- Sets the DOS version string reported to applications.
- Configures VGA display status parameters.
- Specifies the active video mode setting.
- Determines if virtual DMA functionality is enabled.
- Enables or disables processor Virtual Mode Extensions (VME).
- Configures VxD drivers intended for Windows environments.
- Sets system support parameters for Windows operation.
- Manages relocation of the Extended BIOS Data Area (XBDA).
- Enables conditional execution on XT-compatible hardware platforms.
- Activates built-in Year 2000 compliance features.
- Defines the default 'Yes' response character in prompt dialogs.
- Controls tracking of file deletions.
Issues
Although the system can initiate startup without CONFIG.SYS or AUTOEXEC.BAT files present, these files are vital for tailoring the operating system and loading necessary software components. Their corruption or absence necessitates diagnostic measures.
In cases where CONFIG.SYS lacks a SHELL directive or is missing/corrupted, DOS attempts to locate COMMAND.COM within the root directory. Versions prior to 6.0 will fail if COMMAND.COM is not found. However, MS-DOS 6.0, PC DOS 6.1, Novell DOS 7, and subsequent releases prompt users to specify a command processor path. This recovery prompt also appears if the primary shell terminates unexpectedly or exits intentionally, enabling limited runtime replacement of the shell without requiring a reboot.
COMMAND.COM versions from MS-DOS 7.0 onward are incompatible with DR-DOS and are usually stored in C:\ when dual-booting. Starting with DR-DOS 7.02, skipping or tracing modes (triggered by Ctrl+F5/F7/F8) no longer permit bypassing SHELL directives. Some later releases introduced Ctrl+F6 to restore skip functionality for recovery from invalid SHELL parameters. When skipping CONFIG.SYS processing without encountering a SHELL directive, users are prompted to enter a valid shell filename before COMMAND.COM is loaded.
CONFIG.SYS file size restrictions differ among operating systems: MS-DOS and PC DOS impose size limits (up to 64 KB), whereas DR-DOS effectively has no practical limit due to its line-by-line parsing approach instead of tokenization. This design offers DR-DOS users enhanced control over driver and TSR loading sequences via DEVICE and INSTALL, facilitating conflict resolution and integration of temporary external programs during boot.
The maximum length of SHELL lines varies by version: MS-DOS/PC DOS versions 2.0 through 4.01 limit this to 31 characters; newer versions allow up to 128 characters. DR-DOS supports up to 255 characters. It is important to note that CONFIG.SYS directives do not accommodate long filenames.
Dual Booting DOS and Windows 9x
During the installation of Windows 95 on a system already running DOS or Windows, 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 booting into DOS, these original filenames are temporarily reinstated, while the Windows 95 versions are preserved under the names CONFIG.W40 and AUTOEXEC.W40.
In cases where Caldera DR-DOS 7.02 or 7.03 is installed alongside Windows 95, the 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 and Windows NT
OS/2 depends extensively on CONFIG.SYS to set up drivers and environment variables prior to loading its graphical user interface.
Within the OS/2 subsystem of Windows NT, the file perceived as CONFIG.SYS by OS/2 applications is actually stored within the system registry.
Numerous CONFIG.SYS commands utilized by OS/2 have not been officially documented.
The use of CONFIG.SYS persists 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 | 2017-12-29 | [1]
- Overview of Windows 98 / MS-DOS 7.10 CONFIG.SYS directives | Microsoft Support | [2]
- Reference for CONFIG.SYS commands | Caldera | 1998 | [3] (DR-DOS 7 CONFIG.SYS directives)
- Documentation on FreeDOS CONFIG.SYS directives | [4]
- PTS-DOS 2000 Pro User Guide including CONFIG.SYS commands | [5]
- Unofficial German PTS-DOS FAQ (2004) with CONFIG.SYS details | [6]