Linux & change username & computer name
ubuntu change username and computer name
https://askubuntu.com/questions/817452/i-need-to-change-terminal-name
solution
https://www.ostechnix.com/hide-modify-usernamelocalhost-part-terminal/
# backup
$ cp ~/.bashrc ~/.bashrc.bak
~/.bashrc
/home/xgqfrms
$ cd ~/.
$ pwd
$ cat .bashrc
$ sudo vim .bashrc
# i
# Esc :wq

OK


computer name
https://askubuntu.com/questions/9540/how-do-i-change-the-computer-name

$ pwd
$ ls -al
$ whoami
$ cd ~/
$ cat hostname
$ vim hostname
# i
# Esc :wq
# Esc :wq!
# Esc :wqa!
# Esc :qa!
change username
https://askubuntu.com/questions/34074/how-do-i-change-my-username
$
.bashrc & rename hostname & rename username
$ pwd
$ cd ~
$ pwd
$ cat .bashrc
$ vim .bashrc
# sudo vim .bashrc
# i
# ESC + :wq!


macOS

todo...
xgqfrms@mbp2019
macOS terminal change hostname
https://www.howtogeek.com/tips/how-to-change-your-computer-name-on-mac-os-x/
- sharing

sudo scutil --set HostName [NewHostNameHere]
OK

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
©xgqfrms 2012-2020
www.cnblogs.com 發布文章使用:只允許注冊用戶才可以訪問!

