"Turn" Ubuntu12.04 LTS environment variable setting

Source: Internet
Author: User

Original URL: http://blog.chinaunix.net/uid-26963688-id-3221439.html

1. Set the current user environment variable (invalid for root user)

Open Terminal input:
[Email protected]:~$ sudo gedit ~/.BASHRC
[sudo] password for light:

Add at the end:
Export Path=/opt/embedsky/4.3.3/bin: $PATH
, where/opt/embedsky/4.3.3/bin is the path to the environment variable you need to set.

To make it effective immediately, execute at the terminal:
[Email protected]:~$ Source ~/.BASHRC
or restart your computer.


2. Setting the system environment variable (for root user)

Open Terminal input:
[Email protected]:~$ sudo gedit/etc/environment
[sudo] password for light:

Add "colon:" plus "your environment variable path" at the end of Path= "...."

To make it effective immediately, execute at the terminal:
[Email protected]:~$ source/etc/environment
or restart your computer.

--------------------------------------------------------------------------------------------

For example:

[email protected]: ~# arm-linux-gcc-v
Using built-in specs.
Target:arm-none-linux-gnueabi
Configured with:/scratch/julian/lite-respin/linux/src/gcc-4.3/configure--build=i686-pc-linux-gnu--host= I686-pc-linux-gnu--target=arm-none-linux-gnueabi--enable-threads--disable-libmudflap--DISABLE-LIBSSP-- disable-libstdcxx-pch--with-gnu-as--with-gnu-ld--enable-languages=c,c++--enable-shared--enable-symvers=gnu-- Enable-__cxa_atexit--with-pkgversion= ' sourcery g++ Lite 2008q3-72 '--with-bugurl=https://support.codesourcery.com/ gnutoolchain/--disable-nls--prefix=/opt/codesourcery--with-sysroot=/opt/codesourcery/arm-none-linux-gnueabi/ LIBC--WITH-BUILD-SYSROOT=/SCRATCH/JULIAN/LITE-RESPIN/LINUX/INSTALL/ARM-NONE-LINUX-GNUEABI/LIBC--with-gmp=/ SCRATCH/JULIAN/LITE-RESPIN/LINUX/OBJ/HOST-LIBS-2008Q3-72-ARM-NONE-LINUX-GNUEABI-I686-PC-LINUX-GNU/USR-- with-mpfr=/scratch/julian/lite-respin/linux/obj/host-libs-2008q3-72-arm-none-linux-gnueabi-i686-pc-linux-gnu/ usr--disable-libgomp--enable-poison-system-directories--with-build-time-tools=/scratch/julian/lite-respin/ Linux/install/arm-none-linux-gnueabi/bin--with-build-time-tools=/scratch/julian/lite-respin/linux/install/ Arm-none-linux-gnueabi/bin
Thread Model:posix
GCC version 4.3.2 (sourcery g++ Lite 2008q3-72)
[email protected]:~#------------------------------------------------------------------------------------------- [email protected]: ~# vim/etc/environmentshown below:#PATH = "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/arm/4.3.2/bin"
Path= "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/work/tools/ Gcc-3.4.5-glibc-2.3.6/bin "
~
~
~
"/etc/environment" 2L, 222C all-------------------------------------------------------------------------------------------

"Turn" Ubuntu12.04 LTS environment variable setting

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.