command alias and source

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.

©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

  • rljs by sennchi Timeline of History Part One The Cognitiv...
    sennchi阅读 12,183评论 0 10
  • pyspark.sql模块 模块上下文 Spark SQL和DataFrames的重要类: pyspark.sql...
    mpro阅读 13,222评论 0 13
  • **2014真题Directions:Read the following text. Choose the be...
    又是夜半惊坐起阅读 13,513评论 0 23
  • 2017年7月到2018年9月,这一年多的时间线上,自己的角色从消费者变成生产者,由学生成为工作人员。也是在不断的...
    梦行动物阅读 1,877评论 0 0
  • 今天去一刻talks听“不做自己的陌生人”专场的分享。本来是被主题吸引过去的,但5位嘉宾里貌似只有两位切了题。其中...
    午夜华尔兹阅读 1,612评论 0 0

友情链接更多精彩内容