hostname

Check

hostname      # Returns full hostname including any domain

hostname -s   # Returns short hostname without any domain appended

Change

Linux

You can manually update the hostname by updating /etc/hostname.

Alternatively, on some systems you can use...

sudo hostnamectl set-hostname newhostname

After any change of hostname you should also update /etc/hosts (and DNS)

AIX

chdev -l inet0 -a hostname=newhostname

uname -S newhostname

hostname newhostname

https://www.ibm.com/support/pages/change-systems-hostname-aix

After any change of hostname you should also update /etc/hosts (and DNS)

Bibliography