How to make OS X to read .bash_profile not .profile file

后端 未结 6 1116
野性不改
野性不改 2020-12-02 06:53

I have read so many suggestions about, not putting your customization aka commands in \".profile\" file. Rather, create a .bash_profile for yourself and add your alias and e

6条回答
  •  栀梦
    栀梦 (楼主)
    2020-12-02 07:15

    It's also possible that your terminal shell is defaulting to sh instead of bash. You can verify this first:

    $ echo $SHELL
    /bin/tcsh
    

    To change this to bash, you can go into your Terminal -> Preferences -> Startup tab, and change "Shell Opens With:" from "Default login shell" to Command and value "/bin/bash".

    Alternately, you can change your default shell by executing the following command at the command prompt:

    chsh -s bin/bash
    

    After you do one of these, open a new shell window, and your .bash_profile should be sourced.

提交回复
热议问题