指令名稱 |
chsh |
| 使用權限 |
|
| 使用方式 |
chsh [-s (shell名稱)] [-l][-u][-v] [ (使用者名稱/username)] |
| 說 明 |
登入Linux系統時,改變使用的shell類型 |
|
補充說明 |
每位使用者在登入系統時,其shell的環境是預設的,chsh可改變原本的預設值。若沒有指定參數或使用者名稱,chsh將會提示。 |
|
參 數 |
-s 詳述shell名稱/login shell
-l 列出/etc/shells檔案內的shell可用的名單並且離開
-u/-help 顯示線上說明並且離開
-v/version 顯示版本資訊並且離開 |
| 範 例 |
chsh 按enter[不加參數及使用者名稱]
Changing shell for root
New shell [/bin/bash] : /bin/****[輸入欲使用的shell]
Shell changed
Chsh -s /bin/bash root[加入參數]
Changing shell for root
Shell changed |