I am trying to follow this explanation of how to make an alias and made the following .bashrc file in my home directory. Here it is:
# .bashrc
# User specific aliases and functions
alias py='python3'
alias pip='pip3'
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
PATH=$PATH:/home/username/bin:/usr/local/homebrew
export PATH
I restarted my shell and ran "py" and got a "command not found" error. What am I doing wrong? Thanks
I tried the following as well:
# .bashrc
# User specific aliases and functions
alias py='/usr/bin/python3'
alias pip='/usr/bin/pip3'
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
PATH=$PATH:/home/username/bin:/usr/local/homebrew
export PATH
as well as:
# .bashrc
# User specific aliases and functions
alias py='/usr/local/bin/python3'
alias pip='/usr/local/bin/pip3'
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
PATH=$PATH:/home/username/bin:/usr/local/homebrew
export PATH
Both of these also gave a "command not found" error.