Forums
New posts
Articles
Product Reviews
Policies
FAQ
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Menu
Log in
Register
Install the app
Install
Forums
Apple Computing Products:
macOS - Operating System
MAMP Pro adding entries to hosts file, changed my Terminal prompt
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="mafocari" data-source="post: 1887080" data-attributes="member: 407922"><p>> The /etc/hosts file doesn't control your prompt but it looks like you have something in your bashrc/zshrc that might be referencing the hostname.</p><p></p><p>There's nothing in my .zshrc file referencing the unexpected hostname (with -Pro-2 or -pro-2):</p><p></p><p>[CODE=bash]me@My-MacBook-Pro-2 ~ % cat .zshrc</p><p>export PATH="/usr/local/sbin:$PATH"</p><p></p><p># MAMP Pro recommended aliases for PHP 5.6</p><p>#alias php='/Applications/MAMP/bin/php/php5.6.40/bin/php -c "/Library/Application Support/appsolute/MAMP PRO/conf/php5.6.40.ini"'</p><p>#alias pear='/Applications/MAMP/bin/php/php5.6.40/bin/pear'</p><p>#alias pecl='/Applications/MAMP/bin/php/php5.6.40/bin/pecl'</p><p></p><p># MAMP Pro custom aliases</p><p>alias php5=/Applications/MAMP/bin/php/php5.6.40/bin/php</p><p>alias camp='/Applications/MAMP/bin/php/composer'</p><p>alias tamp='tail -f /Applications/MAMP/logs/apache_error.log /Applications/MAMP/logs/php_error.log'</p><p></p><p>export PATH="/usr/local/opt/php@7.3/bin:$PATH"</p><p>export PATH="/usr/local/opt/php@7.3/sbin:$PATH"[/CODE]</p><p></p><p>I haven't used the MAMP aliases for a while. I don't have a .bashrc file.</p><p></p><p>> For starters, what version of macOS are you using?</p><p></p><p>macOS Big Sur 11.4. It was originally purchased with Catalina (10.14 I think). It was .zsh by default.</p><p></p><p>> Show us the contents of your /etc/hosts file. Depending on whether you are running Bash or Zsh as the command line shell, show us your .bashrc or .zshrc.</p><p></p><p>I already showed that in the original post. Anything else there is irrelevant to this thread and exactly as expected (and isn't modified by MAMP). I've only used zsh on this Mac.</p><p></p><p>So, what would cause all three of these weird things to happen? The "hostname" in the screenshot being changed to "-Pro-2" (whatever it means by 'hostname'... can you explain?), the Terminal zshell command prompt being changed to "-Pro-2", and MAMP adding /etc/hosts entries for "-Pro-2" and "-pro-2". They seem to be related, but I can't figure out if MAMP did all this or something else is going on.</p></blockquote><p></p>
[QUOTE="mafocari, post: 1887080, member: 407922"] > The /etc/hosts file doesn't control your prompt but it looks like you have something in your bashrc/zshrc that might be referencing the hostname. There's nothing in my .zshrc file referencing the unexpected hostname (with -Pro-2 or -pro-2): [CODE=bash]me@My-MacBook-Pro-2 ~ % cat .zshrc export PATH="/usr/local/sbin:$PATH" # MAMP Pro recommended aliases for PHP 5.6 #alias php='/Applications/MAMP/bin/php/php5.6.40/bin/php -c "/Library/Application Support/appsolute/MAMP PRO/conf/php5.6.40.ini"' #alias pear='/Applications/MAMP/bin/php/php5.6.40/bin/pear' #alias pecl='/Applications/MAMP/bin/php/php5.6.40/bin/pecl' # MAMP Pro custom aliases alias php5=/Applications/MAMP/bin/php/php5.6.40/bin/php alias camp='/Applications/MAMP/bin/php/composer' alias tamp='tail -f /Applications/MAMP/logs/apache_error.log /Applications/MAMP/logs/php_error.log' export PATH="/usr/local/opt/php@7.3/bin:$PATH" export PATH="/usr/local/opt/php@7.3/sbin:$PATH"[/CODE] I haven't used the MAMP aliases for a while. I don't have a .bashrc file. > For starters, what version of macOS are you using? macOS Big Sur 11.4. It was originally purchased with Catalina (10.14 I think). It was .zsh by default. > Show us the contents of your /etc/hosts file. Depending on whether you are running Bash or Zsh as the command line shell, show us your .bashrc or .zshrc. I already showed that in the original post. Anything else there is irrelevant to this thread and exactly as expected (and isn't modified by MAMP). I've only used zsh on this Mac. So, what would cause all three of these weird things to happen? The "hostname" in the screenshot being changed to "-Pro-2" (whatever it means by 'hostname'... can you explain?), the Terminal zshell command prompt being changed to "-Pro-2", and MAMP adding /etc/hosts entries for "-Pro-2" and "-pro-2". They seem to be related, but I can't figure out if MAMP did all this or something else is going on. [/QUOTE]
Verification
Name this item. 🍎
Post reply
Forums
Apple Computing Products:
macOS - Operating System
MAMP Pro adding entries to hosts file, changed my Terminal prompt
Top