3
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

Linuxでシェルの切り替え

Last updated at Posted at 2023-08-22

自分用に,シェルの切り替え方法をまとめます.
環境はUbuntu 22.04.3 LTSです.

  • シェルの一覧表示
$ cat /etc/shells
/bin/sh
/bin/bash
/usr/bin/bash
/bin/rbash
/usr/bin/rbash
/usr/bin/sh
/bin/dash
/usr/bin/dash
/usr/bin/tmux
/usr/bin/screen
  • 現在使用しているシェルを表示
$ echo $SHELL
/bin/bash ←bashが使用されている
  • シェルの切り替え
$ /bin/bash ←使いたいシェルを直接起動するだけ
  • ログイン時のシェルを変更
$ chsh
Password:
Changing the login shell for hoge
Enter the new value, or press ENTER for the default
        Login Shell [/bin/bash]: /bin/sh

参考

3
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?