Find the answer to your Linux question:
Results 1 to 3 of 3
how can i know what shell im in ?...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Nov 2006
    Posts
    33

    what shell im in ?


    how can i know what shell im in ?

  2. #2
    Linux Enthusiast
    Join Date
    Jun 2005
    Posts
    668
    echo $SHELL

  3. #3
    drl
    drl is offline
    Linux Engineer drl's Avatar
    Join Date
    Apr 2006
    Location
    Saint Paul, MN, USA / CentOS, Debian, Slackware, {Free, Open, Net}BSD, Solaris
    Posts
    1,305
    Hi.

    If the variable SHELL, has not been set by your current shell, then you could try:
    Code:
    ps | grep $$
    provided your shell interprets $$ as the PID (process ID) for the current process (acceptable in tcsh, bash, zsh). There are exceptions, for example:
    Code:
    ps | grep $pid
    for the rc shell ... cheers, drl
    Welcome - get the most out of the forum by reading forum basics and guidelines: click here.
    90% of questions can be answered by using man pages, Quick Search, Advanced Search, Google search, Wikipedia.
    We look forward to helping you with the challenge of the other 10%.
    ( Mn, 2.6.n, AMD-64 3000+, ASUS A8V Deluxe, 1 GB, SATA + IDE, Matrox G400 AGP )

  4. $spacer_open
    $spacer_close

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •