Linux & change username & computer name & .bashrc


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/

  1. sharing

  1. 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


Flag Counter

&copyxgqfrms 2012-2020

www.cnblogs.com 發布文章使用:只允許注冊用戶才可以訪問!



免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2026 CODEPRJ.COM