/home/my-pc/.bashrc:16: command not found: shopt
/home/my-pc/.bashrc:24: command not found: shopt
/home/my-pc/.bashrc:111: command not found: shopt
/usr/share/bash-completion/bash_completion:51: command not found: shopt
/usr/share/bash-completion/bash_completion:57: command not found: complete
/usr/share/bash-completion/bash_completion:62: command not found: complete
/usr/share/bash-completion/bash_completion:65: command not found: complete
/usr/share/bash-completion/bash_completion:68: command not found: complete
/usr/share/bash-completion/bash_completion:71: command not found: complete
/usr/share/bash-completion/bash_completion:74: command not found: complete
/usr/share/bash-completion/bash_completion:77: command not found: complete
/usr/share/bash-completion/bash_completion:80: command not found: complete
/usr/share/bash-completion/bash_completion:83: command not found: complete
/usr/share/bash-completion/bash_completion:86: command not found: complete
/usr/share/bash-completion/bash_completion:89: command not found: complete
/usr/share/bash-completion/bash_completion:92: command not found: complete
/usr/share/bash-completion/bash_completion:314: parse error near `\n'
\[\e]0;\u@\h: \w\a\]\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]$
Dies ist die Ausgabe
Antwort1
Dies liegt daran, dass die Standard-Shell von Linux auf zsh eingestellt ist. Um dies zu ändern, können wir den folgenden Befehl verwenden:
chsh -s /bin/bash
und geben Sie dann Ihre Bash-Datei als Quelle ein, um die darin vorhandenen Pfade zu exportieren:
source ~/.bashrc
Antwort2
Wenn Ihre Shell zsh ist, nehmen Sie Ihre Änderungen in ~/.zshrc
statt in .bashrc vor.
Wenn Sie fertig sind, speichern Sie die Datei mit :wq
(vorausgesetzt, Sie verwenden vim) und führen Sie diesen Befehl aus:
source ~/.zshrc
Denken Sie daran, alle an .bashrc vorgenommenen Änderungen zu entfernen, damit die Datei nicht zweimal ausgeführt wird.