Меню Рубрики

Change hostname mac os

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.

Type a new name in the Computer Name field.

You may need to click the lock icon and provide an administrator name and password before you can change the name.

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.

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 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.

Type a new name in the Computer Name field.

You may need to click the lock icon and provide an administrator name and password before you can change the name.

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.

Читайте также:  Драйвера canon mf4018 mac os

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:

Читайте также:  Fuse for mac os что это

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.

Источник

linux-notes.org

Имя хоста — это символическое имя, присвоенное сетевому устройству, которое может быть использовано для организации доступа к этому устройству различными способами. Такое имя присваивается каждому устройству, выходящему в сеть. То есть сетевое имя можно определить не только у персонального компьютера, но и у ноутбука, планшета, смартфона, кпк и даже холодильника, если он подключен к интернету. По имени хоста можно предположительно определить ваш регион и интернет оператора. Если у вас динамический ip адрес, то и имя компьютера будет меняться при каждом новом интернет соединении.

Изменить hostname/ComputerName/LocalHostName в Mac OS X

Для начала (если кто-то не знает свой hostname), выполним следующую команду для того, чтобы узнать hostname:

Как видно с вывода, у меня — Macbook, но я могу изменить на любой другой с помощью команды:

Можно более детально ознакомиться с этой командой прочитав man:

Так же, поддерживается синтаксис как и в Unix/Linux и можно выполнить следующую команду:

Она тоже сменит ваш хостнейм.

Можно изменить имя компьютера:

Так же, с легкостью, можно изменить локальный хостнейм:

На этом, я завершаю свою статью «Изменить hostname/ComputerName/LocalHostName в Mac OS X».

Добавить комментарий Отменить ответ

Этот сайт использует Akismet для борьбы со спамом. Узнайте как обрабатываются ваши данные комментариев.

Источник

Mac refusing to change hostname

I’ve been trying to figure out how to use postfix on my Mac and something has gone horribly wrong and I can’t seem to fix it.

I believe the problem is related to starting Postfix.

Читайте также:  Life is strange для mac os

Basically, the Mac seems to refuse to change its hostname. In bash, the user appears as “admin@(null)”, if I type ‘hostname’ I’m given “(null)” also.

Changing the hostname in Sharing from System Preferences causes the second example to change (where it says, for example, “Other users can access shared folders on this computer, and administrators all volumes, at afp://null/ or “lion2”.”) but the first stays as null.

I’ve even tried /etc/hostconfig manually setting hostname but nothing works.

Is there somewhere else the hostname is trying to be set but is perhaps corrupt? Or contains an invalid character or something?

This is causing Postfix not to work and report:

postfix: warning: valid_hostname: invalid character 40(decimal): (null) postfix: fatal: unable to use my own hostname

Please, I really hope someone can help me fix this. I’ve been trying for hours now.

Источник

Flame Products

By:

Support

Issue:

The hostname present in the Mac System Preferences is different to the one shown in the terminal.

The following error may also be seen:

Network License Error -96.7.1100

Environment:

Solution:

This information can be useful when configuring your workstation remotely through ssh, or when you need to change the fully qualified hostname of the workstation (which can’t be done from the UI).

Note: The following procedure is for informational purposes only and is not an Autodesk certified or supported workflow. Should issues arise with this procedure, they will not be addressed by Autodesk Customer Support.

Perform the following tasks to change the workstation hostname using the scutil command.

  1. Open a terminal.
  2. Type the following command to change the primary hostname of your Mac:
    This is your fully qualified hostname, for example myMac.domain.com
  1. Type the following command to change the Bonjour hostname of your Mac:
    This is the name usable on the local network, for example myMac.local.
  1. Type the following command to change the computer name:
    This is the user-friendly computer name you see in Finder, for example myMac.

sudo scutil –set ComputerName

sudo scutil –set ComputerName flame01

    Flush the DNS cache by typing:

Источник

Adblock
detector