Posts macOs 环境变量配置
Post
Cancel

macOs 环境变量配置

1. 切换shell

  • 切换为bash chsh -s /bin/bash

  • 切换为zsh chsh -s /bin/zsh

  • 查看本机安装了哪些shell cat /etc/shells

  • 查看当前使用shell echo $0

2. 环境变量配置

  1. 配置bash_profile (bash环境变量) vim ~/.bash_profile
  2. 刷新 source ~/.bash_profile
  3. 配置.zshrc(zsh环境变量,导入bash) 添加 source ~/.bash_profile
This post is licensed under CC BY 4.0 by the author.

Contents

Trending Tags