Skip to content

Instantly share code, notes, and snippets.

@loisaidasam loisaidasam/fix.txt
Created Jul 16, 2018

Embed
What would you like to do?
Bash $PS1 dynamic hostname fix
# Question:
# https://twitter.com/LoisaidaSam/status/1018897916293984256
# Answer:
# https://apple.stackexchange.com/questions/40734/why-is-my-host-name-wrong-at-the-terminal-prompt-when-connected-to-a-public-wifi/127405#127405
:) Michaels-iPhone:~$ scutil --get HostName
HostName: not set
:( 1 Michaels-iPhone:~$ sudo scutil --set HostName 'chewbacca'
Password:
:) Michaels-iPhone:~$ scutil --get HostName
chewbacca
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.