Export command-linux

Source: Internet
Author: User
Export command-linuxexport command function description: sets or displays environment variables. Syntax: export [-fnp] [variable name] [variable setting value] Supplementary Note: When executing a program in shell, shell provides a set of environment variables. Export allows you to add, modify, or delete environment variables. For more information, see setting or displaying environment variables. Syntax: export [-fnp] [variable name] = [variable setting value] Supplementary Note: When executing a program in shell, shell provides a set of environment variables. Export allows you to add, modify, or delete environment variables for subsequent programs. The effect of export is only true for this login operation. Parameter:-f indicates the function name in [variable name. -N: delete the specified variable. The variable is not actually deleted, but is not output to the execution environment of subsequent commands. -P: list all environment variables that the shell assigns to the program. When configuring the cross-compilation tool chain in export PATH, you must specify the PATH of the compilation tool and set the environment variable. For example, my mips-linux-gcc compiler is in the "/opt/au1200_rm/build_tools/bin" directory. 1. run the export command: # export PATH = $ PATH: /opt/au1200_rm/build_tools/bin to view the configured environment variables: # exportdeclare-x BASH_ENV = "/root /. bashrc "declare-x G_BROKEN_FILENAMES =" 1 "declare-x HISTSIZE =" 1000 "declare-x HOME ="/root "declare-x HOSTNAME =" localhost. localdomain "declare-x PATH ="/usr/lib/ccache:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin: /usr/bi N:/root/bin: /root/ccy/buildroot-gcc342/bin/"declare-x INPUTRC ="/etc/inputrc "declare-x PWD ="/opt/au1200_rm/build_tools/bin "declare-x SHELL = "/bin/bash" declare-x SHLVL = "1" # echo $ PATH/usr/lib/ccache: /usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin: /root/ccy/buildroot-gcc342/bin/2, modify the profile File: below # vi/etc/profile to add: export PATH = "$ PATH: /opt/au1200_rm/build_tools/bin" 3. modify. bashrc file: # vi/root /. bashrc adds: export PATH = "$ PATH:/opt/au1200_rm/build_tools/bin" # echo $ PATH to check whether the PATH/my_new_path is already in the output. Also: 4. modify/etc/re. local File: # vi/etc/re. add: export PATH = "$ PATH:/opt/au1200_rm/build_tools/bin" to the local file"
Related Article

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.