Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > macOS > How Can I Tell What Shell Terminal Is Running?

How Can I Tell What Shell Terminal Is Running?
Thread Tools
PBG4 User
Senior User
Join Date: Feb 2001
Location: Deer Crossing, CT
Status: Offline
Reply With Quote
Oct 28, 2003, 02:59 PM
 
Like the subject says, how can I tell what shell terminal is running?

I don't see a reference to bash in terminal prefs, just tcsh. I can see tcsh in /usr/bin, but there is no bash. I'm assuming that bash would be called bash, but if I'm wrong, please correct me.

If somehow I didn't install the bash shell, how would I go about installing it from the Panther CDs?

I did an archive install on a stock 1.25GHz PowerBook, in case you were wondering.
     
MigP
Fresh-Faced Recruit
Join Date: May 2000
Location: Caracas
Status: Offline
Reply With Quote
Oct 28, 2003, 03:17 PM
 
I would use echo $SHELL, this can tell you what current shell is being used.

Miguel
     
incandenza
Fresh-Faced Recruit
Join Date: Mar 2001
Status: Offline
Reply With Quote
Oct 28, 2003, 03:35 PM
 
bash and tcsh should both be in /bin. I think they should be present on every installation (they're not in the BSD subsystem package).
     
Arkham_c
Mac Elite
Join Date: Dec 2001
Location: Atlanta, GA, USA
Status: Offline
Reply With Quote
Oct 29, 2003, 12:25 AM
 
Originally posted by PBG4 User:
Like the subject says, how can I tell what shell terminal is running?

I don't see a reference to bash in terminal prefs, just tcsh. I can see tcsh in /usr/bin, but there is no bash. I'm assuming that bash would be called bash, but if I'm wrong, please correct me.

If somehow I didn't install the bash shell, how would I go about installing it from the Panther CDs?

I did an archive install on a stock 1.25GHz PowerBook, in case you were wondering.
Just type "ps". You should see something like this:

Code:
[arkham@flybook ~] ps PID TT STAT TIME COMMAND 495 std S 0:00.06 -bash [arkham@flybook ~]
For tcsh it would say that instead of bash.

bash is in /bin, not /usr/bin. Type "which bash" to see where it is. I'm sure you got it.
Mac Pro 2x 2.66 GHz Dual core, Apple TV 160GB, two Windows XP PCs
     
Kristoff
Mac Elite
Join Date: Sep 2000
Location: in front of the keyboard
Status: Offline
Reply With Quote
Oct 29, 2003, 12:41 AM
 
Why do you guys even bother replying?

MigP answered the question in the first response.
signatures are a waste of bandwidth
especially ones with political tripe in them.
     
PBG4 User  (op)
Senior User
Join Date: Feb 2001
Location: Deer Crossing, CT
Status: Offline
Reply With Quote
Oct 29, 2003, 09:17 AM
 
Originally posted by Kristoff:
Why do you guys even bother replying?

MigP answered the question in the first response.
Actually, I appreciate all the replies.

incandenza and Arkham_c took care of what would've been my next question, "Where can I find bash?". So, they've effectively killed 2 questions with one post.

Thanks folks. I will check out what shell I'm running (and switch to bash if necessary) once I get home tonight.

I guess my next question would be, what are the differences between the two shells? I want to run bash because I am doing Linux programming at school and bash is the default shell. So far I haven't run into any issues working with tcsh on OS X and bash on Linux, are there any gotchas between these two shells I should know about?

Thanks again for the helpful replies.
     
incandenza
Fresh-Faced Recruit
Join Date: Mar 2001
Status: Offline
Reply With Quote
Oct 29, 2003, 11:35 AM
 
Originally posted by Kristoff:
Why do you guys even bother replying?

MigP answered the question in the first response.
There was more than one question in the original post.

The value of your response is much more of a mystery.
     
PBG4 User  (op)
Senior User
Join Date: Feb 2001
Location: Deer Crossing, CT
Status: Offline
Reply With Quote
Oct 30, 2003, 09:12 AM
 
It turns out I was still running tcsh. It was trivial to change to bash now that I know where it was on the disk. Thanks for all of your help.
     
   
 
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 01:16 AM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,