2016-08-11 44 views
-2

我有一個奇怪的問題,變得相當煩人,因爲我無法推斷爲什麼我對/ etc/hosts文件的編輯沒有保存。當我使用sudo權限進行編輯並保存時,它看起來很好。一旦我打開一個新的終端或退出一個終端,並再次檢查我所做的編輯已經消失。編輯/ etc/hosts文件OS X

sudo vim /etc/hosts/ or sudo vim /private/etc/hosts 


## 
# Host Database 
# 
# localhost is used to configure the loopback interface 
# when the system is booting. Do not change this entry. 
## 
127.0.0.1  localhost 
255.255.255.255 broadcasthost 
::1    localhost 

我嘗試加入這一行:127.0.0.1 ac-decountsv.example.com 我也試過編輯/私營/ etc/hosts文件/。有人能告訴我我忽略了什麼?

感謝

+0

爲什麼向下票呢? – user1958532

+1

['關於通用計算硬件和軟件的問題,除非它們直接涉及主要用於編程的工具,否則無法用於堆棧溢出。](http://stackoverflow.com/help/on-topic) – TZHX

回答