bash: ~/.bash_profile: No such file or directory

前端 未结 4 1967
南旧
南旧 2021-02-20 11:27

I keep getting this error:

bash: ~/.bash_profile: No such file or directory

Here is my bash_profile:

alias ngrok=/Users/mmahalw         


        
4条回答
  •  粉色の甜心
    2021-02-20 12:13

    Bash has ~/.profile instead of ~/.bash_profile

    Content of ~/.profile :

    # ~/.profile: executed by the command interpreter for login shells.
    # This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login
    # exists.
    # see /usr/share/doc/bash/examples/startup-files for examples.
    # the files are located in the bash-doc package.
    
    # the default umask is set in /etc/profile; for setting the umask
    # for ssh logins, install and configure the libpam-umask package.
    #umask 022
    
    # if running bash
    if [ -n "$BASH_VERSION" ]; then
        # include .bashrc if it exists
        if [ -f "$HOME/.bashrc" ]; then
        . "$HOME/.bashrc"
        fi
    fi
    
    # set PATH so it includes user's private bin if it exists
    if [ -d "$HOME/bin" ] ; then
        PATH="$HOME/bin:$PATH"
    fi
    

提交回复
热议问题