Environment Variables-linux command line and Shell script programming encyclopedia

Source: Internet
Author: User

Environment Variables Section:

1. View Global variables: printenv/env

2. Displays the value of a single environment variable: Echo as Echo $HOME

3. Display all environment variables set for a particular process: set

4. Setting global variables: Creating local environment variables--exporting to the global environment

Create local environment variables (use all lowercase to differentiate from system variables)

Test= ' Testing a long string '//environment variable name, equals, value no space between

Export to Global environment

Export test//Note exports do not use the $ symbol

View

Echo $test

Delete environment variables

unset test//Note here also does not use the $ symbol

5. Set the PATH environment variable

To view an existing path variable

Echo $PATH

Add a new application path

Path= $PATH:/home/user/test

View the added Path variable

Echo $PATH

Installation and management of soft package

1.aptitude for viewing installed packages

2. Find a specific package aptitude search Package_name

3. Installing aptitude Install Package_name

Environment Variables-linux command line and Shell script programming encyclopedia

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.