MAC environment variable settings

Source: Internet
Author: User

Anxious students can jump directly to the specific command. Cackle

First of all, my background, I have not used the MAC system, the Linux system will be a few simple commands, not like some Daniel the daily work and entertainment with the Linux system, and never delve into. I have been using the Windows system, now try to turn to the Mac to see whether the Mac really has the people on the internet say so good, is not really so magical. First of all, I did not betray windows, after all, Windows has followed me for 10 years. Now my computer is running windows8.1 in a virtual machine. My job still has to work under Windows, the company's products don't support Macs, and if the company's products support Macs, how nice.

has been using ThinkPad notebook computer, all said black is never outdated color, but I really look at the griping at everything, the first time to see ThinkPad is so business, stable, but now a little dislike its dull and dull. I am not the fruit powder, the cell phone is Meizu, had not used any Apple product before, but I still bought a MacBook Pro in September, this product is really too good, expensive is expensive point, but I think still value. It was a great deal of determination before buying, after all, a lot of silver. In order not to let the money white, I decided not to be like a colleague directly down to replace the Windows system, I think is a great waste. Besides, I'm still more curious about whether the Mac system works or not. If one day I switch back to Windows like a colleague, I guess that's because I'm a Mac player and make sure the Mac experience is not as good as windows, so let's see.

I would like to record some of the usual problems with the Mac, for future inquiries, while training language organization ability, my language organization ability is very poor, I want to change.

Do not pull, cut into the theme of this article, master please skip ...

Mac is a UNIX system

Unix system There are a lot of shells, you do not need to master, will be a good, I do not, is learning. After you have mastered your Mac, you can also write a familiar Linux/unix on your resume.

First, to see what shell the current system is using, use the

$ echo $SHELL

/bin/bash

This is said to be the most commonly used shell, the other for beginners like me not to delve into the first, here is also for the shell how to set the environment variables.

In Windows, environment variables are defined in the system advanced properties. In a Mac, the environment variable is defined in 3 places,

First:/etc profile file, this is the global configuration, regardless of which user, log in will read the file. It is not recommended to change this place.

Second: BASHRC file under/etc, this is also the global configuration, when the bash shell executes, regardless of the way, will read this file.

Third: ~ under the. bash_profile file, the environment variables set in this file are related to the user.

Specific commands

1. ^+space, input terminal, fast start terminal.

2. CD ~

3. Touch. Bash_profile

4. Open. Bash_profile

5. Enter in the Open file: Export environment variable NAME = environment variable Content 1: Environment variable content 2

6. Save the. bash_profile file

7. Source. Bash_profile, let the environment variable take effect immediately.

Expand Reading

1. Login-shell and non login-shell differences:

Http://blog.chinaunix.net/uid-23842323-id-2656618.html

MAC environment variable settings

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.