LIBPATH (CONFIG.SYS directive)
| Company type | Configuration file |
|---|---|
| Industry | Computer software |
| Founded | 1983 |
| Products | System configuration for DOS and OS/2 |
CONFIG.SYS serves as the central configuration file for DOS and OS/2 operating systems. This particular ASCII text file holds setup instructions accessible to users, which are interpreted by the DOS BIOS (commonly within IBMBIO.COM or IO.SYS) during system startup. CONFIG.SYS was first introduced with DOS version 2.0.
Usage
The directives within CONFIG.SYS are responsible for configuring DOS to manage devices, applications, and memory allocation. Once CONFIG.SYS has been processed, DOS initiates the command interpreter designated by the SHELL directive, defaulting to COMMAND.COM if none is specified; this shell then executes commands from AUTOEXEC.BAT.
Typically, CONFIG.SYS is composed of name=value statements that set adjustable parameters or load components such as device drivers and terminate-and-stay-resident (TSR) programs. This file is located in the root directory of the bootable drive.
The same filename is utilized by (DCP), an MS-DOS variant developed by East-German firm VEB Robotron.
Certain DOS derivatives check for alternative filenames that take precedence over CONFIG.SYS:
Concurrent DOS 386, Concurrent DOS XM, Multiuser DOS, System Manager, and REAL/32 prioritize CCONFIG.SYS or CCONFIG.INI (in Multiuser DOS) and MCONFIG.SYS (in REAL/32). These platforms support extended configuration options stored in binary files like CCONFIG.BIN, which are generally modified via CONFIG.EXE.
In DR DOS versions 3.31 and later—including PalmDOS 1.0, Novell DOS 7, OpenDOS 7.01, and DR-DOS 7.02+—the filename DCONFIG.SYS supersedes CONFIG.SYS. Initially associated with disk compression configurations, this allows for multi-boot system setups. Additionally, OpenDOS 7.01 and DR-OpenDOS 7.02 recognize ODCONFIG.SYS, while some DR-DOS variants look for DRCONFIG.SYS.
Beginning with DR DOS 6.0, the SYS /DR:ext command enables modification of default system file extensions to maintain multiple parallel sets of system files within a single root directory; these can be selected using boot loaders like LOADER included in Multiuser DOS and DR-DOS 7.x releases. The SHELL directive supports specifying alternative AUTOEXEC.BAT files using /P[:filename.ext], a feature also supported by enhanced shells such as 4DOS. Since DR-DOS 7.02, the CHAIN=filespec instruction allows continuation of configuration processing in a separate file, optionally starting at a specific label.
DR-DOS versions 7.03 and later include SYS /A, which copies CONFIG.SYS and AUTOEXEC.BAT alongside other system files.
FreeDOS employs FDCONFIG.SYS, RxDOS 7.24 and newer use RXCONFIG.SYS, and PTS-DOS utilizes CONFIG.PTS.
Both CONFIG.SYS and AUTOEXEC.BAT exist in the root directory of boot drives for Windows 95 and Windows 98, though they are usually left empty. In contrast, Windows Me does not process CONFIG.SYS during startup; instead, it loads environment variables directly 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 at boot time.
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>
:;*?!
- Utilized in CONFIG.SYS to mark labels as jump destinations for , , , , and commands.
- Functions similarly to , also employed for inline comments following other commands. (In MS-DOS/PC DOS, inline comments enclosed in double quotes are not disregarded.)
- Used at the start of inline remarks alongside the ; command.
- Prompts with a Yes/No query to confirm execution of subsequent CONFIG.SYS commands. FreeDOS allows conditional options via boot menus but lacks optional messages. DOS 6.0 and later support a comparable feature by appending after a command (e.g., ).
- Executes the next CONFIG.SYS command unconditionally.
ATemplate:NbndC
- Determines whether programs can be terminated upon encountering errors.
- Sets which drives record file access dates within FAT file systems.
- Enables conditional execution on AT-compatible hardware.
- Boot management utility.
- Adjusts verbosity level of error messages.
- Alters default serial driver associated with the AUX device.
- Restricts access to character devices outside the phantom \DEV directory.
- Loads a base device driver into system memory.
- Produces a brief beep sound even if audio is disabled.
- Specifies which operating system to boot next.
- Enables or disables extended Ctrl+C detection.
- Defines the quantity of disk buffers to allocate.
- Explicitly loads buffers into High Memory Area (HMA) or Upper Memory Blocks (UMB).
- , , (Embedded DOS 6-XL exclusive)
- Controls cache allocation and flushing parameters.
- Loads specified programs during CONFIG.SYS processing, running them in the foreground and pausing further processing until they return.
- (DR-DOS 7.02+)
- Sets Caps Lock state on the keyboard.
- , , (PTS-DOS only)
- Configures CD-ROM drivers and their buffer settings.
- (DR DOS 5.0+, Embedded DOS)
- Continues CONFIG.SYS execution from a new file or label.
- , , (PTS-DOS, DR DOS)
- Defines clock type and clear screen functions.
- , (OS/2 exclusive)
- Specifies OEM codepage(s).
- , (DR-DOS 7.02+)
- Configures COM port count, sequence, I/O addresses, and timeouts.
- , (DOS 4.0+, RxDOS)
- Redefines characters used for inline comments or ignores subsequent lines, with exceptions in DR-DOS and Embedded DOS environments.
- , (DOS 3.0+, DR DOS 3.31+, OS/2)
- Activates international support.
... [Additional directives follow in similar fashion] ...
DTemplate:NbndF
- Manages relocation of drive descriptor tables in memory.
- Assigns memory segment address for multi-sector disk data deblocking operations.
- Activates internal debugger functionality.
- Boot management utility.
- Loads device drivers into system memory.
- Loads device drivers into upper memory areas (equivalent to in DRDOS 5.0).
- Configures country and codepage settings for keyboard, screen, and printer devices.
- Sets cache memory sizes for improved performance.
- Defines floppy disk compatibility mode settings.
- Specifies font used for display output.
- Controls loading of DOS into high memory and utilization of upper memory blocks (similar to in DRDOS 5.0).
- Determines loading of DOS tables such as BUFFERS, FCBS, FILES, LASTDRIVE, and STACKS into upper memory regions.
- Provides an alternative path for DOS file searches.
- Specifies search path for data files.
- Defines parameters for physical disk drives.
- Sets parameters for unidentified drives.
- See .
- Enables PDUMP.nnn error log creation and assigns target drive.
- Displays a message on the screen during processing.
- Outputs messages incorporating ANSI Escape sequences.
- Adds additional verification steps when launching programs.
- Sets assumed error or return codes for following commands.
- Manages A20 gate status when starting programs.
- Terminates CONFIG.SYS processing early except for SWITCHES and SHELL commands under specific conditions.
- Defines hash table size used for accelerating file open operations, differing from MS-DOS/PC DOS FASTOPEN driver behavior.
- Specifies number of cached File Control Blocks open concurrently (under DR-DOS, FCBS and FILES share buffers).
- Similar to FCBS but explicitly loads FCBs into upper memory areas.
- Boot management setting option.
- Sets maximum number of files that can be opened simultaneously.
- Similar to FILES but explicitly loads file handles into upper memory regions.
- Includes execution of specified CONFIG.SYS subsections (refer to 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 the specified label.
- Continues nested CONFIG.SYS processing at a given label, then returns to the prior point.
- Refer to , , or for additional details.
- Consult for further information.
- See for related commands.
- Refer to or as applicable.
- Consult or for related usage.
- See for more information.
- Loads a TSR program into memory similar to , but after relocating the DOS data segment. Compare with INSTCDEX.
- Refer to , , or for further context.
- See for related options.
- Consult or as necessary.
- Activates console and command line history with enhanced pattern searching capabilities.
- Defines the memory address of the HMA segment.
- Sets up HLT mode for energy saving.
- Determines whether the system performs boot sector virus checks.
- Loads installable file systems into memory.
- Prevents execution of certain CONFIG.SYS subsections as specified.
- Permits designated programs to execute at ring 2, enabling direct hardware I/O access.
- Incorporates directives from another menu block, emulated through GOSUB/RETURN in DR-DOS environments.
- Controls the keyboard Insert mode status.
- Installs a TSR program into memory space.
- Loads TSR into upper memory, equivalent to HIINSTALL in DR DOS version 5.0.
- Installs TSR after relocating the DOS data segment, similar in function to INSTALL.
- Adjusts PIC interrupt priorities to assign highest priority to a specified IRQ line.
KTemplate:NbndM
- Defines the keyboard layout configuration.
- Specifies the address of the relocated keyboard buffer area.
- Sets the maximum number of accessible drives in the system.
- Functions like LASTDRIVE but additionally loads the Current Directory Structure into upper memory.
- Lists directories used in DLL search paths.
- Manages compatibility with legacy applications.
- Determines the number of file locks permitted.
- Configures support for boot logos and controls startup message display options.
- Specifies count, order, I/O port address, and timeout parameters for LPT1 device configuration.
- Provides similar configuration settings for LPT2 device.
- Defines configuration parameters similarly for LPT3 device.
- Enables and sets parameters for LPT4 device operation.
- Sets the delay before increasing process priority level during execution.
- Configures memory allocation policies and strategies used by DOS.
- Establishes default memory allocation behavior for DOS operations.
- Defines available menu options within CONFIG.SYS menus.
- Specifies menu color schemes, which can be emulated under DR-DOS systems.
- Sets the default menu block to load, compatible with DR-DOS emulation.
- Defines multiple menu blocks, also emulatable under DR-DOS environments.
- Enables multitrack disk read/write capabilities on supported hardware.
- Continues processing CONFIG.SYS instructions from a new file after loading a device driver and setting %NEWFILE% environment variable.
NTemplate:NbndQ
- Sets the default character representing No () in Yes/No/Resume prompts during user interaction.
- Configures whether the keyboard’s [[Num Lock|Template:Keypress]] key is enabled or disabled by default.
- Enables conditional command execution based on the last error code returned by previous commands, such as .
- Displays a message and waits for a key press, functioning similarly to and in DR-DOS systems.
- Requires user confirmation when errors occur during CONFIG.SYS processing steps.
- Sets buffer sizes allocated for LPT parallel ports to optimize performance.
- Enables conditional command execution specifically on PC-compatible machines only.
- Adjusts scheduler priority levels for processes managed by DOS.
- Assigns priority levels specifically for disk input/output operations handled by DOS drivers.
- ; Changes the default printer device assignment among LPT1 through LPT4 ports as needed.
- Controls whether DOS programs are permitted to execute under current conditions.
- Loads a user interface shell environment during system startup or operation.
- ; Applies conditional execution rules targeting IBM PS/1-compatible hardware platforms exclusively.
- ; Applies conditional execution rules targeting IBM PS/2-compatible hardware platforms exclusively.
- ; Suppresses output directed to STDOUT to reduce console clutter or logging.
RTemplate:NbndT
- Activates automatic system reboot upon encountering errors.
- Permits inclusion of comments within CONFIG.SYS files.
- Allocates drive letters reserved by local block device drivers.
- Sets the default Resume () response character in Yes/No/Resume prompts.
- Returns control from nested CONFIG.SYS processing back to the previous GOSUB or SWITCH point, optionally passing a return code.
- Defines the size of real mode memory available.
- Allows simultaneous loading of programs in CONFIG.SYS in the background, functioning similarly to INSTALL under DOS.
- Saves the initial character of deleted files within the FAT reserved area.
- Determines the video mode under FreeDOS or specifies screen access methods for PTS-DOS.
- Controls the keyboard Scroll Lock state, enabling or disabling it.
- Sets environment variables for the system session.
- Loads the command interpreter shell.
- Functions like SHELL but includes a SIZE parameter to pre-allocate COMMAND.COM into HMA or UMBs, optimizing memory usage for third-party shells.
- Defines states for keyboard modifiers such as Shift Lock, Num Lock, Scroll Lock, and Insert mode.
- Specifies how files should be closed when Ctrl+Alt+Del is pressed.
- Skips the Power-On Self-Test (POST) during reboot sequences.
- , STACKSIZE, STACKSHIGH
- Manage hardware interrupt stack sizes and buffer locations across various DOS versions to enhance system stability and efficiency.
- , SYSBOOT, SYSGEN, SYSLOAD, SYSTOUMB
- PTS-DOS commands related to boot management, system file placement, and memory optimization using upper memory blocks (UMBs).
- , SWITCH
- Provides conditional processing capabilities that increase CONFIG.SYS flexibility on DOS and DR-DOS systems.
- , SWAPPATH
- OS/2 parameters defining paths for error logs and swap files to improve system dependability.
- , SWITCHES
- Establish system-wide options including command prefix characters and special switches applicable across different DOS variants.
- , THREADS, TIMESLICE
- OS/2-specific configurations controlling hardware floating-point unit fixes, concurrent thread handling, and scheduler time slices to optimize multitasking performance.
- , TRACE, TRACEBUF
- Oversee timing of CONFIG.SYS execution and maintain debugging logs to support system administration under DR-DOS, PTS-DOS, and OS/2 platforms.
- , TRAPDUMP
- Temporary file extension settings for PTS-DOS and detailed error logging under OS/2 that facilitate comprehensive system diagnostics.
UTemplate:NbndZ
- Specifies a particular segment for DOS to use as Upper Memory Block (UMB).
- Determines which UMB server is utilized by the system.
- Defines address ranges designated as UMB RAM areas.
- Enables or disables verification of disk writes.
- Reports a specified DOS version number to applications.
- Configures VGA display status parameters.
- Indicates the current video mode in use.
- Specifies whether virtual DMA functionality is permitted.
- Controls whether processor Virtual Mode Extensions (VME) are disabled.
- Configures VxD drivers for Windows environments.
- Sets system support parameters for Windows operation.
- Manages relocation of the Extended BIOS Data Area (XBDA).
- Conditional execution tailored for XT-compatible machines.
- Enables built-in support for Year 2000 compliance.
- Establishes default affirmative response characters in prompts.
- Manages tracking of file deletions.
Issues
Although booting can occur without CONFIG.SYS or AUTOEXEC.BAT files, these remain crucial for comprehensive DOS customization and software compatibility. Corruption or absence necessitates troubleshooting efforts.
If CONFIG.SYS is missing a SHELL directive or is damaged or absent altogether, DOS attempts to locate COMMAND.COM in the root directory of the boot drive. Versions prior to 6.0 will fail to boot if this file is unavailable. MS-DOS 6.0, PC DOS 6.1, and Novell DOS 7 and later versions prompt users to provide a command interpreter path when COMMAND.COM is missing or fails to start. This recovery mechanism allows running an alternative shell temporarily without rebooting.
COMMAND.COM versions from MS-DOS 7.0 onward are incompatible with DR-DOS, which impacts dual-boot configurations where COMMAND.COM resides on drive C:. To prevent bypass issues during skip/trace/step modes, DR-DOS 7.02 and later enforce SHELL directives strictly. Subsequent updates introduced recovery options that handle invalid SHELL arguments by prompting users for valid shell names before loading COMMAND.COM.
The size of CONFIG.SYS is limited to a few kilobytes under MS-DOS/PC DOS (up to 64 KB in later releases), whereas DR-DOS imposes no inherent size restriction aside from file system limits. MS-DOS loads CONFIG.SYS into a tokenized in-memory structure and processes directives sequentially—drivers first followed by TSRs. Conversely, DR-DOS interprets CONFIG.SYS line-by-line, enabling precise control over driver and TSR loading order via DEVICE and INSTALL commands. This approach resolves load conflicts and supports conditional execution based on hardware detection, key presses, error states, or return codes. The INSTALL directive further allows temporary external utilities to be incorporated into the boot sequence.
In MS-DOS/PC DOS versions 2.0 through 4.01, the maximum length of a SHELL command line was restricted to 31 characters. Later versions expanded this limit up to 128 characters. DR-DOS supports up to 255 characters for this directive. None of these systems permit long filenames within CONFIG.SYS directives.
Dual Booting 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 renaming supports dual boot functionality between Windows 9x and DOS by temporarily restoring these files to their original names during DOS startup. Additionally, Windows 95 configuration files are saved as CONFIG.W40 and AUTOEXEC.W40.
In setups where Caldera DR-DOS 7.02 or 7.03 coexists with Windows 95, the Windows CONFIG.SYS and AUTOEXEC.BAT files remain intact. Instead, DR-DOS employs DCONFIG.SYS (a traditional filename) along with AUTODOS7.BAT as its initialization scripts.
OS/2 / Windows NT
OS/2 relies heavily on CONFIG.SYS to set up device drivers and environment parameters before initiating its graphical user interface.
Within the Windows NT OS/2 subsystem, CONFIG.SYS is represented virtually inside the system registry.
There are numerous undocumented CONFIG.SYS commands specific to OS/2.
CONFIG.SYS continues to be a core component 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) – Guide to DR-DOS 7 directives
- Explanation of FreeDOS CONFIG.SYS commands
- PTS-DOS 2000 Pro User Manual including summary of CONFIG.SYS directives
- Unofficial German PTS-DOS FAQ (PTS/FAQD) with extended CONFIG.SYS command details