B
ByteNote

导航

首页文章工具关于

© 2025 ByteNote

B
ByteNote

Mac设置环境变量

Oct 26, 20215 min read

加载bash shell环境变量的顺序

/etc/profile /etc/paths ~/.bash_profile ~/.bash_login ~/.profile ~/.bashrc

系统级别:

/etc/profile
/etc/paths

用户级别:

~/.bash_profile (mac用的)
~/.bash_login
~/.profile
~/.bashrc (这个linux用的)

配置文件

vim ~/.zhsrc

一个环境变量

export 变量名=命令路径

多个变量进行拼接

export PATH=$PATH:ANDROID_SDK

立即生效

source ~/.zhsrc

查看环境变量

echo $PATH

相关文章

Git Merge Mastery: Unveiling the Differences Between Merge, Rebase, and Fast-Forward

Git merging strategies include merge (preserving history), rebase (clean history), and fast-forward (strict, linear merges), each suited for different team collaboration needs.

Solving Local Network Access Issues with DDNS A Comprehensive Guide

This guide provides multiple solutions, including enabling NAT Loopback, using a hosts file, setting up a local DNS server with Dnsmasq, or implementing split-horizon DNS, to resolve the issue of accessing local network services via a Dynamic DNS domain name from within the same network.

Complete Guide to WireGuard VPN Setup Server and All Clients

This comprehensive guide provides step-by-step instructions for setting up a WireGuard VPN server using Docker, configuring clients on Linux, MacOS, mobile devices, and Windows, and managing the server and clients for optimal security and performance.