linux 添加自动命令
发表于:2021-12-30浏览:36次
打开文件 .bashrc 文件
vim .bashrc
添加代码
alias cdo='cd /www/wwwroot/online-contract-server' alias cdhq='cd /www/wwwroot/hq.zhitusoft.cn'
增加linux 命令行颜色, 删除 #号
# export LS_OPTIONS='--color=auto' # eval "`dircolors`" # alias ls='ls $LS_OPTIONS' # alias ll='ls $LS_OPTIONS -l' # alias l='ls $LS_OPTIONS -lA'
结果为
export LS_OPTIONS='--color=auto' eval "`dircolors`" alias ls='ls $LS_OPTIONS' alias ll='ls $LS_OPTIONS -l' alias l='ls $LS_OPTIONS -lA'
修改完成后,运行如下命令使其生效
source .bashrc
