Before learning about linux configuration files, login and non-loginshell first understand login and non-loginshell, loginshell: obtain bash... before learning about the linux environment configuration files, login and non-login shell first understand login and non-login shell, because the two obtain bash, login shell is caused by inconsistent data in the configuration file: The Complete login process is required when bash is obtained, which is called login shell. For example ~ When logging on to tty6, you need to enter your account and password. the obtained bash is called "login shell 』??? /Div> non-login shell: the method used to obtain the bash interface does not require repeated login. for example, (1) after you log on to Linux using X window, start the terminal with the graphical interface X. At this time, the terminal interface does not need to enter the account and password again. The bash environment is called non-login shell. (2) if you issue the bash command again in the original bash environment and do not enter the account password, the second bash (subroutine) is also non-login shell. Login shell actually only reads the two configuration files:/etc/profile: This is the overall configuration of the system. you 'd better not modify this file ;~ /. Bash_profile or ~ /. Bash_login or ~ /. Profile: personal configuration of the user. if you want to change your data, write it here ~ /. Bash_profile ~ /. Bash_login ~ /. Profile in fact, bash's login shell configuration only reads one of the above three files, and the read order is in the above order. That is to say, if ~ /. Bash_profile exists, so the other two files will not be read whether they exist or not. If ~ /. Bash_profile does not exist before reading ~ /. Bash_login, which can be read only when neither of the first two exists ~ /. Profile. ~ /. Bashrc (non-login shell will read) Linux configuration JDK environment variable I configured in ~ /. Bash_profile :~ Indicates that the current user directory is in the/home/directory vi ~ /. Bash_profile adds the JAVA_HOME variable at the end of the file, and configures PATH, CLASSPATH export JAVA_HOME = {java installation directory} export JRE_HOME =$ {JAVA_HOME}/jreexport CLASSPATH =.: $ {JAVA_HOME}/lib :$ {JRE_HOME}/libexport PATH =$ {JAVA_HOME}/bin: $ PATH: Save and run source ~ /. Bash_profile: make the environment variable you just configured take effect. run java-version. you can see the java version information to prove that the configuration is successful. in Linux, configure the Android sdk environment variable ~ /. Bash_profile :~ Indicates that the current user directory is in the/home/directory vi ~ /. Bash_profile adds the ANDROID_HOME variable at the end of the file, and configures PATH export ANDROID_HOME = {android sdk directory} export PATH =$ {ANDROID_HOME}/platform-tools /: $ {ANDROID_HOME}/tools/: $ PATH: Save and run source ~ /. Bash_profile, make the environment variables you just configured take effect. if you install amd 64-bit ubuntu, even if you have correctly configured the android environment variables, you still cannot use the adb command in the following error message is displayed when you enter adb on the terminal: android-sdk-linux_86/platform-tools/adb: no file or directory. Solution: because it is 64-bit system, and Android sdk only 32-bit program, need to install ia32-libs, can use. Run the following command to make sure that you are OK. Sudo apt-get install ia32-libs here there are a lot of files to download hundreds of M.
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