Curiosity About Terminal Command Prompt

Joined
Dec 5, 2008
Messages
622
Reaction score
17
Points
18
Location
Detroit
Your Mac's Specs
2007 Mac Book Pro 2.2 Ghz 4 GB RAM SSD OSX 10.11 & 2006 MBP Stuck At 10.6.8
Hi All!
This question is simply something I am curious about and is not causing problems with the computer. I like to learn stuff, so...

My computer is MacBook Pro Model 3.,1 and it's running OSX 10.6.8
There are two volumes (partitions?) on the hard drive. One is called 'Macintosh HD'. (That's the one I use daily) The other is called 'Fallout Shelter'. (That's the one I boot to if I am going to experiment. If I wreck something, I start over). It has a separately purchased copy of 10.6.8. Fallout Shelter only has one user,.

Macintosh HD has two users: 'Real Life" and 'Work Stuff'. Real Life is the administrator.


When I open Terminal while logged in as Real Life, I see the command prompt (if that is the correct term). The prompt is
real-lifes-computer-2:~(my name is here)$

If I am logged in as Work Stuff, the prompt is
real-lifes-computer-2: ~workstuff$

If I am booted to Fallout Shelter, the prompt is
fallout-selters-macbook-pro: ~falloutshelter$

So, my not-important, but curiosity question is:
Why is there a "2" after real-lifes-computer? Where is #1?

Is it there because there are two volumes on the hard drive or is there yet another user account I can not see?

Thanks Very Much for your ideas and suggestions!
Paul
PS: What's the real name for what I'm calling 'Command Prompt"?
 
Joined
Jun 7, 2013
Messages
65
Reaction score
1
Points
8
Location
Raleigh NC
Your Mac's Specs
mac mini late 2012; mac mini early 2014; old mac mini running centos; new macbook air; iPad;iPhone
'Command Prompt" is the command line or command line interface ( CLI ) aka a "terminal emulator"

This is also can be referred to as a "shell" and the "prompt" is configurable for a number of things. As you've already deduced (my name is here) represents the user name which you used during login and also indicated your home directory name ( ~falloutshelter )

I just looked at Take control of you mac's command line by Joe Kissell:

The second line is the actual command line (the line on which you type commands): MacBook-Pro-13: ~ jk $ ▮ The rectangular box at the end (which may instead appear as a vertical line or an underscore, any of which may or may not blink) is the cursor (not to be confused with your pointer, which reflects mouse movement). Everything before the cursor is known as the prompt, which is to say it’s prompting you to type something. The first part of the prompt, MacBook-Pro-13, is the name of my Mac (spaces are replaced with hyphens, and punctuation, if any, usually disappears). The colon :)) is simply a visual separator. Next is the tilde (~), which signifies that I’m currently in my home directory (which, for me, is /Users/jk). The jk is the short user name of the account under which I’m logged in. And finally, the $ signifies that I’m logged in as an ordinary (non-root) user. (I say more about the $ in the sidebar The $, #, and Other Strange Things on My Command Line , ahead.) If your short user name is cindy and your computer’s name (as shown in the Sharing pane of System Preferences) is Cindy’s Groovy iMac, your command line may look something like this: Cindys-Groovy-iMac: ~ cindy $

This is similar to other unix/linux systems.

hmm he didn't really say it; however, I think that the Number ( in your case 2 - in his case 13 ) represents a "session" for example you could have multiple sessions open. the system provides the number so you can tell which is which.
 
Last edited:
Joined
Mar 17, 2008
Messages
6,879
Reaction score
191
Points
63
Location
Tucson, AZ
Your Mac's Specs
Way... way too many specs to list.
The 2 is there, because it's part of your machine name. If you go into Preferences > Sharing.. you'll see the 2 in there either in Computer Name.. or if you click Edit.. under Localhost Name. Remove it, and it'll be gone from your prompt.

I've got about 7 different sessions open and... no change to my prompts ;)

Code:
[email protected] ~ $ w
13:21  up 3 days, 22:29, 8 users, load averages: 2.86 2.84 2.63
USER     TTY      FROM              [email protected]  IDLE WHAT
mike     console  -                Thu14   3days -
mike     s000     -                13:19       2 -bash
mike     s001     -                13:19       2 -bash
mike     s002     -                13:21       - -bash
mike     s003     -                13:21       - -bash
mike     s004     -                13:21       - -bash
mike     s005     -                13:21       - -bash
mike     s006     -                13:21       - w
[email protected] ~ $
 
OP
PGB1
Joined
Dec 5, 2008
Messages
622
Reaction score
17
Points
18
Location
Detroit
Your Mac's Specs
2007 Mac Book Pro 2.2 Ghz 4 GB RAM SSD OSX 10.11 & 2006 MBP Stuck At 10.6.8
Thank You Sullij & Dysfunction for taking the time to reply & give great explanations for my questions.

I will certainly save the "anatomy lessons" you provided Sullij. Now when I mess things up, I can use the proper terms when I come begging for help.

Thanks, too, Dysfunction for explaining the "2" suffix. I did as you suggested and re-named. Terminal now shows the computer without the "2".

I wonder how I managed to put the "2" there in the first place?

It's always a good day when I learn something new!

Thanks Again Guys & Enjoy This Day!
Paul
 
OP
PGB1
Joined
Dec 5, 2008
Messages
622
Reaction score
17
Points
18
Location
Detroit
Your Mac's Specs
2007 Mac Book Pro 2.2 Ghz 4 GB RAM SSD OSX 10.11 & 2006 MBP Stuck At 10.6.8
Those links are cool. Thanks Crandom

I enjoyed your article and saved it. Looks like some experimenting in in order...

Thanks Again,
Paul
 
OP
PGB1
Joined
Dec 5, 2008
Messages
622
Reaction score
17
Points
18
Location
Detroit
Your Mac's Specs
2007 Mac Book Pro 2.2 Ghz 4 GB RAM SSD OSX 10.11 & 2006 MBP Stuck At 10.6.8
Thanks Mike!
I've been having fun learning (slowly) about Terminal.

I experiment while booted to the second partition I have on the computer in case I goof stuff up (Hence the name "Fallout Shelter"). Nothing's on it but the OS, so wipe outs are easy to fix.

Enjoy Today!
Paul
 
Joined
Aug 19, 2014
Messages
792
Reaction score
4
Points
18
Terminal is awesome to mess around with when you honestly know what you are doing.

However if you are not it was a excellent idea to have two partitions on the drive great choice.
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top