Header Ads

How do I set path variable in Ubuntu

How do I set path variable in Ubuntu

path ubuntu

Since you are interested in setting PATH variable for a specific user follow these steps

  1. open .bashrc file using your favourite editor.I prefer vim (vi ~/.bashrc)
  2. add export path variable line at the end of the file (export PATH=/home/datascihome/miniconda2/bin:$PATH ) and save the file.
  3. For changes to save source the bashrc file using this command (source ~/.bashrc)

After this when ever you open new path variable will be exported.

If you want to export this PATH variable for all users in system instead of ~/.bashrc add 2nd line in /etc/environment
Hope this answers your question

Bạn chưa cài vim có thể sự dụng lệnh nano hay gedit để bật ./bashrc lên để edit cho nó dễ dàng nhé

Part 2: 
Add the following lines to your $HOME/.bash_profile config file:

export ANDROID_HOME=$HOME/Android/Sdk

ype source $HOME/.bash_profile to load the config into your current shell. Verify that ANDROID_HOME has been added to your path by running echo $PATH.

No comments