Linux Learning Path: Shell variables (ii) Environment variables

Source: Internet
Author: User

1. ENV (environment abbreviation) and export Show all environment variables

2. Description of Environment variables

environment variable
user home folder equivalent to "~"
shell linux default to/bin/bash
history record number of bars
mail mail the directory in which messages are read (different per user):/var/spool/mail/root
Execute file lookup path, between paths with: delimited, lookup in order in path
language data Chinese: zh_cn.gb2312 and ZH_CN. UTF-8
random random number (between 0~32767)   Generator is/dev/random

3. Set view all variables (including environment variables and custom variables) in addition to the environment variables will also list other variables in bash

(1) Variable PS1

\u Current user Name

\h Current host Name

\ t Current time (24-hour format)

\w Current relative path

\$ "#" When the root role displays "$" for other roles

Description

Pictures and summary text from: Bird Brother's Linux private Dishes series basic Study (third edition) thanks bird Brother Take me on the road of Linux! I will have no scruples, go straight ahead!

Linux Learning Path: Shell variables (ii) Environment variables

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.