centos7 alias別名永久生效


進入/etc/profile.d/目錄

 cd /etc/profile.d/

 

在profile.d目錄隨意創建一個sh文件,例如alias_test.sh

vi alias_test.sh

##里面的內容為
alias syscal='echo hellow world'

##按ESC,輸入:wq!保存

 

使文件生效

source alias_test.sh

 

輸入syscal,即可顯示出:hellow world。此方法是永久配置方法


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM