首页 > 系统服务 > 详细

MacOS里面切换Shell

时间:2020-01-18 22:55:58      阅读:83      评论:0      收藏:0      [点我收藏+]

1、检查当前shell

myMacBook-Pro:/ zzz$ echo $SHELL
/bin/bash

其实终端窗口的标题栏上显示着当前shell的名字呢。

2、检查系统支持的所有shell

myMacBook-Pro:/ zzz$ cat /etc/shells
# List of acceptable shells for chpass(1).
# Ftpd will not allow users to connect who are not using
# one of these shells.

/bin/bash
/bin/csh
/bin/dash
/bin/ksh
/bin/sh
/bin/tcsh
/bin/zsh

3、切换到某个shell,如zsh

myMacBook-Pro:~ zzz$ chsh -s /bin/zsh
Changing shell for zzz
Password for zzz: ***

为了验证是否成功,需要退出当前终端,重新开启终端窗口,可以检查$SHELL的值已经改变

myMacBook-Pro:/ zzz$ echo $SHELL
/bin/zsh

 

EOF

MacOS里面切换Shell

原文:https://www.cnblogs.com/zjw0901/p/12210489.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!