• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Hostnames
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Hostnames


  • Subject: Re: Hostnames
  • From: James R Cutler <email@hidden>
  • Date: Wed, 04 Jan 2017 21:03:42 -0500


On Jan 4, 2017, at 2:50 AM, Andreas Fink <email@hidden> wrote:

Can anyone shed light on where the hostname is set/stored in macOS Sierra?


I don’t even try.  Thanks to  https://github.com/mathiasbynens/dotfiles/blob/master/.osx, I just use:

#!/bin/sh

# SetComputerNames.command jrc long ago

# set hostname(s) interactively
# inspired by # https://github.com/mathiasbynens/dotfiles/blob/master/.osx

echo ""
  echo "Setting your computer name (as done via System Preferences → Sharing)"
  echo "What would you like it to be?"
  read COMPUTER_NAME
  sudo scutil --set ComputerName $COMPUTER_NAME
  sudo scutil --set HostName $COMPUTER_NAME
  sudo scutil --set LocalHostName $COMPUTER_NAME
  sudo defaults write /Library/Preferences/SystemConfiguration/com.apple.smb.server NetBIOSName -string $COMPUTER_NAME

echo ""
  

James R. Cutler
email@hidden
PGP keys at http://pgp.mit.edu



 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Prev by Date: Re: Hostnames
  • Next by Date: _kCFStreamPropertyReadTimeout
  • Previous by thread: Re: Hostnames
  • Next by thread: _kCFStreamPropertyReadTimeout
  • Index(es):
    • Date
    • Thread