简体   繁体   English

Android 中的 /etc/hosts 和 /system/etc/hosts 有什么区别?

[英]What's the difference between /etc/hosts and /system/etc/hosts in Android?

I was navigating the "/" directories on my android and came across two "hosts" files, one in /etc and the other in /system/etc which had the same contents.我在 android 上浏览“/”目录时遇到了两个“主机”文件,一个在/etc中,另一个在/system/etc中,它们的内容相同。 Are there any differences between these two files or are they same?这两个文件之间有什么区别还是相同? I also noticed that they had the same contents in them saying 127.0.0.1 localhost我还注意到他们有相同的内容说127.0.0.1 localhost

Yes they are both the same file.是的,它们都是同一个文件。 One is a symbolic link to the other.一个是到另一个的符号链接。

Further reading:进一步阅读:

https://en.m.wikipedia.org/wiki/Hosts_(file) https://en.m.wikipedia.org/wiki/Hosts_(文件)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Android 模拟器忽略 system/etc/hosts 文件中的设置 - Android emulator ignores settings in system/etc/hosts file Genymotion:编辑/ system / etc / hosts文件 - Genymotion: Edit /system/etc/hosts file 在Android中以编程方式/ etc / hosts文件操作 - /etc/hosts file manipulation programmatically in android 如何在牛轧糖中运行的 Android Studio 模拟器中编辑 /etc/hosts 文件? - How to edit /etc/hosts file in Android Studio emulator running in nougat? Genymotion android模拟器adb shell无法编写/ etc / hosts - Genymotion android emulator adb shell can't write /etc/hosts Ionic Android访问/ etc / hosts设置的本地站点 - Ionic Android Accessing Local Sites Set By /etc/hosts 尝试读取/ etc / hosts文件时Android经常崩溃? - Frequent Android crashes while attempting to read /etc/hosts file? system/etc/permissions 中的 privapp-permissions.xml 和 system/etc/default-permissions 中的 default-permissions.xml 有什么区别? - What is the difference between privapp-permissions.xml in system/etc/permissions and default-permissions.xml in system/etc/default-permissions? Genymotion - 哪些IP设置在etc / hosts文件中,用于通过域访问主机的本地Web服务器? - Genymotion - which IP set in etc/hosts file for access host's local webserver via domain? 无法在Android Studio x86和x86x64仿真器上更新/ etc / hosts文件 - Not able to update /etc/hosts file on Android Studio x86 and x86x64 emulator
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM