localhost

来源:互联网 发布:军犬网络舆情监测系统 编辑:程序博客网 时间:2024/05/17 08:09


  一个特殊的DNS主机名, 代表分配给引用这个名称的计算机的IP地址。 把这个名称看作是提供快速但是不可靠服务的无连接协议。
  localhost 指你所在的计算机本身。
  在windows系统它成了 127.0.0.1的别名 ,在*nix系统下,查看网卡配置会发现作为本地回环的方式,一定程序上使用localhost比127.0.0.1要快一些。
  重要重申localhost和IIS,IE,windows无关,他就是指你使用的计算机本身。
  在Hosts文件中 localhost指向的IP是127.0.0.1 这个关系是可以修改的
  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
  127.0.0.1 localhost
  最下面的:127.0.0.1 localhost,这两个参数你可以随意改。格式是IP空格域名
  localhost login 是什么意思?
  在Linux系统中,系统管理员在为用户建立新帐号时赋给用户一个用户名和一个初始的口令。另外,Linux系统给计算机赋予一个主机名。主机名用于在网络上识别独立的计算机(即使用户的计算机没有联网,也应该有一个主机名)。TurboLinux系统给出的缺省主机名为:localhost。
  在Linux系统成功启动后,屏幕会提示:localhost login ,意思就是系统要求输入用户名,接着要求输入口令。否则将无法登录系统,也就无法使用。
原创粉丝点击