$ ll
-bash: ll: command not found
沒有ll這個命令。盡管也知道ll事實上 是ls -l 這個命令的別名,可是總感覺不是非常習慣。由於之前一直用centos的。
假設想讓debian也支持 ll 命令的話則須要改動用戶文件夾以下的.bashrc 配置文件
cd #進入當前用戶文件夾
vim .bashrc #使用vim 編輯.bashrc配置文件
我們找到這樣幾行
# You may uncomment the following lines if you want `ls' to be colorized:
# export LS_OPTIONS='--color=auto'
# eval "`dircolors`"
# alias ls='ls $LS_OPTIONS'
# alias ll='ls $LS_OPTIONS -l'
# alias l='ls $LS_OPTIONS -lA'
我們之間把alias ll=’ls $LS_OPTIONS -l’前面的#號去掉,例如以下
# You may uncomment the following lines if you want `ls' to be colorized:
export LS_OPTIONS='--color=auto'
# eval "`dircolors`"
# alias ls='ls $LS_OPTIONS'
alias ll='ls $LS_OPTIONS -l'
alias l='ls $LS_OPTIONS -lA'
然后保存退出
還有個辦法就是
# cd
# echo "alias ll='ls -l'" >> ~/.bashrc && source ~/.bashrc
事實上意思都是同樣的。
都是 編輯了.bashrc 配置文件,
僅僅只是第二個方法是輸出命令到.bashrc的。