分享

How to Change Your Terminal Hostname in Ubuntu [Quick Tips]

 simplelam 2014-02-25

Usually when you install Ubuntu, it will ask you for your username and assign a hostname to you, such as damien@damien-laptop. This is also what you will see in your terminal. If you don’t like the hostname shown in the terminal, or for some reason that you want to change the hostname, here’re the exact steps in Ubuntu. It is very easy. Just follow along and you will be done in a minute.

1. First, open a terminal and type:

gksu gedit /etc/hostname

You should see a line stating your current hostname. For eg. damien-desktop

ubuntu-hostname

2. Change the hostname to something you desired. Save and close the file.

3. Back in your terminal, type:

gksu gedit /etc/hosts

4. Change the line:

127.0.1.1	damien-desktop

to

127.0.1.1	your-new-hostname

ubuntu-host

Save and close the file.

Restart the computer. Your new hostname should appear in the terminal now.

    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约

    类似文章 更多