Skip to content

Conversation

@oeasy1412
Copy link
Contributor

@oeasy1412 oeasy1412 commented Nov 30, 2025

  • 添加 PS1 环境变量,实现更美观的sh并且可以更好地定位之前键入的命令行的位置。(大量输出时尤为重要)
# user/sysconfig/etc/profile
# 设置 PS1 环境变量,定义彩色命令行提示符
# \e[32m 设置绿色,\e[34m 设置蓝色,\e[0m 重置颜色,不可见字符必须用 \[ ... \] 包裹
# \u 用户名,\h 主机名,\w 当前工作目录
export PS1='\[\e[32m\]\u\[\e[0m\]@\h:\[\e[34m\]\w\[\e[0m\]\$ '
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants