Home > OS >  Linux newly installed software to execute a program configuration to the PATH great god give advice
Linux newly installed software to execute a program configuration to the PATH great god give advice

Time:10-01

Newly installed software is convenient to configure the environment variables, later use
Direct use echo 'PATH=$PATH:/install location> added to the ~/. Bashrc file can be used in the picture below is the elder brother of the bird configuration file access, I may say so, anyway, the last visit is ~/. Bashrc this file, so I took all the preferences, including environment variable configuration on the inside is ok?
So I can also say so, such as Java system environment configuration, I will be on the first visit of can in the/etc/profile?
I am Linux small white, only know some operation is very superficial understanding of the meaning of them
Please god help me with the

CodePudding user response:

/etc/profile is the system environment variables, effective for all user
This is effective for the current account ~/.bashrc (~ refers to the current account of the home directory)

CodePudding user response:

reference 1st floor zhouchao6 response:
/etc/profile is the system environment variables, effective for all user
~/.bashrc this is effective for the current account (~ refers to the current account of the home directory)

Thanks brother! One point wake me up, I ask you a question, I put the Java configuration in the/etc/profile, but will lead to order failure on restart, etc., that I don't consider other users, I'm just your own user use, I put the Java configuration to ~/. The bashrc can? Java will take effect?

CodePudding user response:

refer to the second floor qq_44330369 response:
Quote: refer to 1st floor zhouchao6 response:
/etc/profile is the system environment variables, effective for all user
~/.bashrc this is effective for the current account (~ refers to the current account of the home directory)

Thanks brother! One point wake me up, I ask you a question, I put the Java configuration in the/etc/profile, but will lead to order failure on restart, etc., that I don't consider other users, I'm just your own user use, I put the Java configuration to ~/. The bashrc can? Java will take effect?


Can be added to the ~/bashrc

CodePudding user response:

reference zhouchao6 reply: 3/f
Quote: refer to the second floor qq_44330369 response:

Quote: refer to 1st floor zhouchao6 response:
/etc/profile is the system environment variables, effective for all user
~/.bashrc this is effective for the current account (~ refers to the current account of the home directory)

Thanks brother! One point wake me up, I ask you a question, I put the Java configuration in the/etc/profile, but will lead to order failure on restart, etc., that I don't consider other users, I'm just your own user use, I put the Java configuration to ~/. The bashrc can? Java will take effect?


Can be added to the ~/. Bashrc

Thanks for elder brother, for I this small white published a post questions you can reply me so fast I was so touched

CodePudding user response:

reference zhouchao6 reply: 3/f
Quote: refer to the second floor qq_44330369 response:

Quote: refer to 1st floor zhouchao6 response:
/etc/profile is the system environment variables, effective for all user
~/.bashrc this is effective for the current account (~ refers to the current account of the home directory)

Thanks brother! One point wake me up, I ask you a question, I put the Java configuration in the/etc/profile, but will lead to order failure on restart, etc., that I don't consider other users, I'm just your own user use, I put the Java configuration to ~/. The bashrc can? Java will take effect?


Can be added to the ~/. Bashrc

But now there is a problem, I added to the ~/bashrc in Java seems useless! is to be added to/etc/profile

CodePudding user response:

Add after you have source ~/. Bashrc, please reload the file

CodePudding user response:

refer to 6th floor zhouchao6 response:
add after you have source ~/. Bashrc, please reload the file

Source, no matter use, although I know that can be used on ubunt apt - get the install the jar to install the Java environment, but I still want to know the truth, why download the Java configuration of himself in the ~/. No matter in bashrc, configured in the/etc/profile will work, because he is the most began to call the/etc/profile file? Belong to login fallen hopelessly and nologinshall is not?

CodePudding user response:

refer to 7th floor qq_44330369 response:
Quote: refer to the sixth floor zhouchao6 response:
add after you have source ~/. Bashrc, please reload the file

Source, no matter use, although I know that can be used on ubunt apt - get the install the jar to install the Java environment, but I still want to know the truth, why download the Java configuration of himself in the ~/. No matter in bashrc, configured in the/etc/profile will work, because he is the most began to call the/etc/profile file? Belong to login fallen hopelessly and nologinshall is not?



Look at your bashrc file

CodePudding user response:

# ~/. Bashrc: executed by bash (1) for non - login shells. # see/usr/share/doc/bash/examples/startup - files (in the package bash - doc) # for examples# If not running interactively, don 't do anythingcase $- * I *); in; *) return;; esac# don't put duplicate lines or lines starting with space in the history.# See bash(1) for more optionsHISTCONTROL=ignoreboth# append to the history file, don't overwrite itshopt -s histappend# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)HISTSIZE=1000HISTFILESIZE=2000# check the window size after each command and, if necessary,# update the values of LINES and COLUMNS.shopt -s checkwinsize# If set, the pattern "**" used in a pathname expansion context will# match all files and zero or more directories and subdirectories.#shopt -s globstar# make less more friendly for non-text input files, see lesspipe(1)[ -x/usr/bin/lesspipe ] & & nullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnull
  • Related