Skip to content

Commit

Permalink
Add utility to set hostname on macos
Browse files Browse the repository at this point in the history
  • Loading branch information
zeekay committed Oct 17, 2019
1 parent bbc27d8 commit 9d51d05
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions plugins/osx/func/set-hostname
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
set-hostname() {
sudo scutil --set HostName $1
sudo scutil --set LocalHostName $1
sudo scutil --set ComputerName $1
dscacheutil -flushcache
}

# vim: ft=zsh

0 comments on commit 9d51d05

Please sign in to comment.