免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2522 | 回复: 3
打印 上一主题 下一主题

[FreeBSD] 如何设置freebsd的csh的提示符为root@haha[/etc]#,和显示中文? [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2007-01-07 14:32 |只看该作者 |倒序浏览
我用
setenv LC_CTYPE zh_CN.GBK
setenv LANG zh_CN.GBK


当时可以显示中文,但退出后再次登陆就失效了,有没有一劳永逸的方法。


望知情者告知小弟一下,谢谢!

[ 本帖最后由 52BSD 于 2007-1-7 18:33 编辑 ]

论坛徽章:
1
技术图书徽章
日期:2013-12-05 23:25:45
2 [报告]
发表于 2007-01-07 14:46 |只看该作者
防盗登陆脚本之中去,/etc/login.???什么的,自己看看吧。

论坛徽章:
0
3 [报告]
发表于 2007-01-07 15:07 |只看该作者
中文:语句加入 /etc/csh.cshrc

提示:在~/.cshrc里

if ($?prompt) then

        set prompt = "%B%n@%~%b: "

"        Starts the prompt string.

%B        Turns on bold.

%m      group name

%n        Shows the login name in the prompt.

@        I use this as a separator to make my prompt more visually appealing.

%~        Shows the current working directory. It results in a shorter prompt than %/, as my home directory is shortened from /usr/home/myusername to ~

%b        Turns off bold.

:        Again, this is an extra character I use to separate my prompt from the cursor.

"        Ends the prompt string.

提示符主要是在 set prompt 里用好 %m 和 %n,  如果lz装了game 可以在 fortune 这个小游戏提供的tips里看到许多bsd的提示。

另外,bsd hacks 这本书推荐。

[ 本帖最后由 995636 于 2007-1-7 15:10 编辑 ]

论坛徽章:
0
4 [报告]
发表于 2007-01-07 18:40 |只看该作者
谢谢,问题已解决。
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP