Home > Commands N-Z > Configuration S

SHELL


Description | Syntax | Parameters | Switches | Related | Notes | Examples | Errorlevels | Availability

Specifies the name and location of the command interpreter you want the operating system to use. You can use this command only in your CONFIG.SYS file.

If you want to use your own command interpreter (instead of COMMAND.COM), you can specify its name by adding a SHELL command to your CONFIG.SYS file.


Syntax

SHELL=[drive:][\path\]filename parameters


Parameters
[drive:][\path\] (v3.20 NT3.1)
Specifies the location of the command interpreter you want the operating system to use.
filename (v3.20 NT3.1)
Specifies the name of the command interpreter you want the operating system to use.
parameters (v3.20 NT3.1)
Specifies any command-line parameters or switches that can be used with the specified command interpreter.

Switches

none.


Related

For information about COMMAND.COM switches, see the COMMAND command.


Notes

Default setting The default command interpreter for the operating system is COMMAND.COM (CMD for NT). If you do not use a SHELL command in your CONFIG.SYS file, the operating system searches for COMMAND.COM in the root directory of your startup drive. You need to use the SHELL command if you want to specify a COMMAND.COM file that is not in the root directory or if you do not want to use the default environment size for COMMAND.COM.

Using switches with a command interpreter The SHELL command itself does not accept any switches, but if the command interpreter does, you can include them on the SHELL command line.


Examples

Suppose the file NEWSHELL.COM is in a directory named BIN on your startup drive, and suppose you want to use NEWSHELL.COM as your command interpreter. To do this, add to your CONFIG.SYS file:

    shell=\binnewshell.com

Suppose you add the line SHELL=NEWCMDP.COMto your CONFIG.SYS file, and suppose the NEWCMDP.COM command interpreter accepts the switches /C, /P, and /E. You can now use any of these switches on the SHELL command line. This would be valid:

    shell=newcmdp.com /c /p /e

The SHELL command is the preferred method of using COMMAND.COM to increase the size of the environment. To increase the environment size to 512 bytes, add to your CONFIG.SYS file:

    shell=command.com /e:512 /p

To start an operating system command interpreter located in the directory OLD on drive C, add to your CONFIG.SYS file:

    shell=C:\OLD\COMMAND.COM C:\OLD /E:512 /P

Errorlevels

none.


Availability
External
DOS
v3.20 v3.05 v3.1 v3.21 v3.25 v3.30 v3.3A v3.3R v3.3T v3.31 v3.40 v4.0 v4.01 v4.01A v5.0 v5.0A v5.00.02 v5.001A v5.01 v5.02 v6.0 v6.10 v6.2 v6.21 v6.22 v6.23 v7.00 v7.0R1 v7.10 v8.00
Windows
none
Windows NT
NT3.1 NT3.5 NT3.51

Last Updated: 2006/12/01
Direct corrections or suggestions to: Rick Lively