找回密码
 注册
查看: 1331|回复: 12

如何更换Linux的shell

[复制链接]
发表于 2004-10-14 14:29:39 | 显示全部楼层 |阅读模式
linux有很多shell,如ash,bash...。一般默认情况下使用的是bash,如果要更换linux的shell,如何去做?与shell相关的脚本文件都有哪些?哪位高人能帮我解决这个问题?
发表于 2004-10-14 16:57:53 | 显示全部楼层
Edit the /etc/passwd file.  Make the shell parameter point to your favourite shell executable, e.g. /bin/sh
回复

使用道具 举报

 楼主| 发表于 2004-10-14 17:17:43 | 显示全部楼层
好像不是吧,我自己做的linux系统,就没有这个文件,为什么它也默认为bash?而且/etc/passwd文件里面好像没有专门修改shell的吧???
回复

使用道具 举报

发表于 2004-10-14 17:32:46 | 显示全部楼层
shell的调用 好像是login程序完成的,
的确是解析passed,执行其中相关程序设置参数( 一般就是SHELL了)
hongxi:1000:100:mahongxi:/home/hongxi:/bin/bash
/bin/bash就是由login程序启动的程序,改了它就应OK了.
回复

使用道具 举报

 楼主| 发表于 2004-10-14 18:23:05 | 显示全部楼层
那怎样修改在单用户模式下的shell呢?因为上面你们所说的好像都是针对某个特定用户而言修改它所对应的shell。
回复

使用道具 举报

发表于 2004-10-14 19:01:04 | 显示全部楼层
单用户模式下的shell

单用户不就是root嘛
回复

使用道具 举报

 楼主| 发表于 2004-10-14 19:51:08 | 显示全部楼层
那么你说我做的Linux系统没有passwd文件的话,如何修改呢?
回复

使用道具 举报

 楼主| 发表于 2004-10-14 19:52:45 | 显示全部楼层
我怎么修改了也不行?
回复

使用道具 举报

 楼主| 发表于 2004-10-14 23:45:24 | 显示全部楼层
各位高人能不能帮我解决一下这个困难呢,先谢了!!!
回复

使用道具 举报

发表于 2004-10-15 00:33:32 | 显示全部楼层
in simple words:  
If you want to using another shell instead of bash, you can just link /bin/sh into your /bin/csh etc. because kernel will look for /bin/sh

That's what I remembered When I did embedded linux. i am not very much sure. you can try. I did embedded linux first, then come to play with desktop :0
回复

使用道具 举报

 楼主| 发表于 2004-10-15 10:10:36 | 显示全部楼层
楼上说的没错,确实是这样的,我已经尝试过了。谢谢
回复

使用道具 举报

walte 该用户已被删除
发表于 2004-10-15 10:45:47 | 显示全部楼层
提示: 作者被禁止或删除 内容自动屏蔽
回复

使用道具 举报

发表于 2004-10-16 23:54:11 | 显示全部楼层
这么麻烦? 直接
[code:1]type chsh -s /bin/bash[/code:1]不就行了?
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

GMT+8, 2025-2-13 10:01 , Processed in 0.032009 second(s), 16 queries .

© 2001-2025 Discuz! Team. Powered by Discuz! X3.5.

快速回复 返回顶部 返回列表