FG
💻 Software

OSX Terminal showing incorrect hostname

Fresh7 days ago
Mar 15, 202674724 views
Confidence Score0%
0%

Problem

When I open Terminal I expect it to show what my PS1 is set to . However it's not displaying my hostname , as displayed in System Preferences. Instead, it's showing a random string . How can this be fixed or reset? This machine is brand new, and the preferences/settings haven't been changed.

Error Output

\h:\W \u\$

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Unverified Fix
New Fix – Awaiting Verification

Fix for: OSX Terminal showing incorrect hostname

Low Risk

Gordon gives a good answer to the origin of your hostname. If you want the name that you set in System Preferences -> Sharing -> Computer Name to show up in your prompt, replace with . E.g my prompt is set with

Awaiting Verification

Be the first to verify this fix

Sign in to verify this fix

Environment