Inside:
  Menu:
      Home
      FAQ
      Wishlist
      Photography
      UNIX Stuff
      PF Project
      Validate Me
      Contact Me
  Archived:
      11 May `04
      17 April `04
      5 April `04
      19 Mar `04
      3 Mar `04
      6 Feb `04
      14 Jan `04
      24 Dec `03
      15 Nov `03
      2 Nov `03
      20 October `03
      12 October `03
      4 October `03
      25 Sept `03
      14 Sept `03
      7 Sept `03
      31 August `03
      18 August `03
      6 August `03
      3 August `03
      31 July `03
      25 July `03
      20 July `03
Changing Shells on UNIX
Ever wanted to change your default login shell in unix/linux? Its quite easy to do, first you have to find the full path to the shell that you want to use (the command 'cat /etc/shells' lists the available shells and thier full paths), on my openbsd system I wanted to change to bash so the first thing I had to do was install bash.

I changed to the /usr/ports/shells/bash2 directory and typed make && make install (as root of course). Then sit back and watch the text scroll across the screen (well I didnt do this part :p).

Once this is done you need to locate the full path of bash - you can do this in two ways 1) type 'whereis bash' 2) type 'find /usr -name bash' - me being from the old school used the second option. The output was /usr/local/bin/bash. When you have done that type the following 'printf "/usr/local/bin/bash\n" >> /etc/shells' without the ' ' this adds the path to the bash shell to the shells file (make sure you do this as root).

Next we get to explore the chsh command, as root type 'chsh -s /usr/local/bin/bash dave' which changes your environmental variable for your default shell. You wont have to type dave (that is unless your username is dave :p), replace dave with your username.

Log out and when you log back in as that user you will be using a new shell - you can always use the env command to check your environmental variables type env | grep SHELL for an output of the shell that your using.

Thats it, your shell is changed!