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

后端 未结 6 1120
野性不改
野性不改 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:14

    According to Apple,

    zsh (Z shell) is the default shell for all newly created user accounts, starting with macOS Catalina.

    So you should verify your default shell with the command:

    $ echo $SHELL
    

    If the result is /bin/bash your default shell is BASH, and if the result is /bin/zsh the default is ZSH.

    Go to home with $ cd ~/ and create the profile (if it does not exist) and edit it with the commands:

    For bash:

    $ touch .bash_profile
    $ open .bash_profile
    

    For ZSH:

    $ touch .zprofile
    $ open .zprofile
    

提交回复
热议问题