Home > linux, ubuntu > Change default shell in ubuntu

Change default shell in ubuntu

After creating an account using command line in Ubuntu 11.10, the default shell for that user is /bin/sh:

$ sudo useradd -d /home/new_user -m new_user

To change the default shell, you have two ways:

1. Change the entry in /etc/passwd: the last field is the default shell, just change it to /bin/bash

$ sudo grep new_user /etc/passwd
new_user:x:1001:1001:new_user:/home/new_user:/bin/sh

2. Use the change shell command (chsh), you’ll be prompted for your password, and then type the new shell (/bin/bash):

$ chsh

Enter the new value, or press ENTER for the default
Login Shell [/bin/sh]:
Advertisements
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: