help-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-bash] Is SHELL supposed to be the path of the current shell?


From: Greg Wooledge
Subject: Re: [Help-bash] Is SHELL supposed to be the path of the current shell?
Date: Wed, 27 Jun 2012 11:34:37 -0400
User-agent: Mutt/1.4.2.3i

On Wed, Jun 27, 2012 at 10:23:45AM -0500, Peng Yu wrote:
> I though SHELL should point to the path of the current shell. But it
> seems not the case. Does anybody know what it is?

It is not.  SHELL is just an environment variable, usually set by the
login procedure, that tells programs what shell to launch when they
perform a shell escape.  Or, as another example, it tells a terminal
emulator what shell to run when the terminal emulator is invoked with
no arguments, as is usually the case when clicking "gimme a shell" in
your window manager under X11.

If you want to change your account's default shell, see "man chsh" or
ask your system administrator for help.  This is something that can be
very site-specific.

If you just want to know what shell you're currently in, try:

  ps -p $$

I've yet to find any command that has a higher chance of working than
that one.  It works in sh-family shells and csh-family shells, and it
works on BSD-type and SysV-type systems.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]