加入收藏 | 设为首页 | 会员中心 | 我要投稿 佛山站长网 (https://www.0757zz.com/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 服务器 > 搭建环境 > Linux > 正文

linux suse如何查看和修改shell

发布时间:2016-10-26 12:23:27 所属栏目:Linux 来源:网络整理
导读:linux里有很多种shell,例如ksh,bash,csh等等 当前用户使用的是哪种shell,我们可以在/etc/passwd里面查看 linux-37:/ # cat /etc/passwd |grep -i smsweb1 --s

linux里有很多种shell,例如ksh,bash,csh等等

当前用户使用的是哪种shell,我们可以在/etc/passwd里面查看

linux-37:/ # cat /etc/passwd |grep -i smsweb1     --smsweb1为你要查看的用户名

smsweb1:x:111:201::/home/smsweb1:/bin/bash

可以看出smsweb1用户默认的是bash。

修改的话,我们可以使用chsh命令

smsweb1@linux-37:~> chsh

Changing login shell for smsweb1.

口令:

Enter the new value, or press return for the default.

Login Shell [/bin/bash]: /bin/ksh

Shell changed.

--查看可用的shell

smsweb1@linux-37:~> chsh -l

本文URL:http://www.bianceng.cn/OS/Linux/201410/45604.htm

/bin/ash

/bin/bash

/bin/bash1

/bin/csh

/bin/false

/bin/ksh

/bin/sh

/bin/tcsh

/bin/true

/bin/zsh

/usr/bin/csh

/usr/bin/ksh

/usr/bin/passwd

/usr/bin/bash

/usr/bin/rbash

/usr/bin/tcsh

/usr/bin/zsh

本文出自 “richard的笔记-积微成著” 博客,请务必保留此出处http://zxf261.blog.51cto.com/701797/735650

(编辑:佛山站长网)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    热点阅读