In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article introduces the knowledge of "commands to view, add and configure environment variables under Linux". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
1. You can view the path value with the export command
[root@localhost u-boot-sh5] # export can view all variables
two。 To view the PATH environment variables separately, you can:
[root@localhost u-boot-sh5] # echo $PATH
3. Add PATH environment variable (temporary), available:
[root@localhost u-boot-sh5] # export PATH=/opt/STM/STLinux-2.3/devkit/sh5/bin:$PATH
4. Permanently add environment variables (affecting the current user)
# vim ~ / .bashrc
Export PATH= "/ opt/STM/STLinux-2.3/devkit/sh5/bin:$PATH"
5. Permanently add environment variables (affecting all users)
# vim / etc/profile
At the end of the document, add:
Export PATH= "/ opt/STM/STLinux-2.3/devkit/sh5/bin:$PATH"
Save, exit, and then run:
# source / etc/profile
Ag:
Java use yum installation do not know where the installation path, want to configure the environment variable how to operate?
View the java installation path
View and use: set java_home under windows
View and use: whereis java under linux
The following is how I view linux
Java: / usr/bin/java / etc/java / usr/lib/java / usr/share/java / usr/share/man/man1/java.1.gz
Usually the first / usr/bin/java = > this is a file, according to which you can find the final installation directory
My final installation directory is / usr/lib/jvm/java
Configure the environment variables after finding the installation directory
Here are the environment variables that configure linux: (remember source .bash _ profile) vi this file / etc/profileexport JAVA_HOME=/usr/lib/jvm/javaexport CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
Add at the end of the .bash _ profile file: export PATH=$JAVA_HOME/bin:$PATH.shell terminal executes the following command: (temporary) export PATH=$JAVA_HOME/bin:$PATH
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.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.