hostname
Check
Check
hostname # Returns full hostname including any domain
hostname -s # Returns short hostname without any domain appended
Change
Change
Linux
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
AIX
chdev -l inet0 -a hostname=newhostname
uname -S newhostname
hostname newhostname
https://www.ibm.com/support/pages/change-systems-hostname-aixAfter any change of hostname you should also update /etc/hosts (and DNS)
Bibliography
Bibliography