让debian支持ll命令

7666阅读
0评论
0点赞

$ 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的。

评论(0)
暂无评论