Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I've got a question about the prompt in Mac's Terminal.

I opened Terminal and was installing GIT. I don't know anything about Unix or how to use Terminal, so please forgive my ignorance. (I know that Terminal is very powerful, though. And it's easy to screw things up!)

The prompt reads as follows:

Macintosh-2:~ myname$

What does the Macintosh-2 stuff mean? I've never seen "Machintosh-2" in front of a Terminal prompt. Did I install GIT somewhere strange? Is there something wrong with my computer?

share|improve this question

migrated from stackoverflow.com Sep 22 '11 at 8:00

This question came from our site for professional and enthusiast programmers.

    
It is difficult to screw things up. Well, as long as you're not root. –  rightføld Sep 22 '11 at 5:22

2 Answers 2

up vote 1 down vote accepted

It's the name of your computer. Change it in System Preferences, Sharing. There probably was a computer with the same name on the network, so the -2 was appended.

If you want to learn more about your prompt and how to change it, read this article on the SU blog.

share|improve this answer
    
Cool. Thanks so much for the help @Daniel Beck. I'm relaxed now. –  Laxmidi Sep 22 '11 at 15:45

It is the name of your computer (which you probably set when installing the OS), shortened and hyphenated to fit UNIX host name conventions.

Not a problem.

share|improve this answer
    
Hi @Thilo, Thank you for the message. It's kinda weird as it's the first time that I've seen the Macintosh-2 part. While I was using my Mac yesterday, I got some alert (I can't remember the details exactly) that the localhost was already in use and that if I wanted to allow sharing, that I should go to Preferences->Sharing and allow the user to connect at Macintosh-2. I just closed the alert and didn't do anything. I wonder if that has anything to do with it. I was doing some web development at that moment and I had my web server running on my local machine. Do you think that my mac is okay? –  Laxmidi Sep 22 '11 at 5:18
    
Hi @Thilo, I ran out of space. I just wanted to give you some background. Do you still think that everything is cool with my machine? I really appreciate your help and expertise. Thanks so much! –  Laxmidi Sep 22 '11 at 5:19
    
Thanks you for the message. I've post there as well. –  Laxmidi Sep 22 '11 at 5:47
    
This is wrong. bash will happily print Firstname-Lastnames-Macbook-Pro or something similar as computer name when you leave the defaults in. –  Daniel Beck Sep 22 '11 at 8:10
    
@Daniel Beck: On my Machine, a computer name of "LastName FirstName's MacBook Pro" is transformed into "lastname-firstnames-macbook-pro" at the prompt. Spaces, capitalization, quotes all gone. –  Thilo Sep 22 '11 at 8:48

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.