[问题]请问ubuntu中如何编辑像windows中的host文件?

系统安装、升级讨论
版面规则
我们都知道新人的确很菜,也喜欢抱怨,并且带有浓厚的Windows习惯,但既然在这里询问,我们就应该有责任帮助他们解决问题,而不是直接泼冷水、简单的否定或发表对解决问题没有任何帮助的帖子。乐于分享,以人为本,这正是Ubuntu的精神所在。
回复
j3rry
帖子: 5
注册时间: 2008-06-09 3:01

[问题]请问ubuntu中如何编辑像windows中的host文件?

#1

帖子 j3rry » 2008-06-09 3:05

比如在win下我配置host文件在其中加入
www.fortest.com 127.0.0.1
在浏览器中输入www.fortest.com就可以访问自己机器上启的应用。请问在linux下该如何配置?

谢谢 :D
头像
qiang_liu8183
论坛版主
帖子: 10699
注册时间: 2006-09-10 22:36
系统: Arch Debian
来自: 北京

#2

帖子 qiang_liu8183 » 2008-06-09 3:09

Arch是/etc/hosts
Ubuntu不知道
看破、放下、自在、随缘、念佛
真诚、清净、平等、正觉、慈悲
头像
冲浪板
论坛版主
帖子: 7513
注册时间: 2007-05-06 8:19

#3

帖子 冲浪板 » 2008-06-09 8:07

#echo "127.0.0.1 www.fortest.com" > /etc/hosts
头像
skyx
论坛版主
帖子: 9202
注册时间: 2006-12-23 13:46
来自: Azores Islands
联系:

#4

帖子 skyx » 2008-06-09 8:10

qiang_liu8183 写了:Arch是/etc/hosts
Ubuntu不知道

对2楼的这种广告行为强烈不满。
:shock:
no security measure is worth anything if an attacker has physical access to the machine
头像
qiang_liu8183
论坛版主
帖子: 10699
注册时间: 2006-09-10 22:36
系统: Arch Debian
来自: 北京

#5

帖子 qiang_liu8183 » 2008-06-09 13:11

skyx 写了:
qiang_liu8183 写了:Arch是/etc/hosts
Ubuntu不知道

对2楼的这种广告行为强烈不满。
:shock:
:oops:
看破、放下、自在、随缘、念佛
真诚、清净、平等、正觉、慈悲
回复