Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

.osx: Comment computer name settings

It’s good to have these commands here as a reference, but it’s annoying when running `.osx` on multiple computers in the same network.
  • Loading branch information...
commit 92f4b42abaec348673f910fca2749aac76d640ed 1 parent a888a19
@mathiasbynens authored
Showing with 4 additions and 4 deletions.
  1. +4 −4 .osx
View
8 .osx
@@ -13,10 +13,10 @@ while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null &
###############################################################################
# Set computer name (as done via System Preferences → Sharing)
-sudo scutil --set ComputerName "0x6D746873"
-sudo scutil --set HostName "0x6D746873"
-sudo scutil --set LocalHostName "0x6D746873"
-sudo defaults write /Library/Preferences/SystemConfiguration/com.apple.smb.server NetBIOSName -string "0x6D746873"
+#sudo scutil --set ComputerName "0x6D746873"
+#sudo scutil --set HostName "0x6D746873"
+#sudo scutil --set LocalHostName "0x6D746873"
+#sudo defaults write /Library/Preferences/SystemConfiguration/com.apple.smb.server NetBIOSName -string "0x6D746873"
# Set standby delay to 24 hours (default is 1 hour)
sudo pmset -a standbydelay 86400

5 comments on commit 92f4b42

@MoOx

I've updated my setup to have dynamic computer name depending on the model. I've an iMac & a Macbook, & this snippet generate iMoOx & MacMoOx computer name.
https://github.com/MoOx/dotfiles/blob/48da296f79856f074b254a6cc20e33504dc2ef63/components/osx/setup#L7-L24

@jgeusebroek

Interesting, but might be better to use the serial number. In case you have more machines.

ioreg -l | grep IOPlatformSerialNumber | sed -e 's/.*\"\(.*\)\"/\1/'
@MoOx

Good point. But since I know I won't have a lots of machine, it suits my need :)
Anyway thanks for the tip.

@mathiasbynens

Thanks for the tips!

Please sign in to comment.
Something went wrong with that request. Please try again.