ubuntu get hostname code example
Example 1: how to get hostname on linux
$ hostnamectl
Example 2: ubuntu chang host name
Type the following commands:
$ sudo hostname new-server-name-here
$ hostnamectl
Type the following commands:
$ sudo hostname new-server-name-here