In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly explains "ubuntu how to add environmental variables", interested friends may wish to take a look. The method introduced in this paper is simple, fast and practical. Let Xiaobian take you to learn "ubuntu how to add environmental variables"!
/etc/profile: The first file used by the operating system to customize the user environment at login time. This file sets the environment information for each user of the system. When the user logs in for the first time, this file is executed.
/etc/environment: The second file used by the operating system at login time. The system sets the environment variables of the environment file before reading your own profile.
3.~/.bash_profile: The third file used during login is the.profile file, which each user can use to enter shell information dedicated to their own use. When the user logs in, this file is executed only once! By default, he sets some environment variable amount of play, executing the user's.bashrc file.
/etc/bashrc: Executes this file for each user running bash shell. When the bash shell is opened, the file is read.
~/.bashrc: This file contains bash information specific to your bash shell and is read when logging in and every time a new shell is opened.
To make the environment variable you set take effect immediately, use the source command, for example:
The code is as follows:
source /etc/environment
To add a command from a directory to a shortcut link, use this method, for example, I want to add something from the tools directory of the Android SDK:
The code is as follows:
sudo ln -sf ~/android/sdk/tools/* /usr/bin/.
This allows you to execute commands such as draw9path directly.
At this point, I believe that everyone has a deeper understanding of "how to add environment variables to ubuntu", so let's actually operate it! Here is the website, more related content can enter the relevant channels for inquiry, pay attention to us, continue to learn!
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.