In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/03 Report--
To install MAC, you often need to configure the path to the relevant environment, so you must understand the loading order of MAC path system path files:
/ etc/profile
/ etc/paths
~ / .bash_profile
~ / .bash_login
~ / .profile # current user settings
~ / .bashrc
Of course, / etc/profile and / etc/paths are system-level and will be loaded when the system starts, followed by the current user-level environment variables. The last three are read in the order in which they go back, if:
~ /. Bash_profile file exists, then the following files will be ignored, if
The following file will be read by analogy if the bash_profile file does not exist.
~ / .bashrc does not have the above rule, it is loaded when bash shell is opened.
Generally, the syntax for setting PATH is:
Export PATH=$PATH::::.:
~ .profile file content:
Export PATH
Export PATH= "/ anaconda/envs/python3/bin/:$PATH"
Export PATH= "/ anaconda/bin:$PATH"
PATH=$PATH:/usr/local/mysql/bin
(1) Global settings
The following file settings are global and require root permission when you modify them
1) / etc/paths (globally recommended to modify this file)
Edit paths and add environment variables to the paths file, one path per line
Hint: when entering environment variables, you don't have to type them one by one, just drag the folder into Terminal.
2) / etc/profile (it is not recommended to modify this file)
Global (public) configuration, no matter which user, will read the file when logging in.
3) / etc/bashrc (system-level environment variables are usually added to this file)
Global (public) configuration, this file will be read no matter how the bash shell is executed.
4)
[1] create a file:
Sudo touch / etc/paths.d/mysql
[2] Open this file with vim (editing is not allowed if it is opened as open-t):
Sudo vim / etc/paths.d/mysql
[3] Edit the file, type the path, and save (close the Terminal window and reopen one, and you can use the mysql command)
/ usr/local/mysql/bin
It is said that you can generate new files on your own, without having to put all the variables into a paths file, which is easy to manage.
(2) individual user settings (recommended settings)
1) ~ / .bash_profile (add user-level environment variables to any file)
(note: Linux contains .bashrc and Mac is .bash _ profile)
This file is read only if the bash shell is executed in login mode. The file is executed only once! By default, he sets some environment variables
Set command alias alias ll='ls-la'
Set the environment variable:
Export PATH=/opt/local/bin:/opt/local/sbin:$PATH
2) ~ / .profile ditto
If you want to take effect immediately, you can execute the following statement:
The corresponding file for $source
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.