- Change your computer’s name or local hostname on Mac
- Change your computer’s name
- Change your computer’s local hostname
- linux-notes.org
- Изменить hostname/ComputerName/LocalHostName в Mac OS X
- Добавить комментарий Отменить ответ
- Использование динамического глобального имени хоста на Mac
- Change your computer’s name or local hostname on Mac
- Change your computer’s name
- Change your computer’s local hostname
- Change your Mac Hostname via Terminal
- How to Change Host Name on Mac from the Command Line
- Another Method for Setting the Mac Hostname
- Checking the Current Mac Hostname from the Command Line
- Setting a Temporary Hostname Change
Change your computer’s name or local hostname on Mac
Your computer’s name and local hostname are used to identify your computer on your local network.
Change your computer’s name
Your computer’s name is displayed at the top of the Sharing preferences pane.
On your Mac, choose Apple menu
> System Preferences, then click Sharing.
If the lock at the bottom left is locked , click it to unlock the preference pane.
Type a new name in the Computer Name field.
Change your computer’s local hostname
The local hostname or local network name, is displayed beneath the computer’s name at the top of the Sharing preferences pane. It identifies your Mac to Bonjour-compatible services.
The local hostname is your computer’s name with .local added, and any spaces are replaced with hyphens. For example, if your computer’s name is My Computer, your local hostname is My-Computer.local. Local hostnames aren’t case sensitive, so my-computer.local is the same as My-Computer.local.
On your Mac, choose Apple menu
> System Preferences, then click Sharing.
If the lock at the bottom left is locked , click it to unlock the preference pane.
Click Edit, then enter a new local hostname.
If your Mac has the exact name of another Mac on your local network, a number is added to the local network name.
Источник
linux-notes.org
Имя хоста — это символическое имя, присвоенное сетевому устройству, которое может быть использовано для организации доступа к этому устройству различными способами. Такое имя присваивается каждому устройству, выходящему в сеть. То есть сетевое имя можно определить не только у персонального компьютера, но и у ноутбука, планшета, смартфона, кпк и даже холодильника, если он подключен к интернету. По имени хоста можно предположительно определить ваш регион и интернет оператора. Если у вас динамический ip адрес, то и имя компьютера будет меняться при каждом новом интернет соединении.
Изменить hostname/ComputerName/LocalHostName в Mac OS X
Для начала (если кто-то не знает свой hostname), выполним следующую команду для того, чтобы узнать hostname:
Как видно с вывода, у меня — Macbook, но я могу изменить на любой другой с помощью команды:
Можно более детально ознакомиться с этой командой прочитав man:
Так же, поддерживается синтаксис как и в Unix/Linux и можно выполнить следующую команду:
Она тоже сменит ваш хостнейм.
Можно изменить имя компьютера:
Так же, с легкостью, можно изменить локальный хостнейм:
Очистите DNS кэш:
На этом, я завершаю свою статью «Изменить hostname/ComputerName/LocalHostName в Mac OS X».
Добавить комментарий Отменить ответ
Этот сайт использует Akismet для борьбы со спамом. Узнайте, как обрабатываются ваши данные комментариев.
Источник
Использование динамического глобального имени хоста на Mac
Если поставщик услуг поддерживает безопасное обновление динамической DNS (RFC 3007), можно назначить компьютеру Mac глобальное имя хоста DNS, чтобы другие компьютеры, находящиеся за пределами локальной сети, могли обращаться к нему по имени.
Даже при регулярном изменении IP-адреса компьютер Mac будет автоматически обновлять глобальное имя хоста DNS так, чтобы оно указывало на текущий IP-адрес.
На Mac выберите пункт меню «Apple»
> «Системные настройки», затем нажмите «Общий доступ».
Нажмите «Правка» и выберите «Использовать динамическое глобальное имя хоста».
Введите имя хоста, имя пользователя и пароль учетной записи.
Попросите у поставщика услуг или администратора домена имя пользователя и пароль, чтобы Mac мог обновлять имя хоста при каждом изменении адреса.
Если поставщик услуг поддерживает глобальный доступ с помощью Bonjour, можно установить флажок «Предлагать службы в данном домене с помощью Bonjour», чтобы предлагать активные службы общего доступа этого компьютера в данном домене.
Если просмотр Bonjour разрешен для данного домена, другие компьютеры будут видеть службы, автоматически перечисленные в их приложениях, на основе доменов поиска, введенных в настройках сети, или на основе информации, возвращаемой DHCP.
Источник
Change your computer’s name or local hostname on Mac
Your computer’s name and local hostname are used to identify your computer on your local network.
Change your computer’s name
Your computer’s name is displayed at the top of the Sharing preferences pane.
On your Mac, choose Apple menu
> System Preferences, then click Sharing.
If the lock at the bottom left is locked , click it to unlock the preference pane.
Type a new name in the Computer Name field.
Change your computer’s local hostname
The local hostname, or local network name, is displayed beneath the computer’s name at the top of the Sharing preferences pane. It identifies your Mac to Bonjour-compatible services.
The local hostname is your computer’s name with .local added, and any spaces are replaced with hyphens. For example, if your computer’s name is My Computer, your local hostname is My-Computer.local. Local hostnames aren’t case sensitive, so my-computer.local is the same as My-Computer.local.
On your Mac, choose Apple menu
> System Preferences, then click Sharing.
If the lock at the bottom left is locked , click it to unlock the preference pane.
Click Edit, then enter a new local hostname.
If your Mac has the exact name of another Mac on your local network, a number is added to the local network name.
Источник
Change your Mac Hostname via Terminal
Need to change the hostname of a Mac? For most people if you want to change your Mac computer name you just do it through the Sharing system preference, it’s quick and very easy. For those of us that are more geekishly inclined, we like to do things through the Terminal.
This tutorial will show how to change your Mac hostname with the command line and make the setting change permanent (well, permanent until you change it again):
How to Change Host Name on Mac from the Command Line
To get started, launch the Terminal application in Mac OS and then use the following command syntax:
sudo scutil –-set HostName new_hostname
Simply replace new_hostname with whatever you want your hostname to be changed to, for example I want to change a Mac’s hostname to MacBookPro, I will use this command:
sudo scutil –-set HostName MacBookPro
(Note the “–” before set is two dashes next to each other, –set)
You will be asked for your admin password since you’re using the sudo command.
Another Method for Setting the Mac Hostname
With modern MacOS releases from Mac OS X Mavericks and newer, you can also use the hostname command with a flag to set the hostname to be permanently changed:
sudo hostname -s YourHostName
Again, sudo requires admin privileges to complete the job.
Checking the Current Mac Hostname from the Command Line
After the above command is executed you can verify that the changes took place by typing:
If you want to watch this done, the short video below walks through the steps by using scutil:
Setting a Temporary Hostname Change
You can also set a temporary hostname change by using the following command:
sudo hostname new_hostname
This particular approach is temporary and will reset itself after your Mac reboots though, so if you want a permanent hostname change, use the above command instead. You can still use the hostname command but it will require the -s flag as discussed in the aforementioned instructions. Thank you to commenter Jim for pointing this out!
That’s all there is to it. By default Mac OS X will usually assign the hostname as whatever the admin account username is. Changing your Mac’s hostname can make it easier to find your Mac on a network and to connect to.
Источник