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/