From 0d8987ff6bf0fea27f2611432a911292e849b97a Mon Sep 17 00:00:00 2001 From: jbranchaud Date: Tue, 1 Dec 2015 21:00:04 -0600 Subject: [PATCH] Add Change Default Shell For A User as a unix til. --- README.md | 1 + unix/change-default-shell-for-a-user.md | 15 +++++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 unix/change-default-shell-for-a-user.md diff --git a/README.md b/README.md index b599008..9f4f78c 100644 --- a/README.md +++ b/README.md @@ -221,6 +221,7 @@ smart people at [Hashrocket](http://hashrocket.com/). - [All The Environment Variables](unix/all-the-environment-variables.md) - [Cat A File With Line Numbers](unix/cat-a-file-with-line-numbers.md) +- [Change Default Shell For A User](unix/change-default-shell-for-a-user.md) - [Check If A Port Is In Use](unix/check-if-a-port-is-in-use.md) - [Clear The Screen](unix/clear-the-screen.md) - [Create A File Descriptor with Process Substitution](unix/create-a-file-descriptor-with-process-substitution.md) diff --git a/unix/change-default-shell-for-a-user.md b/unix/change-default-shell-for-a-user.md new file mode 100644 index 0000000..688a603 --- /dev/null +++ b/unix/change-default-shell-for-a-user.md @@ -0,0 +1,15 @@ +# Change Default Shell For A User + +You can change the default shell program for a particular unix user with the +`chsh` command. Just tell it what shell program you want to use (e.g. `bash` +or `zsh`) and which user the change is for: + +``` +$ [sudo] chsh -s /usr/bin/zsh username +``` + +This command needs to be invoked with root privileges. + +This command updates the entry for that user in the `/etc/passwd` file. + +[source](http://superuser.com/questions/46748/how-do-i-make-bash-my-default-shell-on-ubuntu)