How to change Linux Terminal display username

如何更改 Linux Terminal 显示的用户名

(base) ➜  ~ whoami
xgqfrms-mbp
(base) ➜ ~ pwd
/Users/xgqfrms-mbp
(base) ➜ ~

terminal change username base bug

after install Anaconda navigator, terminal change username bug

(conda)

Anaconda 水蟒

conda base bug

solution

https://conda.io/projects/conda/en/latest/user-guide/configuration/use-condarc.html#change-command-prompt-changeps1

vscode

(base) ➜  ~ code .zshrc 


# >>> conda initialize >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$('/Users/xgqfrms-mbp/opt/anaconda3/bin/conda' 'shell.zsh' 'hook' 2> /dev/null)"
if [ $? -eq 0 ]; then
eval "$__conda_setup"
else
if [ -f "/Users/xgqfrms-mbp/opt/anaconda3/etc/profile.d/conda.sh" ]; then
. "/Users/xgqfrms-mbp/opt/anaconda3/etc/profile.d/conda.sh"
else
export PATH="/Users/xgqfrms-mbp/opt/anaconda3/bin:$PATH"
fi
fi
unset __conda_setup
# <<< conda initialize <<<

(base) ➜  ~ code .zshrc
(base) ➜ ~ conda deactivate
(/Users/xgqfrms-mbp/anaconda3) ➜ ~ code ~/.condarc
ssl_verify: true
channels:
- defaults

ssl_verify: true
channels:
- defaults
changeps1: False

OK

refs

https://www.jianshu.com/p/6cdc9713c4ed

https://linux.cn/article-9192-1.html

https://www.cnblogs.com/tdcqma/p/6714492.html

https://www.jianshu.com/p/6ef9e8a4d789

https://cloud.tencent.com/developer/ask/50791

https://www.cnblogs.com/devilmaycry812839668/p/10349602.html

~/.bashrc & ~/.zshrc

问题的源头,那就是aconda自动加入了命令到 .bashrc中, 在我们打开终端的时候自动 执行了 conda activate base 命令

https://askubuntu.com/questions/1026383/why-does-base-appear-in-front-of-my-terminal-prompt

https://apple.stackexchange.com/questions/371727/how-do-i-remove-the-source-base-from-my-terminal

https://stackoverflow.com/questions/55171696/how-to-remove-base-from-terminal-prompt-after-updating-conda

Linux $PS1

PS1 (Prompt String 1)

$ echo $PS1

https://www.cyberciti.biz/tips/howto-linux-unix-bash-shell-setup-prompt.html

https://www.linuxnix.com/linuxunix-shell-ps1-prompt-explained-in-detail/

https://linuxconfig.org/bash-prompt-basics

PS1

https://zhuanlan.zhihu.com/p/140892886



xgqfrms 2012-2020

www.cnblogs.com 发布文章使用:只允许注册用户才可以访问!


How to change Linux Terminal display username的更多相关文章

  1. Linux & terminal color & command line color

    Linux & terminal color & command line color how to change Linux terminal color https://askub ...

  2. MAC && Linux terminal session clone

    MAC && Linux terminal session clone 背景 本人使用的是mac,terminal配置的是iterm2,相信许多公司和我司一样登录dev/beta/pr ...

  3. Linux Terminal命令

    Linux Terminal命令 1.Ctrl + a 回到命令行の「行首/head」. 2.Ctrl + e 回到命令行の「行尾/tail」, ctrl + end. 3.Ctrl + w 後向/b ...

  4. Linux Terminal Games

    linux Terminal Games install note:sudo apt install, or sudo apt-get install 2048 // download c src # ...

  5. [转]linux terminal中使用proxy

    转自:http://www.cnblogs.com/JoJosBizarreAdventure/p/5892383.html 在linux terminal中使用代理 方法一: terminal中输入 ...

  6. windows下使用linux terminal

    windows下使用linux terminal 1.下载安装包 2.安装 3.解决乱码 0.前言 其实,写这个的目的是怕自己忘了,方便以后配置和分享 1.下载安装包 安装包下载地址: http:// ...

  7. Setting proxy for Windows CMD and Linux Terminal

    setting proxy for Windows CMD and Linux Terminal Linux Terminal: set http_proxy=http://127.0.0.1:811 ...

  8. free online linux terminal & github cli online

    free online linux terminal & github cli online gitpod https://www.gitpod.io/features/ https://bc ...

  9. Linux Terminal fortune

    Linux下,我们能够使用apt-get安装fortune,这是一个比較有趣的功能 在输入fortune之后,Terminal会输出一句名言.诗句,或一些有趣的话: 默认情况下.fortune仅仅会显 ...

随机推荐

  1. jQuery 真伪数组的转换

    //真数组转换伪数组 var arr = [1,3,5,7,9]; var obj = {}; [].push.apply(obj,arr); console.log(obj) //伪数组转真数组 v ...

  2. 客户端必须在它发送到服务器的所有帧中添加掩码(Mask)

    在WebSocket协议中,数据是通过一系列数据帧来进行传输的.为了避免由于网络中介(例如一些拦截代理)或者一些在第10.3节讨论的安全原因,客户端必须在它发送到服务器的所有帧中添加掩码(Mask)( ...

  3. 线上nginx的一次“no live upstreams while connecting to upstream ”分析

    线上nginx的一次"no live upstreams while connecting to upstream "分析 线上nginx的一次"no live upst ...

  4. pycharm设置头文件模板(for mac)

    我们要达到的效果是每次新建一个.py文件都会有头文件,关于头文件的作用之前已做解释

  5. LOJ10160周年纪念晚会

    题目描述 Ural 州立大学的校长正在筹备学校的 80 周年纪念聚会.由于学校的职员有不同的职务级别,可以构成一棵以校长为根的人事关系树.每个资源都有一个唯一的整数编号,从 1 到 N 编号,且对应一 ...

  6. Jenkins(6)测试报告邮件发送

    前言 前面已经实现在jenkins上展示html的测试报告,接下来只差最后一步,把报告发给你的领导,展示你的劳动成果了. 安装 Email Extension Plugin 插件 jenkins首页- ...

  7. var_dump和var_export区别

    1.var_dump() :获取结构化的数据,按照数组的层级输出 2.var_export() :获取结构化的数据,返回有效的php代码,保留结构化形式的存储数据,数据类型为字符串. 例如: < ...

  8. ElasticSearch结合Logstash(三)

    一.Logstash简介 1,什么是Logstash Logstash 是开源的服务器端数据处理管道,能够同时从多个来源采集数据,转换数据,然后将数据发送到您最喜欢的"存储库"中. ...

  9. VScode 连接虚拟机

    VScode 连接虚拟机 在VScode上面使用SSH连接虚拟机,编写代码以及运行都将会方便许多 打开VScode,安装Remote-SSH插件 配置SSH连接信息 点击左侧第四个图标,然后单击设置按 ...

  10. [HDU4734] 不要62(数位dp入门)

    >传送门< 题意:统计区间 [a,b] 中不含 4 和 62 的数字有多少个. 思路:数位dp 就是数位上不能有4也不能有连续的62,没有4的话在枚举的时候判断一下,不枚举4就可以保证状态 ...