localhost
I:在計算機網絡中,localhost (意為“本地主機”,指“這臺計算機”)是給回路網絡接口(loopback)的一個標準主機名,相對應的IP地址為127.0.0.1(IPv4)和[::1](IPv6)。這個名稱也是一個保留域名(RFC 2606) ,為了避免同狹義定義主機名混淆而單獨列出。II:在可用其他方式使用計算機主機名稱的地方,可以指定主機為localhost。例如,將web 服務器上安裝的web瀏覽器指向http://localhost,將會顯示運行這個瀏覽器的計算機上所服務的網站的主頁,但是只有當web服務器配置至 服務回路接口時才能顯示。
III:一個特殊的DNS主機名, 代表分配給引用這個名稱的計算機的IP地址。 把這個名稱看作是提供快速但是不可靠服務的無連接協議。
IV:localhost 指你所在的計算機本身。
V:在windows系統它成了 127.0.0.1的別名 ,在Unix系統下,查看網卡配置會發現作為本地回環的方式,一定程序上使用localhost比127.0.0.1要快一些。 VI:重要重申localhost和IIS,IE,windows無關,他就是指你使用的計算機本身。
VII:在Hosts文件中 localhost指向的IP是127.0.0.1 這個關系是可以修改的
VIII:
windows 修改localhost指向
打開C:\WINDOWS\system32\drivers\etc\hosts文件,此文件可以用記事本打開打開如下:
# Copyright (c) 1993-1999 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
# 102.54.94.97 (這里不讓顯示) # source server
# 38.25.63.10 (這里不讓顯示) # x client host
IX:127.0.0.1 localhost 最下面的:127.0.0.1 localhost,這兩個參數你可以隨意改。格式是IP空格域名
X: localhost login 是什么意思? 在Linux系統中,系統管理員在為用戶建立新帳號時賦給用戶一個用戶名和一個初始的口令。另外,Linux系統給
計算機賦予一個主機名。主機名用于在網絡上識別獨立的計算機(即使用戶的計算機沒有聯網,也應該有一個主機名)。TurboLinux系統給出的缺省
主機名為:localhost。
在Linux系統成功啟動后,屏幕會提示:localhost login ,意思就是系統要求輸入用戶名,接著要求輸入口令。否則將無法登錄系統,也就無法使用。
(注:轉自百度文庫)