跳至内容
文档中心
用户工具
Login with Keycloak
站点工具
搜索
工具
显示页面
修订记录
反向链接
最近更改
媒体管理器
网站地图
Login with Keycloak
>
最近更改
媒体管理器
网站地图
您在这里:
index
»
jaysnote
»
bashrc
jaysnote:bashrc
本页面只读。您可以查看源文件,但不能更改它。如果您觉得这是系统错误,请联系管理员。
<markdown> # bashrc notes bash 登录会使用`/etc/profile`和`~/.bashrc`,视情况将如下的值保存在对应文件,使之生效。 * man 高亮 ```bash export LESS_TERMCAP_mb=$'\E[01;32m' export LESS_TERMCAP_md=$'\E[01;31m' export LESS_TERMCAP_me=$'\E[0m' export LESS_TERMCAP_se=$'\E[0m' export LESS_TERMCAP_so=$'\E[01;44;33m' export LESS_TERMCAP_ue=$'\E[0m' export LESS_TERMCAP_us=$'\E[04;32m' ``` * 支持中文 ```bash export LANG="en_US.UTF-8" export LANGUAGE="en_US:en" ``` * root 账户登录警告 ```bash echo -e "" echo -e "\e[1;31;4m -------- root warning ---------" echo -e "" echo -e " DO NOT LOGIN USE ROOT ACCOUT!!!" echo -e "" echo -e " only run 'sudo' when necessary" echo -e "" echo -e "" echo -e "\e[1;31m -------- root warning ---------" echo -e "\e[0m" PS1='\[\e[01;31m\]\u@\h ROOT WARNING!!!! \[\e[33m\]\w\[\e[32m\]\$\[\e[0m\]' ``` * PS1 ```bash PS1='\[\e[01;31m\]\u@\h\[\e[33m\]\w\[\e[32m\]\$\[\e[0m\]' #\u 用户名、\h机器名 ``` * 设置 terminal tab 标题 ```bash function set-title() { if [[ -z "$ORIG" ]]; then ORIG=$PS1 fi TITLE="\[\e]2;$*\a\]" PS1=${ORIG}${TITLE} } ``` </markdown>
jaysnote/bashrc.txt
· 最后更改: 2021/06/22 23:14 (外部编辑)
页面工具
显示页面
修订记录
反向链接
回到顶部
LECONIOT
Toggle navigation
文档
博客