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.

?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請(qǐng)結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡(jiǎn)書(shū)系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

  • rljs by sennchi Timeline of History Part One The Cognitiv...
    sennchi閱讀 7,858評(píng)論 0 10
  • pyspark.sql模塊 模塊上下文 Spark SQL和DataFrames的重要類: pyspark.sql...
    mpro閱讀 9,920評(píng)論 0 13
  • **2014真題Directions:Read the following text. Choose the be...
    又是夜半驚坐起閱讀 11,143評(píng)論 0 23
  • 2017年7月到2018年9月,這一年多的時(shí)間線上,自己的角色從消費(fèi)者變成生產(chǎn)者,由學(xué)生成為工作人員。也是在不斷的...
    夢(mèng)行動(dòng)物閱讀 301評(píng)論 0 0
  • 今天去一刻talks聽(tīng)“不做自己的陌生人”專場(chǎng)的分享。本來(lái)是被主題吸引過(guò)去的,但5位嘉賓里貌似只有兩位切了題。其中...
    午夜華爾茲閱讀 257評(píng)論 0 0

友情鏈接更多精彩內(nèi)容