Skip to content

Instantly share code, notes, and snippets.

@tom-henderson
Created August 8, 2017 07:05
Show Gist options
  • Save tom-henderson/3ffcebac0162d80673070f088b26c091 to your computer and use it in GitHub Desktop.
Save tom-henderson/3ffcebac0162d80673070f088b26c091 to your computer and use it in GitHub Desktop.
Set hostname on OSX
#!/bin/bash -eux
hostname=$1
scutil --set HostName ${hostname}
scutil --set ComputerName ${hostname}
scutil --set LocalHostName ${hostname}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment