Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

.zshrc file issue on kali linux WSL 2

i am tring to install go on kali linux as WSL and i got error when i run this command

* **$source \~/.zshrc** \*

i have tried to run it with root also, and got the same error as below.

try to solve the issue with .zshrc file and successfully installing go lang on my kali linux WSL machine
Command 'setopt' not found, did you mean: command 'getopt' from deb util-linux command 'setop' from deb setop Try: sudo apt install <deb name> Command 'setopt' not found, did you mean: command 'getopt' from deb util-linux command 'setop' from deb setop Try: sudo apt install <deb name> Command 'setopt' not found, did you mean: command 'setop' from deb setop command 'getopt' from deb util-linux Try: sudo apt install <deb name> Command 'setopt' not found, did you mean: command 'setop' from deb setop command 'getopt' from deb util-linux Try: sudo apt install <deb name> Command 'setopt' not found, did you mean: command 'getopt' from deb util-linux command 'setop' from deb setop Try: sudo apt install <deb name> Command 'setopt' not found, did you mean: command 'setop' from deb setop command 'getopt' from deb util-linux Try: sudo apt install <deb name> Command 'setopt' not found, did you mean: command 'getopt' from deb util-linux command 'setop' from deb setop Try: sudo apt install <deb name> bindkey: command not found bindkey: command not found bindkey: command not found bindkey: command not found bindkey: command not found bindkey: command not found bindkey: command not found bindkey: command not found bindkey: command not found bindkey: command not found bindkey: command not found bindkey: command not found autoload: command not found compinit: command not found Command 'zstyle' not found, did you mean: command 'style' from deb diction command 'astyle' from deb astyle Try: sudo apt install <deb name> Command 'zstyle' not found, did you mean: command 'astyle' from deb astyle command 'style' from deb diction Try: sudo apt install <deb name> Command 'zstyle' not found, did you mean: command 'style' from deb diction command 'astyle' from deb astyle Try: sudo apt install <deb name> Command 'zstyle' not found, did you mean: command 'style' from deb diction command 'astyle' from deb astyle Try: sudo apt install <deb name> Command 'zstyle' not found, did you mean: command 'style' from deb diction command 'astyle' from deb astyle Try: sudo apt install <deb name> Command 'zstyle' not found, did you mean: command 'style' from deb diction command 'astyle' from deb astyle Try: sudo apt install <deb name> Command 'zstyle' not found, did you mean: command 'astyle' from deb astyle command 'style' from deb diction Try: sudo apt install <deb name> Command 'zstyle' not found, did you mean: command 'astyle' from deb astyle command 'style' from deb diction Try: sudo apt install <deb name> Command 'zstyle' not found, did you mean: command 'style' from deb diction command 'astyle' from deb astyle Try: sudo apt install <deb name> Command 'zstyle' not found, did you mean: command 'style' from deb diction command 'astyle' from deb astyle Try: sudo apt install <deb name> Command 'zstyle' not found, did you mean: command 'style' from deb diction command 'astyle' from deb astyle Try: sudo apt install <deb name> Command 'zstyle' not found, did you mean: command 'style' from deb diction command 'astyle' from deb astyle Try: sudo apt install <deb name> Command 'zstyle' not found, did you mean: command 'style' from deb diction command 'astyle' from deb astyle Try: sudo apt install <deb name> Command 'setopt' not found, did you mean: command 'setop' from deb setop command 'getopt' from deb util-linux Try: sudo apt install <deb name> Command 'setopt' not found, did you mean: command 'setop' from deb setop command 'getopt' from deb util-linux Try: sudo apt install <deb name> Command 'setopt' not found, did you mean: command 'setop' from deb setop command 'getopt' from deb util-linux Try: sudo apt install <deb name> Command 'setopt' not found, did you mean: command 'getopt' from deb util-linux command 'setop' from deb setop Try: sudo apt install <deb name> -bash: alias: -L: invalid option alias: usage: alias [-p] [name[=value] ... ] -bash: unalias: -m: invalid option unalias: usage: unalias [-a] name [name ...] -bash: 0=${(%):-%N}: bad substitution -bash: /.version: No such file or directory -bash: /.revision-hash: No such file or directory autoload: command not found is-at-least: command not found -bash: /usr/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh: line 143: syntax error near unexpected token always’
-bash: /usr/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh: line 143: } always {' -bash: ZSH_HIGHLIGHT_STYLES[bracket-level-2]: bad array subscript Command 'zle' not found, did you mean: command 'ale' from deb ale command 'zile' from deb zile command 'le' from deb le command 'gle' from deb gle-graphics command 'zl' from deb zenlisp command 'mle' from deb mle Try: sudo apt install <deb name> bindkey: command not found -bash: ${(s.:.)LS_COLORS}: bad substitution -bash: ! ${+ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE} : bad substitution -bash: ! ${+ZSH_AUTOSUGGEST_ORIGINAL_WIDGET_PREFIX} : bad substitution -bash: ! ${+ZSH_AUTOSUGGEST_STRATEGY} : bad substitution -bash: ! ${+ZSH_AUTOSUGGEST_CLEAR_WIDGETS} : bad substitution -bash: ! ${+ZSH_AUTOSUGGEST_ACCEPT_WIDGETS} : bad substitution -bash: ! ${+ZSH_AUTOSUGGEST_EXECUTE_WIDGETS} : bad substitution -bash: ! ${+ZSH_AUTOSUGGEST_PARTIAL_ACCEPT_WIDGETS} : bad substitution -bash: ! ${+ZSH_AUTOSUGGEST_IGNORE_WIDGETS} : bad substitution -bash: ! ${+ZSH_AUTOSUGGEST_COMPLETIONS_PTY_NAME} : bad substitution -bash: /usr/share/zsh-autosuggestions/zsh-autosuggestions.zsh: line 95: syntax error near unexpected token(‘
-bash: /usr/share/zsh-autosuggestions/zsh-autosuggestions.zsh: line 95: user:_zsh_autosuggest_(bound|orig)_*)' -bash: ! ${+functions[command_not_found_handler]} : bad substitution

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

It seems you are running source ~/.zshrc on your bash shell.
setopt, bindkey, zstyle and such commands are specific to Zsh and not existent in Bash.

Check, in which shell you are by:

echo $SHELL

# install zshell
sudo apt update
sudo apt upgrade
sudo apt install zsh

# start zshell
zsh

And voila! You can then do your source ~/.zshrc.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading