command alias and source

2019-07-11  本文已影响0人  solk1234

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.

上一篇 下一篇

猜你喜欢

热点阅读