shell を切り替える

2021/07/14

bash 以外にも zsh を触っておいた方が良いかなと思ってて
なかなか重い腰を上げられていないが、切替方法をメモしておく

shell の一覧

$ 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/ksh
/bin/sh
/bin/tcsh
/bin/zsh

zsh に切り替える

$ /bin/zsh

永続的に切り替える

$ chsh -s /bin/zsh
% printenv SHELL
/bin/zsh

戻す時も chsh で変更する

$ chsh -s /bin/bash

Profile picture

Written by @honyanya web developer.
Twitter

© 2022. @honyanya