Linux修改.bashrc
来源:互联网 发布:航悦淘宝直播怎么回事 编辑:程序博客网 时间:2024/06/16 07:46
.bashrc文件在/home/用户名/.bashrc里,
利用.bashrc文件,可以修改PS1。
PS1则是用来控制命令行窗口前面那一段显示的字符。
这是我的PS1设置:
export PS1="[\u@\h \W]\$ "
查看PS1:
echo PS1
我PS1在命令行显示效果:
[zhichao@localhost /]$ [zhichao@localhost home]$
下面是命令行变量和对应涵义的列表:
\a The 'bell' character (“铃声”符号)\A 24h Time (24小时制时间)\d Date (e.g. Tue Dec 21) (日期)\e The 'escape' charakter (“Esc”符号)\h Hostname (up to the first ".") (主机名称,写到第一个“.”)\H Hostname (主机名称)\j No. of jobs currently running (ps) (目前正在跑的进程的数目)\l Current tty (当前的tty)\n Line feed (换行符)\t Time (hh:mm:ss) (时间格式)\T Time (hh:mm:ss, 12h format) (时间,12小时格式)\r Carriage return (回车符)\s Shell (i.e. bash, zsh, ksh..)\u Username (用户名称)\v Bash version (Bash版本)\V Full Bash release string (完整的Bash发行号)\w Current working directory (当前工作目录)\W Last part of the current working directory (当前工作目录的最后一部分)\! Current index in history (以往的当前下标)\# Command index (命令行下标)\$ A "#" if you're root, else "$" (root身份登陆的时候是“#”,其他身份登陆都是“$”)\\ Literal Backslash (取字面意思的反斜杠)\@ Time (12h format with am/pm) (时间,用am/pm的12小时制)
0 0
- Linux修改.bashrc
- linux .bashrc文件修改和生效
- linux下修改环境变量文件.bashrc
- linux下.bashrc文件修改和生效
- .bashrc 修改
- linux下.bashrc文件 /PATH环境变量修改 /提示符修改
- linux下.bashrc文件 /PATH环境变量修改 /提示符修改
- linux下.bashrc文件 /PATH环境变量修改 /提示符修改
- linux下.bashrc文件 /PATH环境变量修改 /提示符修改
- Linux bashrc
- linux bashrc
- linux 修改完设置文件立即生效的方法 . ~/.bashrc
- linux终端 提示信息 格式 修改 /etc/bashrc
- ubuntu ~/.bashrc 常用修改
- 修改.bashrc文件
- 每次修改.bashrc后,使用source ~/.bashrc
- Linux /etc/profile,~/.bash_profile,~/.bashrc,/etc/bashrc
- Linux环境.bashrc设置
- JAVA基础(3) -- 线程常用方法
- ToStringBuilder学习
- echarts图表制作
- leetcode (20) - Valid Parentheses
- 如何将Tomcat弄成本地服务,使他启动不出现DOS界面
- Linux修改.bashrc
- 文件上传,下载和邮件
- 提高android studio 编译速度 实用方法
- 项目型IT公司向产品型IT公司演进的必要性
- OpenStack Kilo 版本中 Neutron 的变化
- extjs的Ext.button.Button介绍(按钮的事件有哪些)。
- HDU-1532 Drainage Ditches (最大流E-K算法)
- 维护篇(5.2)-02. 服务激活 ❀ 飞塔 (Fortinet) 防火墙
- 一次淘宝购买MacBook Pro的经历,让我明白在正规渠道购买电子产品多么重要