Jump to content

HISHELL (CONFIG.SYS directive)

From Alfawiki
Adapted from the English Wikipedia article HISHELL (CONFIG.SYS directive), available under CC BY-SA 4.0Updated 9 August 20251 source
CONFIG.SYS
Company typeConfiguration file
IndustryComputer software
Founded1983
ProductsSystem configuration for DOS and OS/2

CONFIG.SYS serves as the chief configuration file for DOS and OS/2 operating systems. This plain text ASCII file holds initialization commands that the operating system's DOS BIOS—commonly located in IBMBIO.COM or IO.SYS—interprets during system startup. CONFIG.SYS was first introduced with DOS version 2.0.

Usage

The directives within CONFIG.SYS are utilized to set up DOS for hardware devices, software applications, and memory handling. Once CONFIG.SYS has been processed, DOS launches the command interpreter specified by the SHELL directive; if none is provided, it defaults to COMMAND.COM, which then executes the contents of the AUTOEXEC.BAT file.

This file is primarily composed of name=value entries that either configure adjustable parameters or load device drivers and terminate-and-stay-resident programs (TSRs) into memory.

Within DOS environments, CONFIG.SYS is located in the root directory of the bootable drive.

Certain DOS variants substitute CONFIG.SYS with alternative filenames: - Advanced versions of Concurrent DOS 386, Concurrent DOS XM, Multiuser DOS, System Manager, and REAL/32 employ CCONFIG.SYS or CCONFIG.INI (in Multiuser DOS), saving configurations in a binary format named CCONFIG.BIN, which is managed through CONFIG.EXE. - Starting from version 3.31, DR DOS and its derivatives such as PalmDOS, Novell DOS, and OpenDOS prioritize DCONFIG.SYS, facilitating multi-boot arrangements and disk compression features. - OpenDOS 7.01 and DR-OpenDOS 7.02 also recognize ODCONFIG.SYS, while some iterations of DR-DOS check for DRCONFIG.SYS. - From DR DOS 6.0 onward, users can modify the default configuration file extension using SYS /DR:ext, enabling multiple configuration files to coexist within a single root directory, selectable by boot managers like LOADER. - The SHELL command supports specifying alternative AUTOEXEC.BAT files through /P[:filename.ext], a feature compatible with COMMAND.COM and similar shells such as 4DOS. - The directive CHAIN=filespec allows continuation of processing from another configuration file, optionally targeting specific labels in DR-DOS versions 7.02 and later.

Starting with DR-DOS 7.03, the command SYS /A copies CONFIG.SYS and AUTOEXEC.BAT alongside essential system files.

Other DOS-like systems incorporate comparable mechanisms: - FreeDOS uses FDCONFIG.SYS. - Versions 7.24 and above of RxDOS utilize RXCONFIG.SYS. - PTS-DOS employs CONFIG.PTS.

In the case of Windows 95 and Windows 98, CONFIG.SYS and AUTOEXEC.BAT remain present but are generally empty since these operating systems are based on DOS. Conversely, Windows Me does not process CONFIG.SYS during startup, opting instead to retrieve environment variables from the Windows Registry.

For the FlexOS operating system, CONFIG.SYS exists as a binary file that specifies resource managers and device drivers.

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 serving as jump points for directives such as , , , , and .
Similar to , but permits inline comments following directives. (In MS-DOS/PC DOS, inline comments behave differently when enclosed in quotes.)
Used at the start of inline comments alongside the ; directive.
Requests user confirmation via a Yes/No prompt before executing subsequent CONFIG.SYS commands.[1] FreeDOS does not support optional messages but allows conditional execution with boot menus using and . From DOS 6.0 onward, similar functionality exists by appending a suffix to directives, e.g., .
Executes the next CONFIG.SYS command unconditionally.

ATemplate:NbndC

Determines whether programs may be terminated upon encountering errors.
Defines which drives maintain file access timestamps within FAT directory entries.
Enables conditional execution on AT-compatible hardware.
Functions as a boot manager.
Adjusts the verbosity level of error messages.
Alters the default serial device driver (COM ports) assigned to the AUX device.
Prevents character devices from being accessed outside the phantom \DEV directory.
Loads a base device driver into system memory.
Produces a brief beep even if notification sounds are disabled via switches.
Indicates the subsequent operating system to boot.
Enables or disables extended Ctrl+C detection.
Specifies the count of disk buffers to allocate.
Similar to BUFFERS but loads buffers into HMA or UMB memory areas (comparable to HIBUFFERS in DR DOS).
, CACHETTL, CACHEFLUSH (Embedded DOS 6-XL only)
Manage cache block allocation and flushing intervals.
Executes programs within CONFIG.SYS, pausing further processing until completion.
Sets the keyboard’s Caps Lock state at startup.
, CDDBUFFERS (PTS-DOS only)
Configures CD-ROM driver buffer settings.
Continues processing CONFIG.SYS from a new file or label reference.
, CLS, CODEPAGE (various OS-specific)
Control screen clearing, system clock, and OEM codepage settings.
, COLOR (PTS-DOS only)
Defines CMOS RAM addresses and boot menu color schemes.
, COM2, COM3, COM4 (DR-DOS 7.02+)
Configure serial port parameters including quantity, sequencing, I/O addresses, and timeouts.
, COMMENT(S), COUNTRY
Manage DMA buffer allocations, inline comments, and internationalization support across different DOS variants.
, CPSW (MS-DOS specific), CPU flags (PTS-DOS only)
Regulate cursor positioning, codepage switching, and CPU-specific conditional execution controls.

This concise summary emphasizes essential CONFIG.SYS directives instrumental for configuring and optimizing DOS-based systems in professional IT settings.

DTemplate:NbndF

Sets relocation parameters for drive descriptor tables.
Specifies the memory segment address used for multi-sector disk data deblocking operations.
Activates internal debugger functionality.
Functions as a boot manager utility.
Loads a device driver into conventional memory.
Loads a device driver into upper memory blocks (equivalent to in DRDOS 5.0).
Configures country and codepage information for keyboard, screen, and parallel port devices.
Defines sizes for cache memory allocation.
Sets compatibility mode for floppy disk drives.
Specifies font selection for display output.
Determines whether DOS loads into high memory and/or utilizes upper memory areas.
Loads DOS system tables such as BUFFERS, FCBS, FILES, LASTDRIVE, and STACKS into upper memory regions.
Indicates an alternative directory path for DOS system files.
Establishes search paths for data files utilized by the system.
Defines physical characteristics of disk drives for system recognition.
Specifies parameters for drives not otherwise identified by the system.
Refer to for additional details.
Enables error logging with PDUMP.nnn files on specified drives.
Outputs a message directly to the screen display.
Displays messages incorporating ANSI escape sequences for formatting.
Implements additional validation checks when launching programs.
Assigns an assumed error or return code for subsequent operations following program execution.
Controls the A20 gate state upon program startup for memory addressing purposes.
Terminates CONFIG.SYS processing prior to reaching file end (exceptions apply to SWITCHES and SHELL directives under certain conditions).
Configures hash table size to accelerate file open operations, differing from MS-DOS’s FASTOPEN driver implementation.
Sets the number of cached File Control Blocks (FCBs) that can be opened concurrently (shares buffer space with FILES under DR-DOS).
Similar to FCBS but explicitly loads FCBs into upper memory segments.
Acts as a boot manager component within CONFIG.SYS processing.
Defines the maximum number of files that can be opened simultaneously by the system.
Mirrors FILES directive but loads file handles explicitly into upper memory areas.
Facilitates execution of specified CONFIG.SYS subsections through inclusion commands (see IGNORE).

GTemplate:NbndI

Waits for a key press or times out, setting the error level to the ASCII value of the key or 1024 if timed out.
Resumes processing of CONFIG.SYS at the indicated label.
Continues nested CONFIG.SYS processing at a specified label, then returns to the prior point.
Refer to , , or for additional information.
Consult for further details.
See for related commands.
Reference or for more information.
Refer to or for guidance.
See for related usage.
Loads a terminate-and-stay-resident (TSR) program into memory following DOS data segment relocation. Related command: INSTCDEX.
See , , or for additional context.
Consult for further details.
Refer to or as applicable.
Activates console and command line history buffer with advanced pattern searching capabilities.
Defines the address of the High Memory Area (HMA) segment.
Configures the CPU's halt (HLT) power-saving mode.
Enables checking of boot sector viruses during startup.
Loads installable file system drivers.
Prevents execution of specified subsections within CONFIG.SYS.
Permits certain applications to operate at ring 2, allowing direct hardware I/O access.
Incorporates directives from another menu section, simulated via GOSUB/RETURN in DR-DOS environments.
Toggles keyboard Insert mode on or off.
{{nobold|(Applicable in DOS 4.0 and DR DOS 3.41+)} }
Loads TSR programs into memory.
Installs TSR programs into upper memory blocks, equivalent to HIINSTALL in DR DOS 5.0.
Loads TSR programs after relocating DOS data segments, similar in function to INSTALL.
Adjusts PIC interrupt priorities by rotating them so that a specified IRQ receives highest priority.

KTemplate:NbndM

Defines the keyboard layout configuration.
Specifies the relocated address of the keyboard buffer in memory.
Sets the maximum number of drives accessible by the system.
Functions like LASTDRIVE but additionally loads Current Directory Structure into upper memory areas.
Establishes search paths for dynamic link libraries (DLLs).
Manages compatibility settings for legacy applications.
Determines the quantity of file locks permitted concurrently.
Configures display of boot logos alongside PTS-DOS boot manager interface.
Sets parameters including count, sequence, I/O port address, and timeout duration for LPT1 parallel port device.
Similarly configures LPT2 parallel port device settings.
Applies analogous configuration to LPT3 parallel port device.
Enables and sets up LPT4 device parameters as required.
Defines delay time before increasing process priority level.
Configures memory allocation methods and strategies employed by DOS.
Specifies default allocation settings for DOS memory management.
Defines available menu options within system boot menus.
Sets color schemes for menus, which can be emulated using ECHO commands in DR-DOS systems.
Specifies default menu block selection, emulatable via TIMEOUT and SWITCH commands in DR-DOS environments.
Defines individual menu blocks, which can be simulated with ECHO and SWITCH under DR-DOS.
Enables support for multitrack disk operations on compatible hardware.
Continues processing CONFIG.SYS directives from an external file, optionally loading a device driver and setting the %NEWFILE% environment variable.

NTemplate:NbndQ

Sets the default "No" character used in Yes/No/Resume prompts when no input is provided.
Configures keyboard Num Lock status to be enabled or disabled on startup.
Executes commands conditionally based on the last error code returned, e.g., .
Displays a message and waits for a key press, functioning similarly to and commands in DR-DOS systems.
Requires user confirmation before proceeding if errors are detected during CONFIG.SYS processing.
Sets buffer sizes allocated to LPT (parallel) ports for improved performance or compatibility.
Executes commands conditionally when running on PC-compatible machines only.
Adjusts scheduler priority levels within the operating system environment.
Assigns priority levels specifically for disk I/O operations to optimize performance.
Changes the default printer device driver assignment, such as switching from LPT1 to LPT3 or LPT4 ports.
Determines whether DOS programs are permitted to execute under current system conditions.
Loads a user interface shell program during system initialization.
Performs conditional execution when operating on IBM PS/1-compatible systems only.
Executes commands conditionally on IBM PS/2-compatible hardware platforms exclusively.
Suppresses output directed to standard output (STDOUT), reducing console clutter.

RTemplate:NbndT

Activates automatic system reboot upon encountering errors.
Permits inclusion of comments within CONFIG.SYS.
Prevents local block device drivers from using specified drive letters.
Sets the default character for Resume () prompts in Yes/No/Resume queries.
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 CONFIG.SYS, functioning similarly to CALL or INSTALL commands in DOS.
Determines if the FAT reserved area stores the first character of deleted filenames.
Specifies video mode settings under FreeDOS; defines screen access methods under PTS-DOS.
Controls the initial state of the keyboard Scroll Lock key.
Assigns environment variables.
Loads the command interpreter shell.
Functions like SHELL but includes a size parameter allowing COMMAND.COM to load into HMA or UMBs, improving memory efficiency with third-party shells.
Configures keyboard modifier states such as Shift Lock, Num Lock, Scroll Lock, and Insert mode.
Indicates whether files should be closed automatically when Ctrl+Alt+Del is pressed.
Skips the Power-On Self-Test (POST) during reboot sequences.
, STACKSIZE, STACKSHIGH
Set hardware interrupt stack sizes and buffer locations across various DOS versions, with differing levels of support.
, SYSBOOT, SYSGEN, SYSLOAD
PTS-DOS-specific commands managing boot processes and system memory configuration.
, SWITCH
DOS commands enabling conditional menu blocks and nested CONFIG.SYS processing with RETURN functionality (note DR-DOS excludes SUBMENU).
, SWAPPATH
OS/2 directives specifying paths for error logs and swap files.
, SWITCHES
Define default switch characters ('/' or '-') and special options across different DOS variants.
, THREADS, TIMESLICE
OS/2 instructions addressing hardware fixes and thread scheduling parameters.
, TRACE, TRACEBUF
Enable execution timeouts and single-step modes with configurable logging buffers in DR-DOS, PTS-DOS, and OS/2 systems.
, TRAPDUMP
PTS-DOS directive for temporary file extension settings and detailed error logging (also applicable in OS/2).

UTemplate:NbndZ

Directs DOS to utilize a designated segment as Upper Memory Block (UMB) space.
Specifies which UMB server is employed.
Defines address ranges allocated as UMB RAM.
Toggles disk write verification on or off.
Sets the DOS version string reported to applications.
Configures VGA display status settings.
Indicates the current video mode in use.
Determines whether virtual DMA is permitted.
Controls deactivation of the processor’s Virtual Mode Extensions feature.
Configures Virtual Device Driver (VxD) parameters for Windows environments.
Manages system-level support for Windows operation.
Adjusts relocation settings for the Extended BIOS Data Area (EBDA).
Enables conditional execution specific to XT-compatible machines.
Activates built-in Year 2000 compliance support features.
Defines the default affirmative character used in prompt responses.
Manages tracking of file deletions.

Issues

Although booting can proceed without CONFIG.SYS or AUTOEXEC.BAT files, these are crucial for comprehensive customization and fulfilling software prerequisites during startup. Corruption or damage to these files necessitates diagnostic efforts.

If CONFIG.SYS does not include a SHELL directive—or if it is missing 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 absent. Starting with MS-DOS 6.0, PC DOS 6.1, Novell DOS 7, and subsequent releases, users receive a prompt requesting the command interpreter’s path if COMMAND.COM is missing or exits unexpectedly. This feature enables limited shell replacement at runtime without rebooting.

Due to incompatibilities between MS-DOS versions 7.0 and above’s COMMAND.COM and DR-DOS, DR-DOS versions 7.02 and later prevent bypassing SHELL directives when operating in skip/trace/step modes. This measure ensures stability in dual-boot configurations. Recovery procedures include prompting for a valid shell filename before loading COMMAND.COM.

CONFIG.SYS file size restrictions differ among operating systems: MS-DOS and PC DOS cap CONFIG.SYS size at approximately 64 KB in recent editions, whereas DR-DOS imposes virtually no limit thanks to its line-by-line interpretation rather than tokenization approach. This design grants DR-DOS users enhanced flexibility over driver and TSR loading sequences, facilitating conflict resolution and integration of debugging utilities or temporary programs via INSTALL.

Limits on shell command line length also vary: MS-DOS and PC DOS versions from 2.0 through 4.01 restrict SHELL lines to a maximum of 31 characters, expanding to 128 characters in later versions. In contrast, DR-DOS permits up to 255 characters. It should be noted that CONFIG.SYS directives do not support long filenames.

Dual Booting DOS and Windows 9x

During the installation of Windows 95 on a system already running DOS or a previous Windows version, the files CONFIG.SYS and AUTOEXEC.BAT are renamed to CONFIG.DOS and AUTOEXEC.DOS to enable a dual-boot setup between DOS and Windows 9x. When booting into DOS, these files are temporarily reverted to their original filenames. Additionally, backup copies of the Windows 95 versions 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 CONFIG.SYS and AUTOEXEC.BAT files used by Windows remain intact. Instead, DR-DOS utilizes separate startup configuration files named DCONFIG.SYS and AUTODOS7.BAT.

OS/2 / Windows NT

OS/2 depends extensively on CONFIG.SYS to set up drivers and environment variables before launching its graphical user interface.

Within the OS/2 subsystem included in Windows NT, the configuration parameters for OS/2 applications that would normally reside in CONFIG.SYS are instead maintained within the system registry rather than in conventional configuration files.

OS/2 incorporates a variety of undocumented CONFIG.SYS commands, highlighting the system’s intricate configuration requirements.

The role of CONFIG.SYS continues to be vital in OS/2-based operating systems such as eComStation and ArcaOS.

See also

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
  • Details on FreeDOS CONFIG.SYS commands
  • PTS-DOS 2000 Pro User Manual – includes directives for PTS-DOS CONFIG.SYS
  • Unofficial German PTS-DOS FAQ (PTS/FAQD) covering CONFIG.SYS directives
  1. ↑ Cite error: Invalid <ref> tag; no text was provided for refs named Paul_2000_CONFIG