You say this:
Previously, it contained system info. I have no idea what the inside
167
is supposed to mean, can anyone clarify or tell me how to revert
back?
Don’t panic!
You mentioned using doing some SHA1/256 stuff, but I don’t think this is related to the prompt changing in any way. My guess is that you have connected to a new network—perhaps not your home but a campus network or such—and the reverse DNS is being used by Mac OS X to set the machine name on the command prompt to be the hostname assigned via DHCP and not your local system name.
Meaning that your Mac OS X machine should be showing whatever your local machine name is; for example—using your username as a hostname—you might have a machine name such as myTotoro.local
. But then when you connect to a network that assigns a hostname via DHCP that changes the hostname. This is normal behavior for Mac OS X but can be quite confusing.
This guess comes from the fact the inside-167-7
parses like some DHCP address assigned to something like free Wi-Fi. Something that would translate to—wild guess—but an “inside” Wi-Fi connection on router designated 167-7 or the 7th user on router 167 or something like that. The naming schemes of some setups are weird and I have seen odder hostnames set when jumping from network to network.
How to change the hostname in Mac OS X which is connected to the prompt value.
Anyway, assuming that is the case you can force your Mac OS X setup to always use your local hostname by using this command:
sudo scutil --set HostName [insert your desired hostname here]
For example—using your username as a hostname—you might want to set it like this:
sudo scutil --set HostName myTotoro.local
Then just close the Terminal and open a new Terminal and you should be good to go.
I doubt any of this is malware or some malicious software.
I doubt any of this behavior is malicious or you are somehow seeing some bizarre “man in the middle” attack where your Terminal is being proxied through some malicious software. I mean the concept of a TTY session being hijacked is nothing new, but it’s really not a viable threat nowadays unless the attacker knows for sure you are using the Terminal since most users just use the Mac OS X GUI (aka: the Finder) nowadays anyway. And from my experience what you describe just seems like DHCP hostname silliness.
echo $PS1
show? Also, is there anything that changed in your~/.bashrc
or~/.profile
that you know of? What specifically were you doing in your terminal when the change occurred? If it persists in new terminal windows, something may have changed those files.