Created
January 3, 2019 07:02
-
-
Save htaghizadeh/51fa125c87c9836529734e5f60e5f3ce to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Summary: | |
sudo hostname NEW_NAME_HERE | |
sudo nano /etc/hostname # change OLD_NAME by NEW_NAME | |
sudo nano /etc/hosts # change OLD_NAME by NEW_NAME | |
sudo systemctl restart systemd-logind.service | |
hostnamectl set-hostname NEW_NAME_HERE | |
Also you should recreate your ssh keys on your machine: | |
sudo rm /etc/ssh/ssh_host_* | |
sudo dpkg-reconfigure openssh-server | |
Just in case, check references of your old hostname on /etc and fix it: | |
sudo grep -R pulex /etc/ 2>/dev/null |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment