Ubuntu如何修改计算机名称

Ubuntu如何修改计算机名称
比如我的计算机名称是XXX-TTT,我想修改成YYY-ZZZ
修改有两步:
[1]修改/etc/hosts

127.0.0.1       localhost
192.168.76.21   YYY-ZZZ

# The following lines are desirable for IPv6 capable hosts
::1     localhost ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
~                                                                               
~                                                                               
~                     

[2]修改/etc/hostname
内容为

YYY-ZZZ

保存,退出,重启,就可以了。




    




|----------------------------------------------------------------------------------------|
                           版权声明  版权所有 @zhyiwww
            引用请注明来源 http://www.blogjava.net/zhyiwww   
|----------------------------------------------------------------------------------------|

你可能感兴趣的:(Ubuntu如何修改计算机名称)