Skip to content

Instantly share code, notes, and snippets.

@seignovert
Created January 3, 2017 14:07
Show Gist options
  • Save seignovert/e0b96abf92112cd42efb1346aa895c7b to your computer and use it in GitHub Desktop.
Save seignovert/e0b96abf92112cd42efb1346aa895c7b to your computer and use it in GitHub Desktop.
[Ubuntu] Change default `hostname`

Change hostname on a server

Get the current hostname

hostname

To change the hostname

  • Edit /etc/hostname file (as admin) from old-host-name to new-host-name.
  • Edit known hosts in /etc/hosts if necessary.

Source: Cyber citi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment