Takuya71 のぶろぐ

外資系ソフトウェア会社で働いてます、認定スクラムマスター

Fedora 16 シェルを zsh に変更

シェルに bash を指定していましたが、
mac で使っている zsh に変更します。

manでshellについて検索すると

$ man -k shell

bash (1) - GNU Bourne-Again SHell
capsh (1) - capability shell wrapper
chroot (1) - run command or interactive shell with special root directory
chsh (1) - change your login shell
dash (1) - command interpreter (shell)
dbus-launch (1) - Utility to start a message bus from a shell script
envsubst (1) - substitutes environment variables in shell format strings
flock (1) - manage locks from shell scripts
git-mergetool--lib (1) - Common git merge tool shell scriptlets
git-sh-i18n (1) - Git's i18n setup code for shell scripts
git-sh-setup (1) - Common git shell script setup code
git-shell (1) - Restricted login shell for Git-only SSH access
gnome-shell (1) - Graphical shell for the GNOME desktop
jrunscript (1) - command line script shell
jrunscript-java-1.6.0-openjdk (1) - command line script shell
lchsh (1) - Change login shell
logger (1) - a shell command interface to the syslog(3) system log module
omshell (1) - OMAPI Command Shell
pam_shells (8) - PAM module to check for valid login shell
platform::shell (n) - System identification support code and utilities
pppoe-connect (8) - Shell script to manage a PPPoE link
pppoe-setup (8) - Shell script to configure Roaring Penguin PPPoE client
pppoe-start (8) - Shell script to bring up a PPPoE link
pppoe-status (8) - Shell script to report on status of PPPoE link
pppoe-stop (8) - Shell script to shut down a PPPoE link
runuser (1) - run a shell with substitute user and group IDs
selinuxenabled (8) - tool to be used within shell scripts to determine if selinux is enabled
sh (1) - GNU Bourne-Again SHell
Shell (3pm) - run shell commands transparently within perl
smrsh (8) - restricted shell for sendmail
su (1) - run a shell with substitute user and group IDs
sushell (8) - execute the single-user shell
sys-unconfig (8) - shell script to reconfigure the system upon next boot
tclsh (1) - Simple shell containing Tcl interpreter
which (1) - shows the full path of (shell) commands.
whiptail (1) - display dialog boxes from shell scripts
yum-shell (8) - Yellowdog Updater Modified shell
zsh (1) - the Z shell
zshall (1) - the Z shell meta-man page

chshというコマンドがあり、
このコマンドでシェルが変更できます。

登録されているshellの一覧は?
-l オプション で一覧表示されます。

$ chsh -l

/sbin/nologin
/bin/dash
/bin/zsh
/usr/bin/tmux

zshも登録されています。

では変更してみます。

$ chsh -s /bin/zsh
chsh: chsh: your shell is not in /etc/shells, shell change denied: 許可がありません

あれ? 登録出来ません。

ユーザ名の指定を忘れていました。
chsh -s シェルのパス ユーザ
と指定でした。

$ chsh -s /bin/zsh user1
user1 のシェルを変更します。
パスワード:
シェルを変更しました。

再ログインすると、shellが zshに変更されています。