How to add environment variables to mac computer
Dec 22, 2020 am 10:18 AMUsually 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:
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:
4. You can add environment variables at this time, for example:
export SCALA_HOME=/Users/fushuai/Documents/scala-2.12.4 export PATH=$PATH:$SCALA_HOME/bin5. After editing is completed, click the "esc key to exit insert mode. ", then enter ":wq!", press Enter, and save successfully.
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!

Hot AI Tools

Undress AI Tool
Undress images for free

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Clothoff.io
AI clothes remover

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

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

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

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.

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

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.

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

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.

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/".

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
