Windows 10에서 hosts 파일 수정하기

안녕하세요 율이맨 입니다.

윈도우 10에서 호스트파일 수정하는 방법을 알려드리겠습니다.

HOSTS 파일은 문자로된 이름을 숫자로 된 IP 주소로 매칭 시켜 주는 정보를 담고 있는 파일입니다.

네트워크상의 호스트 이름을 IP 주소로 변환하는데, DNS 보다 hosts 파일이 우선순위가 높습니다.

Windows 에서 hosts 파일의 위치는 다음과 같습니다.(Linux라면 /etc/hosts 일 것입니다.

 

C:\Windows\System32\drivers\etc\hosts

 

HOSTS 파일의 내용은 이러합니다.

 

# Copyright (c) 1993-2009 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     rhino.acme.com          # source server
#       38.25.63.10     x.acme.com              # x client host

# localhost name resolution is handled within DNS itself.
#	127.0.0.1       localhost
#	::1             localhost
# 테스트2
10.11.12.197 app.test.com
# 테스트1
10.11.13.197 app1.test.com

 

localhost나 IP 주소가 아니라 도메인 주소로 테스트를 해봐야 할 경우가 있습니다.

이럴 경우 HOSTS 파일에 등록을 해서 테스트를 할 수 있습니다.

이상 간단히 테스트 해볼 수 있는 hosts 파일을 변경하는 방법입니다.

 

 

  • 네이버 블러그 공유하기
  • 네이버 밴드에 공유하기
  • 페이스북 공유하기
  • 카카오스토리 공유하기