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. CentOS安装mysql、JDK、Tomcat部署环境

    1.1. 安装mysql-5.6 1.1.1. 检测系统内部有没有安装其他的mysql数据库 $ rpm -qa | grep mysql 1.1.2. 如果内部有需要先删除Mysql $ yum r ...

  2. High Performance Networking in Google Chrome 进程间通讯(IPC) 多进程资源加载

    小结: 1. 小文件存储于一个文件中: 在内部,磁盘缓存(disk cache)实现了它自己的一组数据结构, 它们被存储在一个单独的缓存目录里.其中有索引文件(在浏览器启动时加载到内存中),数据文件( ...

  3. v-show和v-if指令的共同点和不同点?

    共同点:都能控制元素的显示和隐藏:不同点:实现本质方法不同,v-show本质就是通过控制css中的display设置为none,控制隐藏,只会编译一次:v-if是动态的向DOM树内添加或者删除DOM元 ...

  4. Spring Boot中的静态资源文件

    Spring Boot中的静态资源文件 1.SSM中的配置 2.Spring Boot 中的配置 2.1 整体规划 2.2 源码解读 2.3 自定义配置 2.3.1 application.prope ...

  5. Linux内存运维操作及常用命令

    Linux内存运维操作及常用命令 1.问题诊断 1.1 什么是 Linux 服务器 Load Average? 1.2如何查看 Linux 服务器负载? 1.3服务器负载高怎么办? 1.4如何查看服务 ...

  6. CVE-2018-4407(IOS缓冲区溢出漏洞)exp

    CVE-2018-4407为ios缓冲区溢出漏洞 exp: import scapyfrom scapy.all import * send(IP(dst="同一局域网内目标Ip" ...

  7. 【STM32】串口

    一. 串口中断使能问题 错误: 串口只能接收一次数据,从串口助手发第二个数据时接收不到. 分析: 在UART_Receive_IT(huart)函数里,回调函数的上面有如下代码: 这几行代码的作用是关 ...

  8. Java多线程操作同一份资源

    现在两个线程,可以操作初始值为零的一个变量,实现一个线程对该变量加1,一个线程对该变量减1,实现交替,来10轮,变量初始值为零. package com.yangyuanyuan.juc1205; i ...

  9. 【poj 1984】&【bzoj 3362】Navigation Nightmare(图论--带权并查集)

    题意:平面上给出N个点,知道M个关于点X在点Y的正东/西/南/北方向的距离.问在刚给出一定关系之后其中2点的曼哈顿距离((x1,y1)与(x2,y2):l x1-x2 l+l y1-y2 l),未知则 ...

  10. HDU 1565 方格取数 状压dp

    题目: 给你一个n*n的格子的棋盘,每个格子里面有一个非负数. 从中取出若干个数,使得任意的两个数所在的格子没有公共边,就是说所取的数所在的2个格子不能相邻,并且取出的数的和最大. Input 包括多 ...