alias
make alias for commands.
alias
display all alias
alias lb='ll -h'
make the change permanent:
- append alias to ~/.bashrc
-
. ~/.bashrc
orsource ~/.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.