美文网首页
command alias and source

command alias and source

作者: solk1234 | 来源:发表于2019-07-11 00:06 被阅读0次

alias

make alias for commands.

alias display all alias
alias lb='ll -h'

make the change permanent:

  1. append alias to ~/.bashrc
  2. . ~/.bashrc or source ~/.bashrc

source

source is a bash builtin command, which executes commands in the file.

file1:
echo hello

source file1

display:
hello

. is a shortcut for source, which means . file1 is same as source file1.

Note that ./file1 will be executed in a new shell, while . file1 in the current shell.

相关文章

网友评论

      本文标题:command alias and source

      本文链接:https://www.haomeiwen.com/subject/aullkctx.html