How to change your default shell – Ubuntu

Posted by | Posted in Command-Line, Linux, Ubuntu | Posted on 17-07-2009

If I am not using OS X, then I normally use Ubuntu. On a normal install of Ubuntu, your default command-line shell is “/bin/sh” – command interpreter (shell). To me, a low powered command shell. I normally switch it from “/bin/sh” to “/bin/bash” or “/usr/bin/bash” depending on where bash is installed.

The easiest way to do this is to use the “chsh” command. chsh stands for “change login shell”


A typical change shell sequence looks something like this.

1) Find the current location of the shell you want to run. To to this, you use “which”.
2) Use the “chsh” program.
3) Enter your password.
4) Enter the new shell you want to use.

$ which bash
$ chsh    
Changing the login shell for USER
Enter the new value, or press ENTER for the default
	Login Shell [/bin/sh]: /bin/bash
$ exit

In-order to use your new shell, you have to logout and log back in.

Family Commands for chsh are

/usr/bin/chfn - change real user name and information
/etc/login.defs - shadow password suite configuration
/usr/bin/passwd - change user password

How to change your password – Ubuntu

Posted by | Posted in Command-Line, Linux, Ubuntu | Posted on 17-07-2009

Changing your password is something you should do on a monthly or weekly basis. This prevents anyone that has glanced over your shoulder while walking by from accessing your private information.

On a normal Linux computer, you can simply use the command “passwd” – change user password.

A typical Linux sequence looks like this

user@server:/$ passwd
Changing password for user.
(current) UNIX password: 
Enter new UNIX password: 
Retype new UNIX password: 
passwd: password updated successfully

Family Commands for passwd are

/etc/group - user group file - group
/usr/bin/passwd - change user password
/etc/passwd- encrypted password file - shadow

Join the mailing list

Check your email and confirm the subscription