Comment changer le nom d'hôte
hostnamectl set-hostname "new_hostname"
hostnamectl (or hostname) to check new settings
Lazy Lizard
hostnamectl set-hostname "new_hostname"
hostnamectl (or hostname) to check new settings
sudo nano /etc/hostname
sudo nano /etc/hosts
sudo reboot
# login as root and make sure that there are no active processes for user
usermod -l NEW_USERNAME OLD_USERNAME
# if user is running kill user w the following command
userUID=$(id -u OLD_USERNAME) && pkill -U $userUID
FIRST GIVE ROOT PERMISSION
sudo su
gedit /etc/hosts
gedit /etc/hostname