CPU486 (CONFIG.SYS directive)
| Company type | Configuration file |
|---|---|
| Industry | Operating systems |
| Founded | DOS version 2.0 |
| Products | System configuration for DOS and OS/2 |
CONFIG.SYS serves as the chief configuration file for DOS and OS/2 operating systems. This plain text file, written in ASCII, contains 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. CONFIG.SYS was first introduced with DOS version 2.0.
Usage
The directives within CONFIG.SYS are responsible for configuring DOS to support hardware devices and software applications, as well as initializing memory management utilities. Once CONFIG.SYS processing completes, DOS launches the command interpreter specified by the SHELL directive; if none is specified, it defaults to COMMAND.COM. The command interpreter subsequently executes the commands contained in the AUTOEXEC.BAT file.
CONFIG.SYS primarily consists of name=value instructions that either adjust configurable parameters or load files such as device drivers and terminate-and-stay-resident programs (TSRs) into system memory.
In DOS environments, this file is located in the root directory of the bootable drive.
The same filename is also utilized by (DCP), an MS-DOS variant developed by East-German manufacturer VEB Robotron.
Certain DOS distributions check for alternative configuration filenames that override CONFIG.SYS:
Advanced iterations of Concurrent DOS 386, Concurrent DOS XM, Multiuser DOS, and REAL/32 prioritize CCONFIG.SYS over CONFIG.SYS. Some versions of Multiuser DOS use CCONFIG.INI, while REAL/32 looks for MCONFIG.SYS. These platforms support supplementary configuration stored in binary files like CCONFIG.BIN, which are typically edited through CONFIG.EXE.
In systems such as DR DOS 3.31, PalmDOS 1.0, Novell DOS 7, and DR-DOS 7.02+, the filename DCONFIG.SYS takes precedence instead of CONFIG.SYS. This naming scheme originated from disk compression utilities where drive letters were reassigned after loading compression drivers, allowing multiple configuration profiles for multi-boot environments.
OpenDOS 7.01 and DR-OpenDOS 7.02 additionally check for ODCONFIG.SYS, while select DR-DOS 7.02+ releases look for DRCONFIG.SYS. Starting with DR DOS 6.0, the SYS /DR:ext command enables modification of default system file extensions, facilitating coexistence of multiple system file sets within a single root directory and selection through boot loaders like LOADER included with Multiuser DOS and DR-DOS.
The SHELL command allows specifying alternative AUTOEXEC.BAT filenames via /P[:filename.ext], with COMMAND.COM supporting extensions beyond ".BAT" (a feature also present in 4DOS). The CONFIG.SYS directive CHAIN=filespec permits continuation of configuration processing from an external file located outside the root directory; DR-DOS 7.02+ enhances this with an optional label argument (CHAIN=filespec,label) to enable jumping to specific sections.
From version 7.03 onward, DR-DOS includes a SYS /A option to copy CONFIG.SYS and AUTOEXEC.BAT alongside other system files.
Other operating systems employ similar but distinct configuration filenames: FreeDOS uses FDCONFIG.SYS; RxDOS version 7.24 and later use RXCONFIG.SYS; and PTS-DOS utilizes CONFIG.PTS.
In Windows 95 and Windows 98, both CONFIG.SYS and AUTOEXEC.BAT reside in the root directory of the boot partition but typically contain no data. In contrast, Windows Me does not process CONFIG.SYS during startup; instead, it retrieves environment variables directly from the Windows Registry at:
- HKLM\System\CurrentControlSet\Control\SessionManager\Environment
Within the context of FlexOS, CONFIG.SYS is 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 , additionally used for inline comments after other directives. (Inline comments enclosed in quotes are not ignored in MS-DOS/PC DOS.)
- Introduces inline comments alongside the ; directive.
- Presents a Yes/No confirmation prompt before executing subsequent commands. (FreeDOS supports conditional execution with boot menus but lacks optional messages.) DOS 6.0 and later offer comparable functionality using a trailing on commands.
- Executes the next command unconditionally.
ATemplate:NbndC
- Enables program termination upon errors.
- Manages storage of file access timestamps on FAT file systems.
- Allows conditional execution on AT-compatible computers.
- Provides boot management functionality.
- Adjusts verbosity level of error messages.
- Changes the default serial driver associated with the AUX: device.
- Disables character devices located outside the phantom \DEV directory.
- Loads a base device driver into memory.
- Produces a beep even if sound notifications are turned off.
- Specifies which operating system to boot next.
- Enables or disables extended Ctrl+C checking.
- Defines the quantity of disk buffers to allocate.
- Similar to BUFFERS but loads buffers into HMA or UMB memory areas.
- , ,
- Configures cache block allocation and flushing intervals.
- Loads programs during CONFIG.SYS processing, pausing execution until they return control.
- Sets the keyboard Caps Lock state.
- ,
- Configures CD-ROM driver name and buffer parameters.
- Continues processing of CONFIG.SYS from another file or label.
- , , , etc.
- Various system settings including clock behavior, screen clearing, and OEM codepage support (mainly for OS/2 or PTS-DOS).
- , ...,
- Defines serial COM port count, order, I/O addresses, and timeout values.
- , etc.
- Handles inline comment directives with differing support across DOS versions.
- Activates international language support on multiple DOS variants including OS/2.
Additional CPU-specific conditional execution commands (such as CPU88, CPU386) enable CONFIG.SYS processing tailored to particular processor types, predominantly supported in PTS-DOS and DR-DOS environments.
DTemplate:NbndF
- Controls relocation of drive descriptor tables in memory.
- Sets memory segment limits for deblocking multi-sector disk data.
- Activates internal debugger capabilities.
- Implements boot management features.
- Loads device drivers into conventional memory.
- Loads device drivers into upper memory areas (equivalent to in DRDOS 5.0).
- Defines country and codepage settings for keyboard, screen, and printer devices.
- Specifies sizes for cache memory regions.
- Selects floppy disk compatibility mode.
- Determines display font settings.
- Manages loading of DOS into high or upper memory (similar to in DRDOS 5.0).
- Loads DOS system tables (BUFFERS, FCBS, FILES, LASTDRIVE, STACKS) into upper memory areas.
- Specifies an alternate search path for DOS files.
- Defines search paths for data files.
- Sets physical parameters for disk drives.
- Configures parameters for undefined drives.
- Refer to .
- Enables and designates drive location for PDUMP.nnn error log files.
- Outputs a message to the display screen.
- Displays messages including ANSI escape codes.
- Adds extra checks during program startup.
- Specifies an expected error or return code value.
- Controls A20 gate status when launching programs.
- Terminates CONFIG.SYS processing prematurely (excluding SWITCHES and SHELL directives).
- Adjusts hash table size for faster file opening operations (differs from MS-DOS/PC DOS FASTOPEN).
- Sets maximum number of cached File Control Blocks (FCBs) that can be open simultaneously (shares buffer space with FILES in DR-DOS).
- Same as FCBS but loads them into upper memory space.
- Boot management functionality.
- Defines maximum number of files that can be opened simultaneously.
- Same as FILES but loads file handles into upper memory regions.
- Includes execution of specific CONFIG.SYS subsections (see IGNORE).
GTemplate:NbndI
- Waits for a keystroke or a timeout; returns error level as ASCII code or 1024 if timed out.
- Resumes processing of CONFIG.SYS at the designated label.
- Processes nested CONFIG.SYS commands at the given label, returning afterward to the previous point.
- Refer to , , or for additional details.
- Consult for further information.
- See documentation on .
- See or for related commands.
- Refer to or for more context.
- Consult for additional instructions.
- Loads a TSR program after relocating the DOS data segment; compare with INSTCDEX.
- Refer to , , or for more details.
- See documentation on .
- Consult or for further options.
- Activates console and command line history buffer with enhanced pattern matching capabilities.
- Defines the address of the High Memory Area (HMA) segment.
- Configures energy-saving mode using HLT instruction.
- Performs boot sector virus checks during startup.
- Loads installable file system drivers.
- Prevents execution of specified sections within CONFIG.SYS.
- Grants certain programs permission to execute at ring 2 level, enabling direct hardware I/O access.
- Incorporates directives from another menu section (simulated via GOSUB/RETURN in DR-DOS).
- Toggles keyboard Insert mode on or off.
- Loads a TSR program into memory.
- Installs a TSR into upper memory blocks (similar to HIINSTALL in DR DOS 5.0).
- Loads TSR after relocating DOS data segment (see also INSTCDEX).
- Adjusts PIC interrupt priorities, assigning highest priority to a specified interrupt number.
KTemplate:NbndM
- Defines the keyboard layout configuration.
- Sets the memory address of the relocated keyboard buffer.
- Specifies the maximum number of accessible drive letters.
- Functions like LASTDRIVE but loads Current Directory Structure (CDS) into upper memory area.
- Lists directories to search for dynamic-link libraries (DLLs).
- Handles backward compatibility with legacy software applications.
- Configures the number of file locks allowed.
- Enables boot logo support and startup messages when using PTS-DOS boot manager.
- Sets parameters including count, logical order, I/O port address, and timeout for LPT1 device.
- Configures count, logical order, I/O address, and timeout settings for LPT2 device.
- Defines count, order, I/O port address, and timeout for LPT3 device configuration.
- Enables and sets parameters such as count, logical order, I/O address, and timeout for LPT4 device.
- Determines time delay before elevating priority of waiting processes.
- Selects memory allocation method used by DOS.
- Sets default strategy for DOS memory allocation routines.
- Defines menu option entries within CONFIG.SYS menus.
- Specifies color schemes for menus (can be simulated using ECHO commands in DR-DOS).
- Designates default menu block (emulatable through TIMEOUT and SWITCH commands in DR-DOS).
- Defines individual menu blocks (can be emulated by combining ECHO and SWITCH commands in DR-DOS).
- Enables or disables multitrack disk drive operations.
- Continues processing CONFIG.SYS from a new file after loading a driver and setting %NEWFILE% environment variable (similar to CHAIN command in DR-DOS).
NTemplate:NbndQ
- Sets default "No" character used in Yes/No/Resume prompts when no input is given.
- Enables or disables keyboard Num Lock state at startup.
- Executes commands conditionally based on previous error code status, e.g., .
- Displays a message and waits for key press, similar to and commands available in DR-DOS environments.
- Requires user confirmation to acknowledge errors encountered during CONFIG.SYS processing.
- Configures buffer sizes for parallel ports LPT1 through LPT3.
- Conditional execution targeting PC-compatible hardware platforms only.
- Adjusts scheduling priorities within the system's task scheduler.
- Sets priority levels specifically for disk I/O operations or programs handling them.
- Changes default printer device driver assignment among LPT1 to LPT4 ports.
- Determines whether DOS programs are permitted to execute under current configuration settings.
- Loads a user interface shell program during system startup sequence.
- Conditional execution directive targeting IBM PS/1-compatible systems exclusively.
- Conditional execution directive targeting IBM PS/2-compatible systems exclusively.
- Suppresses output directed to standard output stream (STDOUT).
RTemplate:NbndT
- Activates automatic system reboot upon encountering errors.
- Permits insertion of comments within CONFIG.SYS.
- Allocates a drive letter reserved for local block device drivers.
- Sets the default Resume () character used in command prompts.
- Returns control from nested CONFIG.SYS processing to the previous GOSUB or SWITCH point, optionally passing a return code.
- Defines the size of real mode memory available.
- Loads programs specified in CONFIG.SYS simultaneously in the background, functioning similarly to INSTALL under DOS.
- Saves the initial character of deleted files within the FAT reserved area.
- Determines video mode for FreeDOS or screen access methods for PTS-DOS.
- Controls the Scroll Lock key status on the keyboard.
- Assigns environment variables.
- Loads the command interpreter shell program.
- Similar to SHELL but supports a SIZE parameter allowing COMMAND.COM pre-allocation in HMA or UMBs to minimize fragmentation.
- Sets keyboard modifier key states such as Shift Lock, Num Lock, Scroll Lock, and Insert.
- Specifies whether files are closed upon pressing Ctrl+Alt+Del.
- Skips execution of POST during system reboot.
- , STACKSIZE, STACKSHIGH
- Configure hardware interrupt stack depth and size across various DOS versions (implementation varies by system).
- , SYSBOOT, SYSGEN, SYSLOAD
- PTS-DOS-specific commands managing boot processes and system memory configuration.
- (DOS 6.0+) Defines submenu blocks within CONFIG.SYS (unsupported by DR-DOS and FreeDOS).
- , SWAPPATH, THREADS, TIMESLICE
- OS/2-specific parameters controlling error logging, swap file location, thread count, and scheduler time slice durations.
- , SWITCHES
- Directives enabling conditional processing within CONFIG.SYS (varies among DOS variants).
- , TMPEXT
- Defines system switch characters ('/' or '-') and temporary file extensions, differing by DOS version.
- , TRACEBUF
- Enables step-by-step execution of CONFIG.SYS/AUTOEXEC.BAT with a configurable log buffer size (behavior differs between OS/2 and DOS).
- , SXFAKEHWFPU
- OS/2 settings addressing error logging and fixes for FPU bugs.
This segment outlines configuration commands vital for tailoring system behavior across multiple DOS variants. It highlights compatibility considerations, performance optimization, and error management—key aspects for maintaining legacy IT infrastructures.
UTemplate:NbndZ
- Configures DOS to allocate a specific segment as Upper Memory Block (UMB) memory.
- Specifies which UMB server is employed.
- Defines address ranges designated as UMB RAM areas.
- Toggles disk write verification on or off.
- Sets the DOS version number reported to applications.
- Manages VGA display status settings.
- Assigns the current video mode, analogous to FreeDOS's SCREEN command.
- Enables or disables virtual DMA usage.
- Controls deactivation of processor Virtual Mode Extensions.
- Configures VxD driver parameters for Windows environments.
- Adjusts system support settings for 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.
- Sets the default affirmative response character in user prompts.
- Configures tracking of file deletions.
Issues
Although the system can boot without CONFIG.SYS or AUTOEXEC.BAT files present, these are crucial for complete customization and meeting software requirements. Corruption or absence of either file necessitates diagnostic procedures.
If SHELL is missing from CONFIG.SYS or if CONFIG.SYS itself is absent or damaged, DOS attempts to locate COMMAND.COM in the root directory of the boot drive. Versions prior to 6.0 fail to boot if COMMAND.COM is not found. MS-DOS 6.0/PC DOS 6.1 and Novell DOS 7 or later prompt users to specify a command interpreter path. This prompt also appears if the primary shell terminates unexpectedly or exits intentionally, allowing limited replacement of the runtime shell without rebooting.
COMMAND.COM from MS-DOS version 7 and above is not compatible with DR-DOS installations, which are commonly located in C:\ root directories in dual-boot configurations. Starting with DR-DOS 7.02, skipping or tracing through CONFIG.SYS using (Ctrl+)F5/F7/F8 keys no longer bypasses SHELL directives, improving system stability. Some later DR-DOS releases introduced (Ctrl+)F6 to revert to previous skip behavior for recovery when invalid SHELL arguments occur. If no valid SHELL directive is detected during CONFIG.SYS skipping, users are prompted to enter a shell filename before COMMAND.COM loads.
CONFIG.SYS file size restrictions vary by DOS variant: MS-DOS/PC DOS limits range from a few kilobytes up to approximately 64 KB in later editions. DR-DOS imposes no practical size limit beyond file system constraints. MS-DOS preprocesses CONFIG.SYS into tokenized memory before processing directives sequentially—device drivers load before TSRs—whereas DR-DOS interprets directives line-by-line, granting full control over loading order through DEVICE and INSTALL commands. This approach facilitates resolving conflicts and integrating temporary software within CONFIG.SYS execution.
The maximum length for SHELL command lines differs: MS-DOS/PC DOS versions 2.0–4.01 restrict them to 31 characters, expanded to 128 characters in later releases. DR-DOS supports up to 255 characters. Notably, CONFIG.SYS directives do not accept long filenames across these systems.
Dual Booting with 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. Selecting the DOS boot option temporarily reverts these filenames. Backup copies of Windows 95 configuration files are saved as CONFIG.W40 and AUTOEXEC.W40.
When Caldera DR-DOS versions 7.02 or 7.03 are installed alongside Windows 95, the original CONFIG.SYS and AUTOEXEC.BAT files for Windows remain unaltered, while DR-DOS employs DCONFIG.SYS and AUTODOS7.BAT as its startup scripts.
OS/2 and Windows NT
OS/2 extensively uses CONFIG.SYS to set up device drivers and environment parameters prior to launching its graphical user interface.
Within the OS/2 subsystem on Windows NT, the settings traditionally stored in CONFIG.SYS are instead maintained in the system registry.
A number of CONFIG.SYS commands utilized by OS/2 have not been officially documented.
CONFIG.SYS continues to be used 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
- FreeDOS CONFIG.SYS directive descriptions
- User manual for PTS-DOS 2000 Pro including CONFIG.SYS commands
- German-language unofficial PTS-DOS FAQ (archived) – additional CONFIG.SYS directives