Viewing and setting hostname on Fedora 30

View current host name:

$ $hostnamectl status
Static hostname: localhost.localdomain
 Transient hostname: kennedy.lan
          Icon name: computer-laptop
            Chassis: laptop
         Machine ID: xx
            Boot ID: xx
   Operating System: Fedora 30 (Workstation Edition)
        CPE OS Name: cpe:/o:fedoraproject:fedora:30
             Kernel: Linux 5.1.3-surface
       Architecture: x86-64

Change the hostname to ‘kennedy.lan’:

hostnamectl set-hostname --static "kennedy.lan"

This feels very complicated. Much easier using /etc/rc.conf in FreeBSD.

Leave a Reply

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