亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

Home Operation and Maintenance Mac OS How to add environment variables to mac computer

How to add environment variables to mac computer

Dec 22, 2020 am 10:18 AM
mac environment variables computer

How to add environment variables to mac computer

Usually we probably use the Windows system the most, but there are also many students who like Mac computers. But for friends who are using Mac computers for the first time, configuring environment variables may become a problem. Let’s talk about how to configure environment variables under Mac.

(Learning video sharing: Programming video)

My mac configuration:

How to add environment variables to mac computer

1. Mac system The environment variables, the loading order is:

a. /etc/profile
b. /etc/paths
c. ~/.bash_profile
d. ~/.bash_login
e. ~/.profile
f. ~/.bashrc

2. Among them, a and b are at the system level, which will be loaded when the system starts, and the rest are connected by the user. c, d, e are read in order from front to back. If the c file exists, the following files will be ignored and not read, and so on. ~/.bashrc does not have the above rules, it is loaded when the bash shell is opened. It is recommended to add environment variables in c. The following is also demonstrated by adding environment variables in c. Open Terminal, enter vi ./.bash_profile, press Enter, open the ./.bash_profile file:

How to add environment variables to mac computer

How to add environment variables to mac computer

##Press Enter:

How to add environment variables to mac computer

3. The ./.bash_profile file has been opened, but it is still in view mode and cannot be edited. Enter "i" to enter insert mode

4. You can add environment variables at this time, for example: How to add environment variables to mac computer

export SCALA_HOME=/Users/fushuai/Documents/scala-2.12.4
export PATH=$PATH:$SCALA_HOME/bin

5. After editing is completed, click the "esc key to exit insert mode. ", then enter ":wq!", press Enter, and save successfully.

How to add environment variables to mac computer

#6. Enter “source ./.bash_profile” to make the environment variable take effect.

7. Enter "echo $PATH", check the environment variables, and find that the addition is successful.

How to add environment variables to mac computer

#8. Re-open the terminal and the environment variables will take effect.

Related recommendations:

macos system

The above is the detailed content of How to add environment variables to mac computer. For more information, please follow other related articles on the PHP Chinese website!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undress AI Tool

Undress AI Tool

Undress images for free

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

How does PHP handle Environment Variables? How does PHP handle Environment Variables? Jul 14, 2025 am 03:01 AM

ToaccessenvironmentvariablesinPHP,usegetenv()orthe$_ENVsuperglobal.1.getenv('VAR_NAME')retrievesaspecificvariable.2.$_ENV['VAR_NAME']accessesvariablesifvariables_orderinphp.iniincludes"E".SetvariablesviaCLIwithVAR=valuephpscript.php,inApach

How to set up file sharing between two Macs on the same network? How to set up file sharing between two Macs on the same network? Jul 14, 2025 am 12:08 AM

To share files between two Macs on the same network, first make sure that the two devices are connected to the same LAN, then enable file sharing on the host, set shared folders and access permissions, and then connect from another Mac through the access sidebar or manually enter the SMB address, and finally you can browse, copy or transfer files. Common problems include waiting or restarting the network when the device cannot be discovered. If the permissions are incorrect, you need to check the username, password and sharing settings. If the connection fails, you can try the SMB address. If the firewall blocks, you can temporarily close the test.

How to get back the bitcoin I bought before? Tutorial for retrieving bitcoin How to get back the bitcoin I bought before? Tutorial for retrieving bitcoin Jul 15, 2025 pm 07:09 PM

To retrieve Bitcoins purchased years ago, you must first determine its storage location and retrieve the access key. The specific steps are as follows: 1. Recall and check the exchange accounts you may have used, such as Binance, Ouyi, Huobi, Gate.io, Coinbase, Kraken, etc., and try to log in or retrieve your password through email; 2. If Bitcoin has been withdrawn to your personal wallet, you must find the mnemonic, private key or wallet file. This information may exist in physical backup, electronic device or password manager; 3. After finding the key information, use the mainstream wallet app to select the "Recover Wallet" function and accurately enter the mnemonic or private key to synchronize the assets; Important tips: Do not disclose mnemonic or private keys to ensure the safe operation environment, and patiently and systematically check all

BiAn Exchange PC download BiAn Exchange binance PC version v2.101.8 latest installation package BiAn Exchange PC download BiAn Exchange binance PC version v2.101.8 latest installation package Jul 16, 2025 am 08:18 AM

For any Binance user who wants to improve transaction efficiency and stability, upgrading and using the latest v2.101.8 computer client is a wise choice. It provides professional performance and power beyond the web version and is an important tool for you to stay competitive in the ever-changing digital asset market. Finally, again, be sure to get the installation package through the official Binance website to ensure your assets are safe.

how to sync my phone to my computer how to sync my phone to my computer Jul 19, 2025 am 04:37 AM

Tosyncyourphonewithyourcomputer,useaUSBcablefordirectfiletransfer,enableautomaticphotosyncingviaGooglePhotosoriCloud,andutilizecloudserviceslikeGoogleDrive,Dropbox,iCloud,orOneDriveforgeneralfilesyncing.First,connectyourphoneviaUSBandselectthecorrect

How to share my Mac's screen How to share my Mac's screen Jul 14, 2025 am 01:18 AM

To share your Mac screen with others, you can choose the appropriate method according to different scenarios. First, through video conferencing tools such as Zoom, click the "Share" button to select the screen or a specific window for sharing; second, use Messages or FaceTime to initiate a screen sharing session, click the " " to select "Screen Sharing" and invite the other party to view or control it; third, use the "Screen Sharing" App that comes with the system to enable this function on the target Mac and connect to the server address through Finder to achieve remote access; in addition, you need to pay attention to details such as permission settings, privacy protection and network performance impact.

Where is the Library folder on a Mac and how do I access it? Where is the Library folder on a Mac and how do I access it? Jul 15, 2025 am 12:49 AM

To find the Library folder on your Mac, you can follow the following steps: 1. Open the Finder window; 2. Click "Go" in the top menu bar; 3. Press and hold the Option (?) key to make the "Library" option appear; 4. Click to enter the Library folder. This folder contains subfolders such as application support files, caches, preferences, logs, and keychains, and is suitable for debugging applications, clearing caches, or managing extensions. If you need frequent access, you can run the "chflagsnohidden~/Library/" command through the terminal to make it permanently displayed. If you hide it again, use "chflagshidden~/Library/".

What is a more common digital currency What is a more common digital currency Jul 23, 2025 pm 09:53 PM

Digital currency is a decentralized electronic currency based on blockchain technology. Its value is determined by market supply and demand. It is globally universal, transparent in transactions and has certain anonymity. 1. Binance is the largest platform in the world with transaction volume, providing rich currencies and a strong ecosystem. 2. OkX has a comprehensive product line, supporting derivatives trading and Web3 accounts, suitable for advanced users; 3. Huobi (Huobi/HTX) has a long history, is safe and stable, and is deeply trusted by old users; 4. Gat

See all articles