PS1 (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 systems. This ASCII text file holds setup instructions accessible to users, which are interpreted by the DOS BIOS of the operating system during the boot sequence. CONFIG.SYS was first introduced with DOS version 2.0.
Usage
The directives within CONFIG.SYS configure DOS to manage devices, applications, and memory allocation. Once CONFIG.SYS has been processed, DOS initiates the command shell specified by the SHELL directive; if none is provided, it defaults to COMMAND.COM, which subsequently executes AUTOEXEC.BAT.
Typically, the file contains name=value pairs that set adjustable parameters or load device drivers and terminate-and-stay-resident programs (TSRs) into memory.
In DOS systems, CONFIG.SYS is located in the root directory of the active boot drive.
Certain DOS variants check for alternative configuration filenames that override CONFIG.SYS:
- Advanced editions such as Concurrent DOS 386, Concurrent DOS XM, Multiuser DOS, System Manager, and REAL/32 prioritize CCONFIG.SYS over CONFIG.SYS. Multiuser DOS may also utilize CCONFIG.INI, whereas REAL/32 employs MCONFIG.SYS. These platforms support enhanced configuration settings stored in binary files like CCONFIG.BIN, which can be modified through CONFIG.EXE.
- In systems like DR DOS 3.31, PalmDOS 1.0, Novell DOS 7, OpenDOS 7.01, and DR-DOS versions 7.02 and later, DCONFIG.SYS takes precedence over CONFIG.SYS. Originally associated with disk compression utilities, this file also facilitates multi-boot setups. Additionally, OpenDOS 7.01 and DR-OpenDOS 7.02 look for ODCONFIG.SYS, while some DR-DOS 7.02+ variants search for DRCONFIG.SYS.
- Starting with DR DOS 6.0, users can alter default system file extensions using the SYS /DR:ext command, allowing multiple sets of system files to coexist in the same root directory and be selected via boot loaders such as LOADER.
- The SHELL command supports specifying alternate AUTOEXEC.BAT files using /P[:filename.ext]. In this mode, COMMAND.COM can execute files with extensions other than ".BAT," a capability also available in 4DOS.
- From DR-DOS 6.0 onward, the CHAIN=filespec directive enables loading additional configuration files from anywhere on the boot drive; DR-DOS 7.02 and later introduce an optional label parameter (CHAIN=filespec,label) to jump to specific sections within those files.
- DR-DOS 7.03 and subsequent releases provide a SYS /A option that copies related CONFIG.SYS and AUTOEXEC.BAT files alongside system files during setup.
Other DOS variants have implemented comparable mechanisms:
- FDCONFIG.SYS is used by FreeDOS
- RXCONFIG.SYS is employed by RxDOS version 7.24 and above
- CONFIG.PTS is utilized by PTS-DOS
Within Windows versions built on DOS (Windows 95, Windows 98), CONFIG.SYS and AUTOEXEC.BAT exist but generally remain empty. In contrast, Windows Me bypasses parsing CONFIG.SYS at startup and instead loads environment variables from the Windows Registry at:
- HKLM\System\CurrentControlSet\Control\SessionManager\Environment
For the FlexOS operating system, 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>
:;*?!
- Used to define labels within CONFIG.SYS, serving as jump points for commands such as , , , , and .
- Functions similarly to , but also supports inline comments that follow other CONFIG.SYS commands. (Note: Under MS-DOS/PC DOS, inline comments inside double quotes are not ignored.)
- Initiates inline comments alongside the ; directive.
- Prompts a Yes/No confirmation before executing subsequent CONFIG.SYS commands. (FreeDOS supports conditional execution with boot menus but lacks optional message prompts.) DOS version 6.0 and later introduce similar functionality by appending after directives.
- Forces the immediate execution of the next CONFIG.SYS command without condition.
ATemplate:NbndC
- Determines whether programs can be interrupted upon encountering errors.
- Sets which drives record file access timestamps within FAT file systems.
- Enables conditional execution on AT-compatible hardware.
- Manages boot loading sequences.
- Adjusts the verbosity level of error messages displayed.
- Changes the default serial device driver assignment (COM1: through COM4:) for the AUX device.
- Prevents access to character devices outside the virtual \DEV directory.
- Loads a fundamental device driver into system memory.
- Produces a brief beep even when audible alerts are disabled.
- Specifies which operating system should boot next.
- Enables or disables extended Ctrl+C interrupt checking.
- Defines the quantity of disk buffers allocated.
- Similar to BUFFERS but places buffers into High Memory Area (HMA) or Upper Memory Blocks (UMB).
- , ;, ; (Embedded DOS 6-XL only)
- Controls cache block allocation and flush timing parameters.
- Executes programs within CONFIG.SYS, pausing further processing until completion.
- Sets keyboard Caps Lock state on or off.
- , ; (PTS-DOS only)
- Configures CD-ROM driver name and buffer allocation.
- Continues processing CONFIG.SYS from a specified file or label.
- , ;, ;, ;, ;, ;, ;, ;, ;, ;, ;, ;, etc.
- Various directives addressing system configuration across DOS versions, focusing on device setup, display settings, internationalization support, and CPU-specific conditional execution.
This section summarizes essential CONFIG.SYS directives used for managing system configuration in multiple DOS environments. It highlights commands that influence device drivers, memory allocation, buffer management, and conditional processing—vital for fine-tuning legacy systems or embedded DOS implementations in professional settings.
DTemplate:NbndF
- Configures relocation parameters for drive descriptor tables.
- Defines the memory segment address used for multi-sector disk data deblocking operations.
- Activates internal debugger support features.
- Controls boot management functions.
- Loads device drivers into conventional memory.
- Loads device drivers into upper memory areas (equivalent to in DRDOS 5.0).
- Sets country and codepage information for keyboard (KBD), screen (SCR), and printer (LPT) devices.
- Specifies sizes of cache memory segments.
- Sets floppy disk compatibility modes.
- Defines display font parameters.
- Manages loading of DOS into high memory and utilization of upper memory blocks.
- Loads DOS configuration tables (BUFFERS, FCBS, FILES, LASTDRIVE, STACKS) into upper memory regions.
- Specifies an alternative directory path for DOS files.
- Defines search paths for data files.
- Details physical disk drive parameters.
- Configures parameters for unidentified drives.
- See .
- Enables creation of PDUMP.nnn error log files and designates their drive location.
- Displays a message on screen during boot or processing.
- Shows messages incorporating ANSI escape codes for formatting.
- Adds extra validation checks when launching programs.
- Sets assumed error or return codes for subsequent commands.
- Controls A20 gate state when initiating programs.
- Terminates CONFIG.SYS processing prematurely (except for SWITCHES and SHELL under certain conditions).
- Defines hash table size to accelerate file open operations, differing from MS-DOS/PC DOS FASTOPEN driver behavior.
- Specifies the number of cached File Control Blocks (FCBs) allowed simultaneously (shares buffer space with FILES in DR-DOS).
- Similar to FCBS but loads FCBs into upper memory areas.
- Boot management directive.
- Sets maximum number of files that can be opened concurrently.
- Like FILES but loads file handles into upper memory blocks.
- Includes execution of specified subsections within CONFIG.SYS (see IGNORE).
GTemplate:NbndI
- Waits for a key press or timeout, setting the error level to the ASCII value of the key or 1024 if timed out.
- Resumes CONFIG.SYS processing 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.
- See for further information.
- Consult for more context.
- Refer to or for related functions.
- See or for comparable commands.
- Consult for relevant information.
- Loads a TSR (Terminate and Stay Resident) program into memory after relocating the DOS data segment. Related command: INSTCDEX.
- Refer to , , or for further guidance.
- See for additional details.
- Consult or for related usage.
- Activates console and command line history buffers with enhanced pattern search capabilities.
- Defines the address of the High Memory Area (HMA) segment.
- Configures the HLT (halt) power-saving mode.
- Enables scanning of boot sector viruses during startup.
- Loads installable file system drivers.
- Skips execution of designated CONFIG.SYS subsections.
- Permits specified applications to execute at ring 2, allowing direct hardware I/O access.
- Incorporates directives from another menu block, emulated via GOSUB/RETURN in DR-DOS environments.
- Toggles the keyboard Insert mode status on or off.
- Loads TSR programs into memory.
- Installs TSR programs into upper memory, functioning similarly to HIINSTALL in DR DOS 5.0.
- Loads TSR programs after relocating the DOS data segment, akin to INSTALL command behavior.
- Adjusts PIC interrupt priorities to elevate a specified IRQ number.
KTemplate:NbndM
- Sets the keyboard layout configuration.
- Defines the relocated keyboard buffer’s memory address.
- Specifies the maximum number of accessible drives.
- Similar to LASTDRIVE but additionally loads Current Directory Structure (CDS) into upper memory.
- Lists directories searched for DLL files.
- Manages backward compatibility with legacy software applications.
- Determines the quantity of file locks allowed.
- Configures boot logo display when using PTS-DOS boot manager.
- Specifies count, order, I/O port address, and timeout settings for LPT1 device.
- Sets count, order, I/O port address, and timeout parameters for LPT2 device.
- Defines count, order, I/O port address, and timeout values for LPT3 device.
- Enables and configures parameters for LPT4 device operation.
- Establishes wait duration before increasing process priority level.
- Configures strategies for memory allocation management.
- Determines default memory allocation approach used by DOS.
- Defines menu option selections available to users.
- Specifies color schemes for menus (can be emulated under DR-DOS).
- Sets default menu block selection (emulatable in DR-DOS).
- Defines multiple menu blocks (DR-DOS emulation supported).
- Enables multitrack functionality on disk drives.
- Continues processing CONFIG.SYS from a new file after loading a device driver and setting %NEWFILE% environment variable.
NTemplate:NbndQ
- Sets default No () response character in Yes/No/Resume prompts.
- Controls keyboard [[Num Lock|Template:Keypress]] status activation or deactivation.
- Enables conditional execution based on the last error code, such as .
- Displays text and waits for user key press, similar to and commands in DR-DOS systems.
- Requires user confirmation of errors encountered during CONFIG.SYS processing.
- Configures buffer sizes allocated for LPT ports.
- Allows conditional execution exclusively on PC-compatible hardware platforms.
- Sets process scheduler priority levels.
- Assigns priority levels specifically for disk I/O related programs.
- Changes default printer device driver assignment among LPT1 through LPT4 ports.
- Restricts execution of DOS applications under certain conditions.
- Loads an alternative user interface shell environment.
- Enables conditional execution on IBM PS/1-compatible machines only.
- Enables conditional execution on IBM PS/2-compatible machines only.
- Suppresses output directed to STDOUT.
RTemplate:NbndT
- Activates automatic system reboot upon encountering errors.
- Permits inclusion of comments within CONFIG.SYS.
- Reserves a drive letter to prevent allocation by local block device drivers.
- Sets the default character for Resume () 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.
- Enables concurrent loading of programs in the background during CONFIG.SYS processing, functioning similarly to CALL or INSTALL commands in DOS.
- Saves the initial character of deleted files within the FAT reserved area.
- Determines video mode settings under FreeDOS or screen access methods for PTS-DOS.
- Controls the Scroll Lock key status on the keyboard (enabled or disabled).
- Establishes environment variables.
- Loads the command interpreter shell.
- Functions like SHELL but includes support for a SIZE parameter, allowing relocation of COMMAND.COM into High Memory Area (HMA) or Upper Memory Blocks (UMBs), optimizing memory usage with third-party shells.
- Specifies keyboard modifier states such as Shift Lock, Num Lock, Scroll Lock, and Insert mode.
- Defines whether files close upon receiving a Ctrl+Alt+Del command.
- Indicates whether to bypass Power-On Self-Test (POST) during reboot.
- , STACKSIZE, STACKSHIGH
- Configure stack size parameters across various DOS versions and platforms with specific memory management capabilities.
- , SYSBOOT, SYSGEN, SYSLOAD
- PTS-DOS commands that manage boot configurations, system memory locations, and alternative operating system load paths.
- , SUPPRESSPOPUPS, SWAPPATH
- Control submenu blocking (non-DR DOS), designate drives for error logging (OS/2), and set swap file directories (OS/2).
- , SWITCHES, SWITCHAR
- Manage conditional processing flow within CONFIG.SYS and define default switch characters ('/' or '-').
- , TIMESLICE
- Set timeout intervals for prompts and scheduler time slices applicable to DR DOS, PTS-DOS, and OS/2 environments.
- , TRACE, TRACEBUF
- Handle temporary file extensions and enable or disable single-step execution tracing in CONFIG.SYS/AUTOEXEC.BAT with adjustable log buffer sizes depending on the operating system.
- , THREADS
- Enable detailed error logging (OS/2) and specify the number of concurrent threads.
UTemplate:NbndZ
- Configures DOS to allocate a specific segment as Upper Memory Block (UMB) space.
- Specifies the UMB server in use.
- Defines address ranges designated as UMB RAM.
- Enables or disables verification of disk writes.
- Sets the DOS version reported to applications.
- Manages VGA display status settings.
- Specifies current video mode similar to FreeDOS's SCREEN command.
- Determines whether virtual DMA is permitted.
- Controls deactivation of processor Virtual Mode Extensions.
- Configures VxD driver parameters for Windows environments.
- Sets up system-level support for Windows.
- Manages relocation of Extended BIOS Data Area (XBDA).
- Executes commands conditionally on XT-compatible machines.
- Configures built-in Year 2000 compliance support.
- Sets the default affirmative response character in prompts.
- Enables tracking of file deletions.
Issues
While it is possible for the system to boot without CONFIG.SYS or AUTOEXEC.BAT present, these files are critical for complete operating system customization and loading necessary software components. Damage or corruption in these files requires troubleshooting intervention.
If CONFIG.SYS does not contain a SHELL directive or if it is missing or corrupted, DOS attempts to locate COMMAND.COM in the root directory of the boot drive. Versions prior to 6.0 will fail to boot without this file. MS-DOS 6.0, PC DOS 6.1, Novell DOS 7+, and comparable versions prompt users to specify a command processor path if COMMAND.COM is absent or fails to load, allowing limited runtime shell substitution.
COMMAND.COM from MS-DOS version 7.0 onwards is incompatible with DR-DOS but is usually found in C:\ during dual-boot configurations. Starting with DR-DOS 7.02, skipping SHELL directives in skip/trace/step modes is prohibited to avoid conflicts. Users are prompted to define a valid shell before COMMAND.COM can be loaded from the root directory.
The maximum size allowed for CONFIG.SYS varies: MS-DOS and PC DOS impose limits measured in kilobytes (recently up to approximately 64 KB), whereas DR-DOS effectively has no practical size restriction because it processes directives line-by-line rather than compiling them upfront. This approach permits fine-tuned control over driver and TSR loading sequences via DEVICE and INSTALL, which is advantageous for resolving conflicts or integrating debugging tools and temporary utilities.
Earlier MS-DOS releases restricted the length of the SHELL command line to 31 characters. Later iterations increased this limit up to 128 characters, while DR-DOS supports up to 255 characters. It should be noted that CONFIG.SYS directives do not accommodate long file names.
Dual Booting with DOS and Windows 9x
When Windows 95 is installed over a pre-existing DOS or Windows environment, the system renames CONFIG.SYS and AUTOEXEC.BAT to CONFIG.DOS and AUTOEXEC.DOS respectively. This modification enables a dual boot setup allowing users to switch between Windows 9x and DOS. While booting into DOS, these files are temporarily restored to their original names, CONFIG.SYS and AUTOEXEC.BAT. Additionally, backup copies of the Windows 95 configuration files are saved as CONFIG.W40 and AUTOEXEC.W40.
In configurations where Caldera DR-DOS versions 7.02 or 7.03 coexist with Windows 95, the Windows CONFIG.SYS and AUTOEXEC.BAT files remain intact. Instead, DR-DOS utilizes separate startup files named DCONFIG.SYS and AUTODOS7.BAT.
OS/2 and Windows NT
OS/2 depends extensively on CONFIG.SYS for setting up device drivers and environment parameters prior to launching its graphical user interface.
Within the OS/2 subsystem of Windows NT, CONFIG.SYS is presented to OS/2 applications but is actually maintained within the system registry rather than as a physical file.
OS/2 employs several CONFIG.SYS commands that are not officially documented.
The use of CONFIG.SYS continues in OS/2 successors 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
- Guide to FreeDOS CONFIG.SYS directives
- User Manual for PTS-DOS 2000 Pro including CONFIG.SYS commands (archived)
- Unofficial German PTS-DOS FAQ covering CONFIG.SYS directives (archived)