Go Back   MacRumors Forums > Apple Applications > Mac Applications and Mac App Store

Reply
 
Thread Tools Search this Thread Display Modes
Old Nov 8, 2012, 02:26 AM   #1
demuro1
macrumors newbie
 
Join Date: Aug 2007
Terminal Help

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.
demuro1 is offline   0 Reply With Quote
Old Nov 8, 2012, 02:25 PM   #2
kgs
macrumors regular
 
Join Date: Jul 2012
Quote:
Originally Posted by demuro1 View Post
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?
kgs is offline   0 Reply With Quote
Old Nov 8, 2012, 04:19 PM   #3
demuro1
Thread Starter
macrumors newbie
 
Join Date: Aug 2007
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
demuro1 is offline   0 Reply With Quote
Old Nov 8, 2012, 04:47 PM   #4
Brian33
macrumors 6502a
 
Join Date: Apr 2008
Location: 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.
__________________
Alu iMac: early '08 24" Core2Duo w/DIY Fusion Drive; MacBook Pro: early 2011 15" ; and a 1st-gen Time Capsule (working just fine, thank you)
Brian33 is offline   0 Reply With Quote
Old Nov 8, 2012, 06:41 PM   #5
kgs
macrumors regular
 
Join Date: Jul 2012
Quote:
Originally Posted by demuro1 View Post
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.
kgs is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Applications > Mac Applications and Mac App Store

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
General: FIX "Error opening terminal: xterm-256color" for Terminal Commands (e.g., "top") iOS7 thelatinist Jailbreaks and iOS Hacks 9 Jan 10, 2014 07:46 PM
Terminal terminal-ology geohump Mac Applications and Mac App Store 0 May 17, 2013 12:40 PM
General: A better terminal? CodeBreaker Jailbreaks and iOS Hacks 7 Mar 1, 2013 08:21 AM
I need terminal help cool11 OS X 2 Sep 25, 2012 06:42 AM
Terminal? thrill4rishabh Mac OS X 10.7 Lion 4 Jul 18, 2012 09:40 AM

Forum Jump

All times are GMT -5. The time now is 11:54 PM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC