Created
July 16, 2018 17:27
-
-
Save loisaidasam/f7b0577d7ab97c23f7981ea0d9516702 to your computer and use it in GitHub Desktop.
Bash $PS1 dynamic hostname fix
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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