Cara Mudah Mengubah Hostname di Debian

Tampilkan hostname Saat Ini

hostnamectl

Static hostname: debian122
Icon name: computer-vm
Chassis: vm 🖴
Machine ID: 4c53f36fc0db4414ab37632115fedfec
Boot ID: 151e9b8b219e4523b134984a969d6a32
Virtualization: kvm
Operating System: Debian GNU/Linux 12 (bookworm)
Kernel: Linux 6.1.0-13-amd64
Architecture: x86-64
Hardware Vendor: QEMU
Hardware Model: Standard PC i440FX + PIIX, 1996
Firmware Version: rel-1.16.2-0-gea1b7a073390-prebuilt.qemu.org
root@debian122:~#

Pertama-tama atur nama host baru dengan menjalankan:

sudo hostnamectl set-hostname domainname

sudo nano /etc/hosts

127.0.0.1 localhost

127.0.0.1 debian.linuxid.net

# The following lines are desirable for IPv6 capable hosts

::1 localhost ip6-localhost ip6-loopback ff02

::1 ip6-allnodes ff02

::2 ip6-allrouters

Leave a Reply

Your email address will not be published. Required fields are marked *