The OpenNET Project
 
Поиск (ключи):    ПРОГРАММЫ СТАТЬИ СОВЕТЫ ФОРУМ
  WIKI НОВОСТИ (+) MAN'ы ДОКУМЕНТАЦИЯ

Поиск:  Каталог документации / Документация по FreeBSD / Руководства по FreeBSD на английском

2.4. Creating the List of other LAN Hosts(/etc/hosts)

The final step in configuring the LAN side of the FreeBSD system is to create a list of the names and TCP/IP addresses of the various systems that are connected to the Local Area Network. This list is stored in the '/etc/hosts' file.

The default version of this file has only a single host name listing in it: the name and address of the loopback device ('lo0'). By networking convention, this device is always named "localhost" and always has an IP address of 127.0.0.1. Section 2.2.

To edit the /etc/hosts file enter the following command:

     # ee /etc/hosts


Scroll all the way to the bottom of the file (paying attention to the comments along the way; there's some good information there!) and enter (assuming our sample network) the following IP addresses and host names:

    192.168.1.1    curly  curly.my.domain  # FreeBSD System
    192.168.1.2    larry  larry.my.domain  # Windows '95 System
    192.168.1.3    moe    moe.my.domain    # Windows for Workgroups
    System
    192.168.1.4    shemp  shemp.my.domain  # Windows NT System


(No changes are needed to the line for the '127.0.0.1 localhost' entry.)

Once you've entered these lines, press the 'Esc' key to invoke the control menu. Select "leave editor" and be sure to select "save changes" when prompted.

For questions about FreeBSD, e-mail <questions@FreeBSD.org>.
For questions about this documentation, e-mail <doc@FreeBSD.org>.


ПОДПИШИСЬ НА ЖУРНАЛ Linux Format 2012!

Журнал "Linux Format" (Линукс Формат)- Единственный в России и странах СНГ журнал на русском языке, посвящённый Linux и свободному ПО. Журнал для IT-директоров, IT-менеджеров, программистов, системных администраторов, учителей школ и преподавателей ВУЗов и всех пользователей ПК. В каждом выпуске: Новости индустрии OpenSource, обзоры новинок свободного ПО, обучающие и методические статьи.

Каждый, кто оформит подписку, получает бонусы и подарки- объёмные наклейки на системный блок, диск с архивом номеров за 2005-2011 г.г. и ежемесячно электронную версию журнала в pdf-формате.

Оформить подписку на год


  Закладки на сайте
  Проследить за страницей
Created 1996-2012 by Maxim Chirkov  
ДобавитьРекламаВебмастеруГИД  
RUNNet TopList