Child pages
  • How to change UNIX login shell for network AD accounts for the macOS lab machines

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

How to change your UNIX login shell from the default assigned Bourne (BASH) shell

Step-by-step guide

Open Terminal or establish a SSH session if performing this remotely: 

  1. Check and note your current login shell 

    Code Block
    echo $SHELL
    /bin/bash


  2. To change your shell, create a ~/.bash_profile in the root of your home directory with the following lines or if you already have a .bash_profile append it with the below entries.  This example is for zsh.

    Code Block
    export SHELL=/bin/zsh
    exec zsh

    List of other shell on macOS

    Code Block
    /bin/bash
    /bin/csh
    /bin/ksh
    /bin/sh
    /bin/tcsh
    /bin/zsh


  3. Check and note your new login shell by opening another terminal window or ssh session) and do another "echo $SHELL" this time you should get zsh instead.

    Code Block
    echo $SHELL
    /bin/zsh