我已经在root下的.bash_profile中创建了一堆别名,但那些不起作用。任何人都可以帮助我做错了
# .bash_profile
#shopt -s expand_aliases
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
export JAVA_HOME=/opt/app/java
PATH=$PATH:$HOME/bin:$JAVA_HOME/bin
export PATH
#Alias
alias jfiles="cd /opt/app/Projects"
alias jscripts='cd /opt/app/Config'
alias jmres='cd /opt/app/tomcat/jmresources'
alias llrt='ll -r -t'
答案 0 :(得分:0)
别名的正确位置应为。 bashrc 而非 .bash_profile 在.bashrc中添加别名后,启动一个新的登录会话或运行.bashrc文件,即 ./。bashrc