Skip to content

Instantly share code, notes, and snippets.

@QuiteZeal
Last active April 23, 2020 11:32
Show Gist options
  • Save QuiteZeal/eae783971f408e74da88aee9493fb336 to your computer and use it in GitHub Desktop.
Save QuiteZeal/eae783971f408e74da88aee9493fb336 to your computer and use it in GitHub Desktop.
Change Hostname in CentOS or Ubuntu.

Change Hostname in CentOS or Ubuntu

I choose the manual way

type this to display current hostname:

hostname

and type this to change it:

sudo hostnamectl set-hostname NewName

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