mac呐呐呐

Mac下关闭某端口
sudo lsof -i :8080
sudo kill -9 27438

“ll"查看一下会发现该文件“vue-cli-service” 并没有可执行权限

chmod -R 755 ./*

Mac安装x86——homebrew
打开终端的“使用Rosetta打开”设置

/bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)"

或者直接

arch -x86_64 /bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)"

环境变量查看
PS: 终端类型根据执行命令echo $SHELL显示的结果:

/bin/bash => bash => .bash_profile
/bin/zsh => zsh => .zprofile

如果遇到环境变量无效问题,建议回过头来查看终端类型,再做正确的设置。

从macOS Catalina(10.15.x) 版开始,Mac使用zsh作为默认Shell,使用.zprofile,所以对应命令:

echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> ~/.zprofile
eval "$(/opt/homebrew/bin/brew shellenv)"

如果是macOS Mojave 及更低版本,并且没有自己配置过zsh,使用.bash_profile:

echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> ~/.bash_profile
eval "$(/opt/homebrew/bin/brew shellenv)"

区分arm与86的brew

export PATH="/opt/homebrew/bin:$PATH"
alias ibrew='arch -x86_64 /usr/local/bin/brew'

另一种设置

alias abrew='arch -arm64 /opt/homebrew/bin/brew'
alias ibrew='arch -x86_64 /usr/local/bin/brew'

pip换源

官方源地址: https://pypi.org/simple

永久换

pip config set global.index-url  https://pypi.org/simple  

临时换

pip install xx -i https://pypi.org/simple

阿里云 http://mirrors.aliyun.com/pypi/simple/
中国科技大学 https://pypi.mirrors.ustc.edu.cn/simple/
豆瓣(douban) http://pypi.douban.com/simple/
清华大学 https://pypi.tuna.tsinghua.edu.cn/simple/
中国科学技术大学 http://pypi.mirrors.ustc.edu.cn/simple/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值