小编mus*_*fiq的帖子

为什么我需要运行 source 命令才能使 .bash_profile 别名可用?

.bash_profile的如下:

alias l='ls -l'
alias p='pwd'
alias sites='cd /home/caveman/sites'
alias time_card='cd /home/caveman/sites/time-card/time-card'
alias ping='ping google.com'
alias bash_profile='gedit /home/caveman/.bash_profile'
alias webroot='cd /var/www'
Run Code Online (Sandbox Code Playgroud)

每次登录我的机器时,我都需要运行source .bash_profile以使所有别名可用。

各位大侠能看出问题出在哪里吗?

command-line bash

4
推荐指数
1
解决办法
1万
查看次数

标签 统计

bash ×1

command-line ×1