2018년 4월 5일 목요일

[우분투] hostname 설정

hostname 설정


편집

  • /etc/hostname
  • /etc/hosts

서비스 재시작


$ systemctl restart systemd-logind.service

또는 reboot


hostnamectl


$ hostnamectl set-hostname <new hostname>


Avahi service 재시작


$ service avahi-daemon restart


ping 확인


hostname 이 mycom 이라고 가정


$ ping mycom.local