commands not found on zsh

前端 未结 16 1655
梦毁少年i
梦毁少年i 2020-12-04 06:30

I am using the z Shell (zsh) instead of the default bash, and something wrong happen so that all commands who used to work are no longer recognized:

<         


        
16条回答
  •  执念已碎
    2020-12-04 07:08

    It's evident that you've managed to mess up your PATH variable. (Your current PATH doesn't contain any location where common utilities are located.)

    Try:

    PATH=/bin:/usr/bin:/usr/local/bin:${PATH}
    export PATH
    

    Alternatively, for "resetting" zsh, specify the complete path to the shell:

    exec /bin/zsh
    

    or

    exec /usr/bin/zsh
    

提交回复
热议问题