Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

demuro1

macrumors newbie
Original poster
Aug 20, 2007
12
0
Hello,
I was hoping someone familiar with terminal could help me out.

I am taking a class on unix and another class on web development. Somehow between the two classes I have encountered a difference eon my mac that I'd like to fix.

depending on what network I am on my hostname changes in terminal. I have enabled php but apache is currently off.

Does anyone have any advice they can offer here?

Thanks in advance.
 

kgs

macrumors regular
Jul 29, 2012
102
1
Hello,
I was hoping someone familiar with terminal could help me out.

I am taking a class on unix and another class on web development. Somehow between the two classes I have encountered a difference eon my mac that I'd like to fix.

depending on what network I am on my hostname changes in terminal. I have enabled php but apache is currently off.

Does anyone have any advice they can offer here?

Thanks in advance.

If all you're trying to do is setup apache with php, you should probably just try this:

http://www.mamp.info/en/index.html

At least on your Mac.

That said, I'm not entirely sure I understand your question. You say hostname, and then php and apache. What exactly are you trying to do?
 

demuro1

macrumors newbie
Original poster
Aug 20, 2007
12
0
I am experiencing strange behavior in terminal. I am attaching a photo. everything before :~demuro1$ in the terminal window changes depending on the network I'm on and the whether I am connected to a network or not.

I am taking two classes, one has to do with linux/unix and the other has to do with web development. I have enabled php and apache on my mac.

I think one of the above listed items is at fault for this new behavior in terminal. Is there anything you might suggest that can correct this issue?

thanks
 

Brian33

macrumors 65816
Apr 30, 2008
1,411
347
USA (Virginia)
I don't think it has anything to do with you enabling php and apache. I say this because I've seen similar behavior with my MacBook Pro on my home network.

Like you, I have the hostname as part of my command prompt in Terminal. (You can also see the current hostname by typing the command 'hostname'.)

I haven't completely figured this out, but I believe it has to do with whether my portable connects to my network through the wireless 802.11n (Airport) interface or through the wired ethernet cable interface. I get one hostname one way, and a different one the other way.

I suspect that my DHCP server is assigning a hostname when the computer connects via the ethernet cable interface, instead of using the hostname I've set on the computer.
 

kgs

macrumors regular
Jul 29, 2012
102
1
I am experiencing strange behavior in terminal. I am attaching a photo. everything before :~demuro1$ in the terminal window changes depending on the network I'm on and the whether I am connected to a network or not.

I am taking two classes, one has to do with linux/unix and the other has to do with web development. I have enabled php and apache on my mac.

I think one of the above listed items is at fault for this new behavior in terminal. Is there anything you might suggest that can correct this issue?

thanks

That is called the command prompt. It is most likely BASH.. you can change it using the instructions here:

http://tldp.org/HOWTO/Bash-Prompt-HOWTO/

It has nothing to do with php or apache. That's a web server. Only used really for web pages.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.