歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> 關於Linux >> linux suse如何查看和修改shell

linux suse如何查看和修改shell

日期:2017/3/3 16:00:27   编辑:關於Linux

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

Copyright © Linux教程網 All Rights Reserved