How to modify the username and host name in Ubuntu

Source: Internet
Author: User
Tags exit

The modification method is as follows:

1. Modify User name:

Switch to root to open the following two configuration files

sudo gedit/etc/passwd

Change the "xxx" I want to change the username to "way", Save and exit

sudo gedit/etc/shadow

Also change "xxx" to "way", Save and exit

After the reboot, the name becomes Way@xxx-ubuntu:

2. Now to modify the computer name Xxx-ubuntu to Way-ubuntu

There are two steps to modifying:

①. Modify/etc/hosts:sudo gedit/etc/hosts

127.0.0.1 localhost

192.168.76.21 Way-ubuntu

# 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

~

②. Modify/etc/hostname content to

Way-ubuntu

Save, quit, reboot, it's OK.

This column more highlights: http://www.bianceng.cn/OS/Linux/

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.