hostnamectl - control the system hostname
hostnamectl [status] [set-hostname NAME]
Options you will use
status- Show hostname, machine ID, boot ID, virtualization, OS, kernel and architecture.
set-hostname NAME- Set the static hostname (persists across reboots).
Examples
$ hostnamectlshows "Virtualization: apple" and "Architecture: arm64" on this box
Try hostnamectl in a real terminal Free, in your browser - a real Ubuntu terminal to try it in, with missions that check your work.