`
wbj0110
  • 浏览: 1558010 次
  • 性别: Icon_minigender_1
  • 来自: 上海
文章分类
社区版块
存档分类
最新评论

How to Change Hostname in Ubuntu 13.10

阅读更多

1. First make a backup of the following files.

cp /etc/hosts /etc/hosts.back
cp /etc/hostname /etc/hostname.back

2. Edit the ‘hosts’ file:

vi /etc/hosts

The file should look like this:

127.0.0.1 localhost
127.0.1.1 your_new_hostname

Here, change “some_hostname” to the new hostname / computer name.

3. Edit the hostname file:

vi  /etc/hostname

This file only contains your hostname so change it again to the new_hostname

4. Now restart the hostname and networking services:

service networking restart

it could be that you will disconnected for a wail. after this re-login and check your new hostname with:

hostname -f

- See more at: http://www.unixmen.com/change-hostname-ubuntu-13-10/#sthash.EYB6bzAf.dpuf

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics