CPU (CONFIG.SYS directive)
| Company type | Configuration file |
|---|---|
| Industry | Computer software |
| Founded | 1983 |
| Headquarters | N/A |
| Products | Operating system configuration |
CONFIG.SYS serves as the main configuration file for DOS and OS/2 operating systems. This plain text file, written in ASCII, includes setup instructions that the operating system's DOS BIOS interprets during the startup process. CONFIG.SYS was first introduced with DOS version 2.0.
Usage
The directives within CONFIG.SYS tailor DOS to manage hardware devices, software applications, and memory allocation. Once CONFIG.SYS has been processed, DOS initiates the command interpreter specified by the SHELL statement; if none is specified, it defaults to COMMAND.COM, which then executes AUTOEXEC.BAT.
This configuration file primarily contains name=value entries that set adjustable parameters or load device drivers and terminate-and-stay-resident (TSR) programs.
In DOS systems, CONFIG.SYS is located in the root directory of the bootable drive.
Certain DOS variants check for alternative filenames that can override CONFIG.SYS:
- Advanced editions such as Concurrent DOS 386, Concurrent DOS XM, Multiuser DOS, and REAL/32 utilize CCONFIG.SYS or CCONFIG.INI, storing supplementary configuration data in binary files like CCONFIG.BIN, typically edited through CONFIG.EXE.
- Starting from version 3.31 of DR DOS and including versions like Novell DOS 7 and OpenDOS, DCONFIG.SYS supersedes CONFIG.SYS, often employed alongside disk compression or multi-boot configurations.
- OpenDOS 7.01 and DR-OpenDOS 7.02 also recognize ODCONFIG.SYS, while some DR-DOS 7.02 and later releases look for DRCONFIG.SYS.
- DR-DOS versions 6.0 and newer allow modification of default system file extensions using SYS /DR:ext, facilitating multiple concurrent system files and configurations selectable via boot managers such as LOADER.
- The SHELL command permits specifying alternative AUTOEXEC.BAT files, supporting extensions other than ".BAT".
- The CHAIN=filespec directive enables continuation of configuration processing into separate files, optionally referencing specific labels.
From DR-DOS 7.03 onward, a SYS /A option was introduced to copy CONFIG.SYS and AUTOEXEC.BAT along with system files.
Comparable functionality exists in other DOS derivatives: - FreeDOS employs FDCONFIG.SYS - RxDOS version 7.24 and above uses RXCONFIG.SYS - PTS-DOS utilizes CONFIG.PTS
On Windows 95 and Windows 98 boot drives, both CONFIG.SYS and AUTOEXEC.BAT are found in the root directory but are usually left empty. Windows Me does not interpret CONFIG.SYS; instead, it loads environment variables directly from the Windows Registry.
In the case of FlexOS, CONFIG.SYS is a binary file that specifies resource managers and device drivers to be loaded during boot.
Example
Sample CONFIG.SYS 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 that serve as jump points for , , , and commands.
- Functions similarly to , but is suitable for inline comments following other directives in CONFIG.SYS. (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 instructions.[1] (FreeDOS does not support custom messages but allows conditional execution through boot menus using and .) DOS versions 6.0 and later provide a comparable feature by appending a after the directive (e.g., ).
- Executes the following CONFIG.SYS command unconditionally.
ATemplate:NbndC
- Determines whether programs can be terminated upon encountering errors.
- Sets which drives record file access timestamps within FAT file systems.
- Enables conditional execution on AT-compatible hardware.
- Manages boot selection.
- Adjusts the verbosity level of error messages.
- Changes the default serial port driver for the AUX device (from COM1: to COM4:).
- Prevents character devices from being accessible outside the virtual \DEV directory.
- Loads the fundamental device driver into memory.
- Produces a beep sound even if audible alerts are disabled via switches.
- Specifies the subsequent operating system to boot.
- Enables or disables extended Ctrl+C interrupt checking.
- Defines the quantity of disk buffers to allocate.
- Similar to BUFFERS but places buffers into HMA or UMB areas.
- , CACHETTL, CACHEFLUSH (Embedded DOS 6-XL only)
- Control cache block allocation and flushing behavior.
- Loads executable programs listed in CONFIG.SYS, pausing processing until completion.
- Sets the Caps Lock state on the keyboard.
- , CDDBUFFERS (PTS-DOS only)
- Assigns CD-ROM driver name and buffer count.
- Continues CONFIG.SYS processing within a new file or label.
- , CLS, CODEPAGE, CMOSADDR, COLOR (various OS-specific)
- Configure system clock, screen clearing, OEM codepages, CMOS RAM address, and boot menu color schemes.
- , COM2, COM3, COM4 (DR-DOS 7.02+)
- Define serial port count, sequence, I/O addresses, and timeout settings.
- , COMMENT(S), COUNTRY (various OS-specific)
- Set DMA buffers for COM ports, redefine inline comment characters or ignore lines, and enable internationalization support.
- , CPSW (MS-DOS/DR-DOS versions)
- Manage display cursor positioning and codepage switching capabilities.
- , CPU88, CPU88+, CPU86, CPU86+, CPU286, CPU286+, CPU386, CPU386+, CPU486, CPU486+ (PTS-DOS and DR-DOS)
- Execute conditionally based on CPU type or clock speed.
This concise overview underscores essential CONFIG.SYS directives pertinent to configuring and optimizing systems across MS-DOS variants and compatible platforms, focusing on their role in hardware management and boot process control crucial for enterprise IT operations.
DTemplate:NbndF
- Manages relocation of drive descriptor tables in memory.
- Defines memory segment address used for multi-sector disk data deblocking.
- Activates internal debugger functionality.
- Controls boot management functions.
- Loads a specified device driver into memory.
- Loads device drivers into upper memory area (analogous to in DRDOS 5.0).
- Sets country and codepage parameters for keyboard, screen, and printer devices.
- Configures sizes for cache memory allocation.
- Specifies compatibility mode for floppy disks.
- Selects display font settings.
- Governs loading of DOS into high memory and/or use of upper memory blocks.
- Loads DOS system tables (BUFFERS, FCBS, FILES, LASTDRIVE, STACKS) into upper memory space.
- Provides an alternative search path for DOS system files.
- Defines search paths for data files.
- Specifies physical characteristics of disk drives.
- Sets parameters for unknown or unrecognized drives.
- Refer to .
- Enables PDUMP.nnn error logging and selects drive location for logs.
- Displays text messages on screen output.
- Shows messages with embedded ANSI escape codes for formatting.
- Adds extra validation checks when launching programs.
- Assigns assumed error or return codes for following commands.
- Controls A20 gate status during program startup.
- Terminates CONFIG.SYS processing prematurely (exceptions apply to SWITCHES and SHELL directives under certain conditions).
- Configures hash table size to accelerate file opening operations (distinct from external MS-DOS/PC DOS FASTOPEN).
- Sets number of cached File Control Blocks (FCBs) open simultaneously (shares buffer with FILES under DR-DOS).
- Similar to FCBS but explicitly loads buffers into upper memory area.
- Manages boot selection processes.
- Determines maximum number of files that can be opened concurrently.
- Equivalent to FILES but explicitly loads file handles into upper memory space.
- Executes specified CONFIG.SYS subsections as part of processing (see IGNORE).
GTemplate:NbndI
- Awaits a key press or timeout, returning the ASCII code or 1024 if timed out.
- Resumes processing of CONFIG.SYS at the indicated label.
- Continues nested CONFIG.SYS execution at a specified label, then returns to the previous point.
- Refer to , , or for additional information.
- Consult for further details.
- See for more context.
- Refer to or as applicable.
- See or for further reference.
- Consult for related guidance.
- Loads a TSR application into memory following DOS data segment relocation. Compare with INSTCDEX.
- Refer to , , or for more information.
- See for additional context.
- Refer to or as needed.
- Activates console and command line history buffer with enhanced pattern search capabilities.
- Defines the address of the HMA segment.
- Sets up HLT mode for power saving.
- Enables scanning of the boot sector for viruses.
- Loads installable file system drivers.
- Prevents execution of designated CONFIG.SYS subsections.
- Permits programs to operate at ring 2 for direct hardware input/output access.
- Incorporates directives from another menu block (emulated by GOSUB/RETURN in DR-DOS).
- Configures keyboard Insert mode status.
- Loads a TSR program into memory.
- Installs a TSR application into upper memory (equivalent to HIINSTALL in DR DOS 5.0).
- Loads TSR software after relocating the DOS data segment (see also INSTCDEX).
- Adjusts PIC controller interrupt priorities to assign highest priority to a specified IRQ number.
KTemplate:NbndM
- Sets the keyboard layout configuration.
- Specifies the relocated address of the keyboard buffer.
- Defines the maximum number of accessible drives.
- Similar to LASTDRIVE but loads the Current Directory Structure (CDS) into upper memory.
- Lists paths used for DLL searches.
- Handles compatibility settings for legacy applications.
- Specifies how many file locks can be set simultaneously.
- Manages support for boot logos and startup display messages.
- Defines count, sequence, I/O address, and timeout parameters for LPT1 device configuration.
- Functions like LPT1 but applies to LPT2 device settings.
- Equivalent to LPT1 but targets LPT3 device configuration.
- Enables and configures LPT4 device similarly to others.
- Determines wait duration before elevating process priority.
- Configures strategy for memory allocation management.
- Default method used by DOS for memory allocation.
- Specifies menu option definitions.
- Sets color schemes for menus (can be emulated under DR-DOS).
- Establishes default menu block (emulatable under DR-DOS).
- Defines a menu block structure (emulatable under DR-DOS).
- Enables support for multitrack disk operations.
- Continues processing CONFIG.SYS within a new file, optionally loading a device driver and assigning %NEWFILE% environment variable.
NTemplate:NbndQ
- Sets default No () character response in Yes/No/Resume prompts.
- Controls keyboard [[Num Lock|Template:Keypress]] state, turning it on or off.
- Enables conditional execution based on the previous error code, e.g., .
- Displays a message and waits for a key press, similar to commands in DR-DOS environments.
- Requires user confirmation when errors occur in CONFIG.SYS processing.
- Configures buffer size parameters for LPT port communications.
- Enables conditional execution on PC-compatible systems.
- Adjusts scheduler priority settings.
- Sets priority levels for disk I/O operations programs.
- Changes default printer device driver assignment between LPT1, LPT3, or LPT4 ports.
- Specifies whether DOS applications are permitted to run.
- Loads the user interface shell environment.
- Conditional execution applicable on IBM PS/1-compatible machines.
- Conditional execution applicable on IBM PS/2-compatible machines.
- Suppresses output sent to STDOUT.
RTemplate:NbndT
- Activates automatic system reboot upon encountering errors.
- Permits inclusion of comments within CONFIG.SYS.
- Reserves drive letters for local block device drivers.
- Sets the default character used for Resume () prompts.
- Returns nested CONFIG.SYS processing to the previous GOSUB or SWITCH point, optionally with a return code.
- Defines the size of real mode memory.
- Loads programs concurrently in CONFIG.SYS, functioning similarly to CALL or INSTALL commands in DOS.
- Determines whether the first character of deleted files is stored in the FAT directory entries reserved area.
- Specifies video mode settings for FreeDOS or screen access methods for PTS-DOS.
- Controls the on/off state of the keyboard Scroll Lock key.
- Establishes environment variables.
- Loads the command interpreter shell.
- Similar to SHELL but includes a size parameter to pre-allocate COMMAND.COM into HMA or UMBs, optimizing memory usage.
- Defines keyboard modifier states such as Shift Lock, Num Lock, Scroll Lock, and Insert mode.
- Specifies whether files close upon pressing Ctrl+Alt+Del.
- Skips Power-On Self-Test (POST) during reboot.
- , STACKSIZE, STACKSHIGH
- Various stack-related configuration parameters across DOS versions for interrupt handling and memory management.
- , SYSBOOT, SYSGEN, SYSLOAD, SYSTOUMB
- PTS-DOS specific commands managing boot procedures, memory allocation, and system loading locations.
- , SWITCH, SWITCHAR, SWITCHES
- Control flow directives enabling conditional processing and defining command-line switches in multiple DOS variants.
- , SWAPPATH, THREADS, TIMESLICE
- OS/2 directives that manage error logging, swap file locations, thread concurrency, and scheduler time slices.
- , TRACE, TRACEBUF
- Enable timeout configurations and debugging capabilities during CONFIG.SYS processing in different DOS environments.
- , TRAPDUMP
- Defines temporary file extensions (PTS-DOS) and detailed error logging options (OS/2).
UTemplate:NbndZ
- Configures DOS to use a specific memory segment as Upper Memory Block (UMB).
- Specifies which UMB server to utilize.
- Defines address ranges allocated as UMB RAM.
- Enables or disables verification of disk writes.
- Sets the DOS version reported to applications.
- Controls VGA display status settings.
- Specifies the current video mode in use.
- Indicates whether virtual DMA is permitted.
- Determines if the processor’s Virtual Mode Extensions should be disabled.
- Configures VxD driver settings for Windows environments.
- Sets system support parameters for Windows operation.
- Manages relocation of the Extended BIOS Data Area (XBDA).
- Executes conditionally on XT-compatible hardware only.
- Enables built-in Year 2000 compliance support.
- Defines the default affirmative character for Yes/No prompts.
- Configures tracking of file deletions.
Issues
Although the system can boot without CONFIG.SYS or if it is corrupted, this file together with AUTOEXEC.BAT remains critical for comprehensive boot customization and software compatibility. When these files are damaged, troubleshooting becomes necessary.
If CONFIG.SYS lacks a SHELL directive or is missing/corrupted entirely, DOS attempts to locate COMMAND.COM in the root directory of the boot drive. Versions prior to 6.0 will fail to start without this file. In contrast, MS-DOS 6.0/PC DOS 6.1 and Novell DOS 7 and later will prompt users to specify a command interpreter path if COMMAND.COM is absent or fails to load. This mechanism also supports limited runtime shell replacement without requiring a reboot.
The COMMAND.COM from MS-DOS 7.0 onward is incompatible with DR-DOS installations, which are often located in the root of drive C: in dual-boot scenarios. Starting with DR-DOS 7.02, skipping or tracing modes prevent bypassing SHELL directives to avoid conflicts. Some patches reintroduced skip functionality to recover from invalid SHELL arguments. When no valid SHELL directive is found during skipping operations, users are prompted to enter a valid shell filename before COMMAND.COM loads.
CONFIG.SYS size limitations differ by system: MS-DOS and PC DOS restrict it to several kilobytes (recently up to 64 KB), while DR-DOS imposes no size restriction aside from file system limits. MS-DOS compiles CONFIG.SYS into tokenized form and processes directives sequentially—loading device drivers before TSRs—whereas DR-DOS interprets each line individually. This allows precise control over load order using DEVICE and INSTALL, facilitating conflict resolution and debugging.
DR-DOS offers advanced conditional processing capabilities based on processor type, key presses, error conditions, or return codes, providing enhanced customization and control flow within CONFIG.SYS. The INSTALL directive enables execution of non-resident software integrated into the CONFIG.SYS loading sequence.
In MS-DOS/PC DOS versions 2.0 through 4.01, SHELL lines were limited to 31 characters. Later editions expanded this limit up to 128 characters, while DR-DOS accepts up to 255 characters. None of the CONFIG.SYS directives support long filenames.
Dual Booting DOS and Windows 9x
When Windows 95 is installed on top of an 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. During a DOS boot, these files are temporarily reverted to their original names. Backup copies of Windows 95's versions are saved as CONFIG.W40 and AUTOEXEC.W40.
In setups where Caldera DR-DOS 7.02 or 7.03 coexists with Windows 95, the CONFIG.SYS and AUTOEXEC.BAT files used by Windows remain intact. Instead, DR-DOS employs DCONFIG.SYS and AUTODOS7.BAT as its initialization scripts.
OS/2 / Windows NT
OS/2 depends extensively on CONFIG.SYS for loading drivers and setting the environment prior to launching its graphical user interface.
Within the OS/2 subsystem of Windows NT, the configuration details typically found in CONFIG.SYS are maintained within the system registry rather than as separate files.
OS/2 utilizes various CONFIG.SYS commands that are not officially documented.
CONFIG.SYS continues to play a vital role 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 at Computer Hope
- Overview of CONFIG.SYS directives for Windows 98 / MS-DOS 7.10 (archived)
- Caldera's CONFIG.SYS Command Reference (archived) – summary of DR-DOS 7 directives
- FreeDOS CONFIG.SYS directives description (archived)
- User manual for PTS-DOS 2000 Pro including CONFIG.SYS commands (archived)
- German-language unofficial PTS-DOS FAQ (PTS/FAQD) with CONFIG.SYS details (archived)
- ↑ Cite error: Invalid
<ref>tag; no text was provided for refs namedPaul_2000_CONFIG