美文网首页
怎么还原 mac 中 terminal 窗口显示的计算机名?

怎么还原 mac 中 terminal 窗口显示的计算机名?

作者: 景彧 | 来源:发表于2019-11-25 12:18 被阅读0次

    OS X computer name not matching what shows on terminal

    It's perfectly normal for this to occur; when you login Terminal remotely bash does a reverse DNS lookup. It will only be the same if the hostname is not specified on the network you're connecting from and there is no reply from the DHCP server, or the reverse lookup against the remote DNS server fails to resolve.

    You can easily over-ride the default setting by using this command in Terminal:

    # sudo scutil --set HostName archos
    

    You can check it by using:

    # nslookup nn.nn.nn.nn
    ( or )
    # host nn.nn.nn.nn
    

    相关文章

      网友评论

          本文标题:怎么还原 mac 中 terminal 窗口显示的计算机名?

          本文链接:https://www.haomeiwen.com/subject/etedwctx.html