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. Service Locator Pattern 服务定位

    https://www.geeksforgeeks.org/service-locator-pattern/ Service Locator Pattern Last Updated: 06-03-2 ...

  2. ProbabilityStatistics

    class ProbabilityStatistics: @staticmethoddef simulation_of_probability(v, ratio=10000): assert v &g ...

  3. php中两个函数可能导致的sql注入

    sprintf https://www.php.net/manual/zh/function.sprintf.php 漏洞demo: <?php $name = addslashes($_GET ...

  4. JVM虚拟机Class类文件研究分析

    前言 为了研究Class文件,先编写一个最简单的代码: package com.courage; public class T0100_ByteCode01 { } 之所以说最简单,是因为这个类里面任 ...

  5. Spring Boot 整合 Freemarker

    Spring Boot 整合 Freemarker 1.Freemarker 简介 2.Spring Boot 整合 Freemarker 2.1 创建工程 2.2 创建类 2.3 其他配置 原文地址 ...

  6. servelet 实现Post接口访问

    先上代码: package com.jovtec.galaxy.mailbox; import java.io.BufferedReader; import java.io.IOException; ...

  7. Spring boot 异步线程池

    package com.loan.msg.config; import org.springframework.aop.interceptor.AsyncUncaughtExceptionHandle ...

  8. linux系统资源限制———ulimit命令

    简介 Linux ulimit命令用于控制shell程序的资源. ulimit为shell内建指令,可用来控制shell执行程序的资源 推荐:https://blog.csdn.net/skiwnc/ ...

  9. postgres-网络传输安全-openssl

    网络传输安全 默认情况下pg服务端和客户端之间的数据传输是明文传输,有一定的安全隐患.pg中可以使用ssl进行安全的tcp/ip连接,以密文的形式进行数据的安全传输. 这个特性要求在客户端和服务器都安 ...

  10. 狂神说SpringBoot11:Thymeleaf模板引擎

    狂神说SpringBoot系列连载课程,通俗易懂,基于SpringBoot2.2.5版本,欢迎各位狂粉转发关注学习. 微信公众号:狂神说(首发)    Bilibili:狂神说Java(视频) 未经作 ...