Mac zsh报错 && shell 命令: MD5等

一、Shell命令

1、MD5

brew install md5sha1sum  #安装
echo -n '123456'|md5sum|cut -d ' ' -f1 

 

2、查看自己是什么shell环境

echo $SHELL

二、zsh vs bash 

zsh,默认编译环境变量文件为.zshrc,

vim ~/.zshrc

bash,

open -e .bash_profile

vim ~/.bash_profile

source ~/.bash_profile    # source:在当前bash环境下读取并执行FileName中的命令。

  

3、其他指令

 Mac OS  

  $ sw_vers

  $ id

4、curl vs ping

curl https://www.baidu.com

 ping www.baidu.com

 

三、Mac报错

zsh: command not found: 

解决方法:

cd /opt 

/bin/bash -c "$(curl -fsSL https://gitee.com/ineo6/homebrew-install/raw/master/install.sh)"

or

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

安装成功后:

brew ls

原因

目前Homebrew还没有完成对搭载苹果芯片的的Mac机型完成适配,需要自行手动配置
本质就是brew没有安装,这个命令与linux系统中的yum命令类似,安装brew即可

posted @ 2021-03-09 14:19  尘恍若梦  阅读(550)  评论(0)    收藏  举报