小编lis*_*sak的帖子

子shell/子进程中的别名

我在 /etc/profile.d/alias.sh 中为每个登录 shell 设置了别名。但是如果我运行 script.sh,我就不能使用那个别名。如何为子shell或子进程设置别名?

/etc/profile.d/alias.sh

alias rmvr='rm -rv';
alias cprv='cp -rv';
alias mvrv='mv -rv';
Run Code Online (Sandbox Code Playgroud)

linux shell alias

22
推荐指数
3
解决办法
2万
查看次数

标签 统计

alias ×1

linux ×1

shell ×1