TIMESLICE (CONFIG.SYS directive)
| Company type | Configuration file |
|---|---|
| Industry | Operating systems |
| Founded | 1983 |
| Products | System configuration directives for DOS and OS/2 |
CONFIG.SYS serves as the chief configuration file for DOS and OS/2 operating system families. This particular ASCII text document includes setup commands that the operating system's DOS BIOS—typically found in IBMBIO.COM or IO.SYS—interprets during the boot sequence. CONFIG.SYS was first introduced with DOS version 2.0.
Usage
The directives within CONFIG.SYS tailor DOS settings for hardware devices, software applications, and memory management utilities. Once CONFIG.SYS is processed, DOS initiates the command interpreter specified by the SHELL directive; if none is provided, it defaults to COMMAND.COM, which subsequently executes AUTOEXEC.BAT.
CONFIG.SYS primarily contains name=value pairs that define configurable parameters or load 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.
Certain DOS variants prioritize alternative filenames over CONFIG.SYS:
Advanced editions of Concurrent DOS 386, Concurrent DOS XM, Multiuser DOS, and REAL/32 utilize CCONFIG.SYS (derived from "Concurrent") in place of CONFIG.SYS. Multiuser DOS occasionally employs CCONFIG.INI, whereas REAL/32 searches for MCONFIG.SYS. These platforms support supplementary configuration parameters stored in binary files such as CCONFIG.BIN, which are typically managed via CONFIG.EXE.
For DR DOS 3.31, PalmDOS 1.0, Novell DOS 7, and DR-DOS versions 7.02 and later, DCONFIG.SYS (originating from "DR DOS") supersedes CONFIG.SYS. Initially designed to work with disk compression utilities that modify drive letter assignments, it also facilitates multi-boot setups. OpenDOS 7.01 and DR-OpenDOS 7.02 look for ODCONFIG.SYS, while certain DR-DOS releases recognize DRCONFIG.SYS as well.
Starting with DR DOS 6.0, the command SYS /DR:ext enables customization of system file extensions to allow multiple simultaneous configuration files within a single root directory, selectable through boot loaders such as LOADER used by Multiuser DOS and DR-DOS 7.x series. The SHELL directive supports specifying alternate AUTOEXEC.BAT files using /P[:filename.ext], with COMMAND.COM accepting extensions beyond .BAT in this mode—a feature also supported by 4DOS. Additionally, the CHAIN=filespec command permits continuation of configuration processing in another file, which need not reside in the root directory; from DR-DOS 7.02 onward, chaining can target specific labels within these files. DR-DOS 7.03 and newer include a SYS /A option to duplicate CONFIG.SYS and AUTOEXEC.BAT alongside system files.
FreeDOS employs FDCONFIG.SYS, RxDOS version 7.24 and above use RXCONFIG.SYS, and PTS-DOS utilizes CONFIG.PTS as analogous configuration files.
In Windows 95 and Windows 98—both built upon DOS—CONFIG.SYS and AUTOEXEC.BAT remain present but are generally left empty. 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
Within the FlexOS operating system, CONFIG.SYS exists as a binary file that specifies resource managers and device drivers to be loaded during 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>
:;*?!
- Acts as a label within CONFIG.SYS, serving as a jump destination for , , , and commands.
- Functions similarly to , but is usable for inline comments following other CONFIG.SYS instructions. (Note: In MS-DOS/PC DOS, inline comments enclosed in double quotes are not ignored.)
- Introduces inline remarks alongside the ; directive.
- Prompts the user with a Yes/No question to confirm execution of subsequent CONFIG.SYS commands. (FreeDOS allows optional conditions with boot menus via and .) DOS 6.0 and later versions support a comparable feature by appending after the directive, e.g., .
- Forces unconditional execution of the next CONFIG.SYS instruction.
ATemplate:NbndC
- Determines whether programs may be terminated upon encountering errors.
- Sets which drives record file access timestamps within FAT file systems.
- Executes conditionally on AT-compatible hardware.
- Boot manager utility.
- Adjusts the verbosity level of error messages displayed.
- Alters the default serial device driver assignment (from COM1: through COM4:) for the AUX device.
- Prevents character devices from being accessible outside the phantom \DEV directory.
- Loads a base device driver into memory.
- Produces a brief beep sound even if audible alerts are disabled.
- Specifies the operating system to boot subsequently.
- Enables or disables extended Ctrl+C checking functionality.
- Defines the quantity of disk buffers to allocate.
- Similar to BUFFERS but loads buffers into HMA or UMB areas.
- , CACHETTL, CACHEFLUSH (Embedded DOS 6-XL only)
- Manage cache block allocation and flushing parameters.
- Loads executable programs within CONFIG.SYS, running them in the foreground and pausing processing until they return.
- (DR-DOS 7.02+)
- Sets keyboard Caps Lock status to on or off.
- , CDDBUFFERS (PTS-DOS only)
- Configures CD-ROM hardware parameters and buffer allocation.
- (DR DOS 5.0+ and Embedded DOS)
- Continues processing CONFIG.SYS from a new file or label.
- , CLS, CODEPAGE, CMOSADDR, COLOR (PTS-DOS or OS/2 specific)
- Configure system clock settings, clear screen commands, OEM codepages, CMOS RAM address, and boot menu color schemes respectively.
- (DR-DOS 7.02+)
- Defines count, order, I/O address, and timeout parameters for COM ports.
- , COMMENT(S), COUNTRY (various DOS versions)
- Specify DMA buffer sizes, redefine comment characters, or enable internationalization support respectively.
- , CPSW (DR-DOS/MS-DOS)
- Controls cursor positioning or codepage switching capabilities.
- CPU-related directives (PTS-DOS and DR-DOS)
- Execute conditionally based on CPU type and clock speed ranging from CPU88 up to CPU486+.
DTemplate:NbndF
- Adjusts relocation settings for drive descriptor tables.
- Sets the memory segment limit up to which multi-sector disk data deblocking is permitted.
- Enables built-in debugger support features.
- Boot manager utility.
- Loads device drivers into memory.
- Loads device drivers into upper memory areas (equivalent to in DRDOS 5.0).
- Configures country and codepage information for keyboard, screen, and printer devices.
- Sets cache memory size parameters.
- Defines floppy disk compatibility modes.
- Specifies display font settings.
- Controls loading of DOS into high memory and/or use of upper memory blocks.
- Loads DOS tables such as BUFFERS, FCBS, FILES, LASTDRIVE, and STACKS into upper memory regions.
- Provides an alternative path location for DOS files.
- Specifies search paths for data files.
- Defines physical disk drive parameters.
- Sets parameters for unrecognized drives.
- See .
- Activates and designates drive for PDUMP.nnn error log files.
- Displays messages on screen during processing.
- Outputs messages including ANSI escape codes.
- Determines whether extra validation checks are performed when launching programs.
- Assigns assumed error or return codes for subsequent commands.
- Controls A20 gate state upon program startup.
- Terminates CONFIG.SYS processing prematurely (excluding SWITCHES and SHELL directives).
- Configures hash table size to optimize fast file opening operations, differing from MS-DOS/PC DOS FASTOPEN driver behavior.
- Sets maximum number of cached File Control Blocks (FCBs) that can be opened simultaneously (shares buffer with FILES under DR-DOS).
- Similar to FCBS but loads FCBs into upper memory areas.
- Boot manager utility.
- Defines maximum number of files allowed open concurrently.
- Same as FILES but loads file handles into upper memory blocks.
- Includes execution of specified CONFIG.SYS subsections (refer to IGNORE).
GTemplate:NbndI
- Waits for a key press or timeout, then assigns 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, returning afterward to the prior point.
- Refer to , , or for additional details.
- Consult for further information.
- See for relevant context.
- Refer to or as needed.
- See or for guidance.
- Consult for related instructions.
- Loads a TSR program following relocation of the DOS data segment. For comparison, see INSTCDEX.
- Refer to , , or for more information.
- See for additional context.
- Consult or as applicable.
- Activates console and command line history buffers with enhanced pattern searching capabilities.
- Defines the address of the HMA memory segment.
- Configures the HLT mode to conserve energy.
- Enables scanning for boot sector viruses.
- Loads installable file system drivers.
- Prevents execution of certain CONFIG.SYS subsections.
- Permits designated programs to operate at ring 2 level, allowing direct hardware I/O access.
- Incorporates directives from another menu block, emulated via GOSUB/RETURN in DR-DOS environments.
- Sets the state of the keyboard Insert mode.
- Installs a TSR utility into memory.
- Loads a TSR program into upper memory, analogous to HIINSTALL in DR DOS 5.0.
- Installs a TSR after relocating the DOS data segment. Compare with INSTCDEX for differences.
- Rotates PIC interrupt priority levels to assign highest priority to a selected IRQ.
KTemplate:NbndM
- Defines the keyboard layout configuration.
- Specifies the relocated keyboard buffer's memory address.
- Determines the maximum number of accessible drive letters.
- Functions similarly to LASTDRIVE but loads Current Directory Structure (CDS) into upper memory instead.
- Lists directories searched for dynamic link libraries (DLLs).
- Handles compatibility settings for legacy applications.
- Sets the quantity of file locks permitted.
- Configures support for boot logos and startup message displays.
- Specifies count, sequence, I/O address, and timeout parameters for the LPT1 device port.
- Provides identical configuration options as LPT1 but applied to LPT2 device port.
- Mirrors LPT1 settings but directed at LPT3 device port.
- Enables and configures LPT4 device port similarly to others above.
- Defines delay before elevating process priority in scheduling operations.
- Sets parameters governing memory allocation strategies.
- Establishes default DOS memory allocation behavior.
- Defines available menu options within CONFIG.SYS processing.
- Specifies color schemes used in menus (can be emulated under DR-DOS).
- Sets default menu block selection (emulatable in DR-DOS).
- Defines an individual menu block (also emulatable under DR-DOS).
- Enables multitrack disk drive operations support.
- Continues CONFIG.SYS execution within a new file after loading specific drivers and setting environment variable %NEWFILE%.
NTemplate:NbndQ
- Sets the default "No" character used in Yes/No/Resume prompts.
- Determines whether keyboard [[Num Lock|Template:Keypress]] is enabled or disabled by default.
- Allows conditional execution based on the last error code returned, such as .
- Displays text and waits for a key press, similar in function to and commands in DR-DOS systems.
- Requires user confirmation when errors occur during CONFIG.SYS processing.
- Configures buffer sizes assigned to LPT1, LPT2, and LPT3 ports respectively.
- Enables conditional execution only on PC-compatible hardware platforms.
- Adjusts scheduler priority settings for processes or tasks.
- Sets priority levels specifically for disk input/output operations.
- Changes the default printer device driver, e.g., switching from LPT1 to LPT3 or LPT4 devices.
- Specifies whether DOS applications are permitted to run on the system.
- Loads a user interface shell environment during startup.
- Enables conditional execution tailored for IBM PS/1-compatible machines only.
- Allows conditional execution specific to IBM PS/2-compatible systems exclusively.
- Suppresses output directed toward STDOUT.
RTemplate:NbndT
- Activates automatic system reboot upon encountering errors.
- Permits inclusion of comments within CONFIG.SYS files.
- Allocates a drive letter to be excluded from local block device driver usage.
- Establishes the default Resume () character displayed in command prompts.
- Returns control from nested CONFIG.SYS processing to the prior GOSUB or SWITCH point, optionally providing a return code.
- Specifies the size of real mode memory available.
- Allows simultaneous loading of programs in CONFIG.SYS by running them in the background.
- Saves the initial character of deleted files within the reserved FAT area.
- Determines video mode settings (FreeDOS) or screen access methods (PTS-DOS).
- Sets the keyboard Scroll Lock key status to on or off.
- Defines environment variables for the system session.
- Loads the command interpreter shell executable.
- Similar to SHELL but supports pre-allocating space for COMMAND.COM, enabling relocation of its resident portion into HMA or UMBs, which reduces fragmentation when using third-party shells.
- Specifies keyboard modifier states such as Shift Lock, Num Lock, Scroll Lock, and Insert mode.
- Configures whether files should close automatically upon pressing Ctrl+Alt+Del.
- Determines if Power-On Self-Test (POST) is skipped during reboot sequences.
- , STACKSIZE, STACKSHIGH
- Configure interrupt stack sizes and buffer locations across various DOS versions and embedded platforms.
- , SYSBOOT, SYSGEN, SYSLOAD
- PTS-DOS-specific commands managing boot manager configurations, alternative operating system boot files, DOS memory layout, and system loading regions.
- Defines submenu blocks (available from DOS 6.0 onwards); unsupported by DR-DOS or FreeDOS but can be simulated using CLS, ECHO, and SWITCH commands.
- , SWAPPATH
- OS/2 directives specifying error log drive locations and swap file paths.
- , SWITCHES
- Enable conditional nested processing within CONFIG.SYS based on key inputs or special options, varying by operating system.
- , sets the default command switch character ('/' or '-') across DOS variants including DR-DOS, PTS-DOS, and FreeDOS.
- Additional OS/2-specific directives include SXFAKEHWFPU (to address FPU bugs), THREADS (number of concurrent threads), TIMESLICE (scheduler time slices), TRACE (single-step execution), TRACEBUF (trace log buffer size), and TRAPDUMP (error logging).
UTemplate:NbndZ
- Assigns a specific memory segment to function as an Upper Memory Block (UMB).
- Configures the UMB server parameters.
- Defines address ranges allocated for UMB RAM usage.
- Enables or disables verification of disk writes.
- Reports the DOS version information to applications.
- Manages VGA display status settings.
- Specifies the current video mode configuration.
- Enables use of virtual Direct Memory Access (DMA).
- Controls processor Virtual Mode Extensions (VME) features.
- Configures Windows virtual device drivers (VxDs).
- Sets up support for Windows system operations.
- Relocates the Extended BIOS Data Area (XBDA) in memory.
- Allows conditional execution based on XT-compatible hardware detection.
- Configures Year 2000 compliance support options.
- Sets the default affirmative response character for user prompts.
- Tracks file deletions within the system.
Issues
Although it is possible for the system to start without CONFIG.SYS or AUTOEXEC.BAT files, these configuration files are critical for comprehensive DOS customization and meeting software prerequisites. If these files are missing or corrupted, troubleshooting becomes necessary.
When CONFIG.SYS does not include a SHELL directive or if it is absent or damaged, DOS attempts to locate COMMAND.COM in the root directory of the boot drive. Versions prior to DOS 6.0 will fail to boot if COMMAND.COM cannot be found. Starting with MS-DOS 6.0/PC DOS 6.1, Novell DOS 7, and later releases, users are prompted during startup failures or if COMMAND.COM aborts to specify an alternative command interpreter path. This feature permits limited shell replacement at runtime without requiring a reboot.
The COMMAND.COM from MS-DOS 7.0 onward is incompatible with DR-DOS, which impacts dual-boot configurations. DR-DOS version 7.02 and above restrict skipping SHELL directives during skip or trace modes and will prompt users for a valid shell filename if none is found before defaulting to loading COMMAND.COM from the root directory.
Under MS-DOS/PC DOS, CONFIG.SYS file size is constrained to several kilobytes (up to 64 KB in newer versions), whereas DR-DOS imposes no fixed limit other than those dictated by the file system itself. MS-DOS preprocesses CONFIG.SYS by tokenizing its contents before executing directives sequentially—loading device drivers prior to TSRs. Conversely, DR-DOS processes CONFIG.SYS line-by-line, granting fine-grained control over driver and TSR loading order through DEVICE and INSTALL commands. This approach facilitates conflict resolution and debugging and allows conditional execution based on hardware detection or user input.
The INSTALL command in DR-DOS enables integration of non-resident programs within CONFIG.SYS processing flow, enhancing flexibility.
In MS-DOS/PC DOS versions 2.0 through 4.01, the SHELL directive was limited to 31 characters in length. Later DOS releases expanded this limit up to 128 characters, while DR-DOS supports up to 255 characters. It is important to note that CONFIG.SYS directives do not accept long filenames.
Dual booting DOS and Windows 9x
When Windows 95 is installed over a pre-existing DOS or Windows environment, the files CONFIG.SYS and AUTOEXEC.BAT are renamed to CONFIG.DOS and AUTOEXEC.DOS respectively, enabling a dual-boot setup between Windows 9x and DOS. During a DOS boot, these renamed files are temporarily reverted to their original filenames. Additionally, Windows 95 versions of these files are saved as CONFIG.W40 and AUTOEXEC.W40.
In cases where Caldera DR-DOS 7.02 or 7.03 is installed alongside Windows 95, the Windows CONFIG.SYS and AUTOEXEC.BAT remain unaltered. Instead, DR-DOS utilizes DCONFIG.SYS and AUTODOS7.BAT as its configuration files during startup.
OS/2 / Windows NT
OS/2 relies heavily on CONFIG.SYS to set up drivers and environment variables 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.
Numerous CONFIG.SYS commands in OS/2 lack comprehensive documentation or remain undocumented.
The use of CONFIG.SYS continues 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 about 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) – details on DR-DOS 7 directives
- FreeDOS CONFIG.SYS directive descriptions
- PTS-DOS 2000 Pro User Manual featuring CONFIG.SYS directives (archived)
- German-language unofficial PTS-DOS FAQ (2004) with extra CONFIG.SYS directives (archived)