How set more than one paths has to be added to the PATH environment variable and other variable? [duplicate]

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
-3
down vote

favorite













This question already has an answer here:



  • bashrc not loaded on login

    2 answers



I am adding commands to $HOME/.bash_profile file



export PATH=[PATH_TO_FLUTTER_GIT_DIRECTORY]/flutter/bin:$PATH

export ANDROID_HOME=/home/harsh/SDK

export PATH=$PATH:$ANDROID_HOME/tools


Now I have to run source $HOME/.bash_profile when my system boot every time. Is there any other option to permanent set these paths?



Problem: It's annoying to run this commands again and again when my system boot. Is there a way when I start my system and don't need to add this commands again?







share|improve this question













marked as duplicate by roaima, Rui F Ribeiro, schily, meuh, Jesse_b Jun 6 at 16:03


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.














  • Bash should read ~/.bash_profile on startup if it's started as a login shell, so it's not really just "a file". Now, the question is, how do you start Bash, if the login shell startup files don't take effect? In what sort of an environment?
    – ilkkachu
    Jun 6 at 6:30






  • 1




    What is the file actually called, and which shell are you using? You are hopefully aware that various filenames on UNIX-ish systems are "magic" so it really does make a difference.
    – Philip Kendall
    Jun 6 at 6:31










  • So I have to move that commands to .bashrc ? and link to .bash_login
    – Harsh Bhavsar
    Jun 6 at 6:35







  • 3




    Please just edit your question to explain: 1) what you're trying to achieve 2) precisely what you've tried so far (not hiding details like which filename) 3) what's happening. Stop making random guesses as to what you should do until you've explained the issue or we can't really help.
    – Philip Kendall
    Jun 6 at 6:41















up vote
-3
down vote

favorite













This question already has an answer here:



  • bashrc not loaded on login

    2 answers



I am adding commands to $HOME/.bash_profile file



export PATH=[PATH_TO_FLUTTER_GIT_DIRECTORY]/flutter/bin:$PATH

export ANDROID_HOME=/home/harsh/SDK

export PATH=$PATH:$ANDROID_HOME/tools


Now I have to run source $HOME/.bash_profile when my system boot every time. Is there any other option to permanent set these paths?



Problem: It's annoying to run this commands again and again when my system boot. Is there a way when I start my system and don't need to add this commands again?







share|improve this question













marked as duplicate by roaima, Rui F Ribeiro, schily, meuh, Jesse_b Jun 6 at 16:03


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.














  • Bash should read ~/.bash_profile on startup if it's started as a login shell, so it's not really just "a file". Now, the question is, how do you start Bash, if the login shell startup files don't take effect? In what sort of an environment?
    – ilkkachu
    Jun 6 at 6:30






  • 1




    What is the file actually called, and which shell are you using? You are hopefully aware that various filenames on UNIX-ish systems are "magic" so it really does make a difference.
    – Philip Kendall
    Jun 6 at 6:31










  • So I have to move that commands to .bashrc ? and link to .bash_login
    – Harsh Bhavsar
    Jun 6 at 6:35







  • 3




    Please just edit your question to explain: 1) what you're trying to achieve 2) precisely what you've tried so far (not hiding details like which filename) 3) what's happening. Stop making random guesses as to what you should do until you've explained the issue or we can't really help.
    – Philip Kendall
    Jun 6 at 6:41













up vote
-3
down vote

favorite









up vote
-3
down vote

favorite












This question already has an answer here:



  • bashrc not loaded on login

    2 answers



I am adding commands to $HOME/.bash_profile file



export PATH=[PATH_TO_FLUTTER_GIT_DIRECTORY]/flutter/bin:$PATH

export ANDROID_HOME=/home/harsh/SDK

export PATH=$PATH:$ANDROID_HOME/tools


Now I have to run source $HOME/.bash_profile when my system boot every time. Is there any other option to permanent set these paths?



Problem: It's annoying to run this commands again and again when my system boot. Is there a way when I start my system and don't need to add this commands again?







share|improve this question














This question already has an answer here:



  • bashrc not loaded on login

    2 answers



I am adding commands to $HOME/.bash_profile file



export PATH=[PATH_TO_FLUTTER_GIT_DIRECTORY]/flutter/bin:$PATH

export ANDROID_HOME=/home/harsh/SDK

export PATH=$PATH:$ANDROID_HOME/tools


Now I have to run source $HOME/.bash_profile when my system boot every time. Is there any other option to permanent set these paths?



Problem: It's annoying to run this commands again and again when my system boot. Is there a way when I start my system and don't need to add this commands again?





This question already has an answer here:



  • bashrc not loaded on login

    2 answers









share|improve this question












share|improve this question




share|improve this question








edited Jun 6 at 6:51
























asked Jun 6 at 6:18









Harsh Bhavsar

952




952




marked as duplicate by roaima, Rui F Ribeiro, schily, meuh, Jesse_b Jun 6 at 16:03


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.






marked as duplicate by roaima, Rui F Ribeiro, schily, meuh, Jesse_b Jun 6 at 16:03


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.













  • Bash should read ~/.bash_profile on startup if it's started as a login shell, so it's not really just "a file". Now, the question is, how do you start Bash, if the login shell startup files don't take effect? In what sort of an environment?
    – ilkkachu
    Jun 6 at 6:30






  • 1




    What is the file actually called, and which shell are you using? You are hopefully aware that various filenames on UNIX-ish systems are "magic" so it really does make a difference.
    – Philip Kendall
    Jun 6 at 6:31










  • So I have to move that commands to .bashrc ? and link to .bash_login
    – Harsh Bhavsar
    Jun 6 at 6:35







  • 3




    Please just edit your question to explain: 1) what you're trying to achieve 2) precisely what you've tried so far (not hiding details like which filename) 3) what's happening. Stop making random guesses as to what you should do until you've explained the issue or we can't really help.
    – Philip Kendall
    Jun 6 at 6:41

















  • Bash should read ~/.bash_profile on startup if it's started as a login shell, so it's not really just "a file". Now, the question is, how do you start Bash, if the login shell startup files don't take effect? In what sort of an environment?
    – ilkkachu
    Jun 6 at 6:30






  • 1




    What is the file actually called, and which shell are you using? You are hopefully aware that various filenames on UNIX-ish systems are "magic" so it really does make a difference.
    – Philip Kendall
    Jun 6 at 6:31










  • So I have to move that commands to .bashrc ? and link to .bash_login
    – Harsh Bhavsar
    Jun 6 at 6:35







  • 3




    Please just edit your question to explain: 1) what you're trying to achieve 2) precisely what you've tried so far (not hiding details like which filename) 3) what's happening. Stop making random guesses as to what you should do until you've explained the issue or we can't really help.
    – Philip Kendall
    Jun 6 at 6:41
















Bash should read ~/.bash_profile on startup if it's started as a login shell, so it's not really just "a file". Now, the question is, how do you start Bash, if the login shell startup files don't take effect? In what sort of an environment?
– ilkkachu
Jun 6 at 6:30




Bash should read ~/.bash_profile on startup if it's started as a login shell, so it's not really just "a file". Now, the question is, how do you start Bash, if the login shell startup files don't take effect? In what sort of an environment?
– ilkkachu
Jun 6 at 6:30




1




1




What is the file actually called, and which shell are you using? You are hopefully aware that various filenames on UNIX-ish systems are "magic" so it really does make a difference.
– Philip Kendall
Jun 6 at 6:31




What is the file actually called, and which shell are you using? You are hopefully aware that various filenames on UNIX-ish systems are "magic" so it really does make a difference.
– Philip Kendall
Jun 6 at 6:31












So I have to move that commands to .bashrc ? and link to .bash_login
– Harsh Bhavsar
Jun 6 at 6:35





So I have to move that commands to .bashrc ? and link to .bash_login
– Harsh Bhavsar
Jun 6 at 6:35





3




3




Please just edit your question to explain: 1) what you're trying to achieve 2) precisely what you've tried so far (not hiding details like which filename) 3) what's happening. Stop making random guesses as to what you should do until you've explained the issue or we can't really help.
– Philip Kendall
Jun 6 at 6:41





Please just edit your question to explain: 1) what you're trying to achieve 2) precisely what you've tried so far (not hiding details like which filename) 3) what's happening. Stop making random guesses as to what you should do until you've explained the issue or we can't really help.
– Philip Kendall
Jun 6 at 6:41











1 Answer
1






active

oldest

votes

















up vote
-2
down vote













You have to add entries to ".bashrc" file to create persistent environment variables for a user. Please see this for the detailed explanation.






share|improve this answer

















  • 2




    Using .bash_profile should work too, provided that 1) the shell is a login shell, or 2) .bash_profile is sourced by .bashrc. In fact, I'd argue that .bash_profile is the correct place for setting up one's environment, while .bashrc is for things specifically related to interactive shell sessions (such as setting one's prompt, displaying a calendar or uptime etc.).
    – Kusalananda
    Jun 6 at 6:40







  • 1




    This is at best misleading and at worst actively wrong. There are plenty more config files than ~/.bashrc and /etc/profile.
    – Philip Kendall
    Jun 6 at 6:44

















1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
-2
down vote













You have to add entries to ".bashrc" file to create persistent environment variables for a user. Please see this for the detailed explanation.






share|improve this answer

















  • 2




    Using .bash_profile should work too, provided that 1) the shell is a login shell, or 2) .bash_profile is sourced by .bashrc. In fact, I'd argue that .bash_profile is the correct place for setting up one's environment, while .bashrc is for things specifically related to interactive shell sessions (such as setting one's prompt, displaying a calendar or uptime etc.).
    – Kusalananda
    Jun 6 at 6:40







  • 1




    This is at best misleading and at worst actively wrong. There are plenty more config files than ~/.bashrc and /etc/profile.
    – Philip Kendall
    Jun 6 at 6:44














up vote
-2
down vote













You have to add entries to ".bashrc" file to create persistent environment variables for a user. Please see this for the detailed explanation.






share|improve this answer

















  • 2




    Using .bash_profile should work too, provided that 1) the shell is a login shell, or 2) .bash_profile is sourced by .bashrc. In fact, I'd argue that .bash_profile is the correct place for setting up one's environment, while .bashrc is for things specifically related to interactive shell sessions (such as setting one's prompt, displaying a calendar or uptime etc.).
    – Kusalananda
    Jun 6 at 6:40







  • 1




    This is at best misleading and at worst actively wrong. There are plenty more config files than ~/.bashrc and /etc/profile.
    – Philip Kendall
    Jun 6 at 6:44












up vote
-2
down vote










up vote
-2
down vote









You have to add entries to ".bashrc" file to create persistent environment variables for a user. Please see this for the detailed explanation.






share|improve this answer













You have to add entries to ".bashrc" file to create persistent environment variables for a user. Please see this for the detailed explanation.







share|improve this answer













share|improve this answer



share|improve this answer











answered Jun 6 at 6:36









TheGeek

1286




1286







  • 2




    Using .bash_profile should work too, provided that 1) the shell is a login shell, or 2) .bash_profile is sourced by .bashrc. In fact, I'd argue that .bash_profile is the correct place for setting up one's environment, while .bashrc is for things specifically related to interactive shell sessions (such as setting one's prompt, displaying a calendar or uptime etc.).
    – Kusalananda
    Jun 6 at 6:40







  • 1




    This is at best misleading and at worst actively wrong. There are plenty more config files than ~/.bashrc and /etc/profile.
    – Philip Kendall
    Jun 6 at 6:44












  • 2




    Using .bash_profile should work too, provided that 1) the shell is a login shell, or 2) .bash_profile is sourced by .bashrc. In fact, I'd argue that .bash_profile is the correct place for setting up one's environment, while .bashrc is for things specifically related to interactive shell sessions (such as setting one's prompt, displaying a calendar or uptime etc.).
    – Kusalananda
    Jun 6 at 6:40







  • 1




    This is at best misleading and at worst actively wrong. There are plenty more config files than ~/.bashrc and /etc/profile.
    – Philip Kendall
    Jun 6 at 6:44







2




2




Using .bash_profile should work too, provided that 1) the shell is a login shell, or 2) .bash_profile is sourced by .bashrc. In fact, I'd argue that .bash_profile is the correct place for setting up one's environment, while .bashrc is for things specifically related to interactive shell sessions (such as setting one's prompt, displaying a calendar or uptime etc.).
– Kusalananda
Jun 6 at 6:40





Using .bash_profile should work too, provided that 1) the shell is a login shell, or 2) .bash_profile is sourced by .bashrc. In fact, I'd argue that .bash_profile is the correct place for setting up one's environment, while .bashrc is for things specifically related to interactive shell sessions (such as setting one's prompt, displaying a calendar or uptime etc.).
– Kusalananda
Jun 6 at 6:40





1




1




This is at best misleading and at worst actively wrong. There are plenty more config files than ~/.bashrc and /etc/profile.
– Philip Kendall
Jun 6 at 6:44




This is at best misleading and at worst actively wrong. There are plenty more config files than ~/.bashrc and /etc/profile.
– Philip Kendall
Jun 6 at 6:44


Popular posts from this blog

How to check contact read email or not when send email to Individual?

Displaying single band from multi-band raster using QGIS

How many registers does an x86_64 CPU actually have?