OSX terminal weird prefix

筅森魡賤 提交于 2020-02-05 08:45:29

问题


I noticed that I have some weird prefix in my bash terminal - unknown-MACADDRESS. I think in all unix terminals it is suppose to be host name and login. I've tried go to sharing and change my host name in there, but unknown- stays in terminal.

Not sure where problem is, do you know how to change it?

Thanks a lot for any help!


回答1:


Use the hostname command

$ sudo hostname dan



回答2:


For me this: scutil --set HostName yourname changed the name and it works even after a restart.



来源:https://stackoverflow.com/questions/23815590/osx-terminal-weird-prefix

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!