1.打開隱藏文件.bash_profilevim
vim .bash_profile
2.添加命令到 .bash_profile文件裏面bash
alias ll='ls -l'
3.驗證:spa
CNhfguan:~ hfguan$ ll total 0 drwx------@ 3 hfguan staff 102 Mar 5 13:46 Applications drwx------ 6 hfguan staff 204 Mar 8 15:55 Desktop drwx------ 7 hfguan staff 238 Mar 8 18:07 Documents drwx------ 27 hfguan staff 918 Mar 8 14:18 Downloads drwx------@ 59 hfguan staff 2006 Mar 8 15:51 Library drwx------ 3 hfguan staff 102 Mar 2 10:57 Movies drwx------ 3 hfguan staff 102 Mar 2 10:57 Music drwx------ 3 hfguan staff 102 Mar 2 10:57 Pictures drwxr-xr-x 4 hfguan staff 136 Mar 2 10:57 Public drwxr-xr-x 4 hfguan staff 136 Mar 9 14:49 Study drwxr-xr-x 5 hfguan staff 170 Mar 6 15:52 workspace CNhfguan:~ hfguan$