Tuesday, July 26, 2011

How to set the environment variables in the linux


The below command set the environment for the current session only. Once the terminal is closed the environment variables need to set again for new session.


export PATH=$PATH:/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin:/home/ubuntu/EasyARM/work/crosstool/mini2440/usr/local/arm/4.3.2/bin


Similarly the path varies from other toolchains.





4 comments:

  1. How to set the environment variables permanent?

    ReplyDelete
  2. echo "export PATH=$PATH:/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin:/home/ubuntu/EasyARM/work/crosstool/mini2440/usr/local/arm/4.3.2/bin" >> .bashrc

    ReplyDelete
  3. tar -xvf file.tar ( unzip tar file )
    tar -t file.tar (list contents of tar file)
    tar -xvfz file.tar.gz (unzip tar.gz file)
    tar -xvfj file.tar.bz2 (unzip tar.bz2 file)
    gunzip file.gz ( unzip gzip file )
    unzip file.zip ( unzip zip file )
    bunzip2 file.bz2 ( unzip bzip2 file )

    ReplyDelete