Configure environment variables under Linux "original"

Source: Internet
Author: User
Tags egrep

In the user directory, you only need to create the bin directory in the user directory, put in the executable file you want to execute, and you can use it at the command line.

# ~/.profile:executed by the command interpreter forlogin shells.# This file isNot read by bash (1),if~/.bash_profile or ~/. bash_login# exists.# See/usr/share/doc/bash/examples/startup-files forexamples.# The files are locatedinchThe bash-Doc package.# thedefaultUmask is Set inch/etc/profile; forSetting the umask# forSSH logins, install and configure the libpam-umask package. #umask022# ifRunning Bashif[-N"$BASH _version" ]; Then # include. BASHRCifIt existsif[-F"$HOME/.BASHRC" ]; Then. "$HOME/.BASHRC"fifi#SetPATH so it includes user'S Private bin if it existsif[-D"$HOME/bin" ] ; Then PATH="$HOME/bin: $PATH"fi

. BASHRC

# ~/.bashrc:executed by Bash (1) fornon-Login shells.# See/usr/share/doc/bash/examples/startup-files (inchThe package bash-Doc) # forexamples# If not running interactively, Don't do anything Case$-inch*i*) ;; *)return;; esac# Don'T put duplicate lines or lines starting with space in the history.# See Bash (1) forMore Optionshistcontrol=ignoreboth# Append to the history file, Don'T overwrite itShopt-s histappend# forSetting history length See Histsize and HistfilesizeinchBash1) Histsize= +histfilesize= -# Check the window size after each command and,ifnecessary,# Update the values of LINES and columns.shopt-s checkwinsize# IfSet, the pattern"**"Usedincha pathname expansion context will# match all files and zero or more directories and subdirectories. #shopt-s globstar# make less more friendly forNon-text input files, see Lesspipe (1)[ -x/usr/bin/lesspipe] && eval"$ (shell=/bin/sh lesspipe)"# SetVariable identifying the Chrootinch(UsedinchThe prompt below)if[-Z"${debian_chroot:-}"] && [-r/etc/Debian_chroot]; Then Debian_chroot=$ (cat/etc/debian_chroot) fi#SetA fancy prompt (Non-color, unless we know we"want"color) Case "$TERM" inchxterm-color) color_prompt=yes;; esac# Uncomment forA colored prompt,ifThe terminal have the capability; turned# off bydefaultTo distract the user:the focusinchA terminal window# should is on the output of commands, not on the prompt#force_color_prompt=Yesif[-N"$force _color_prompt" ]; Thenif[-x/usr/bin/tput] && tput SETAF1>&/dev/NULL; then # We have a color support; assume it's compliant with Ecma-48# (iso/iec-6429). (Lack of such support isextremely rare, and such # a Casewould tend to support setf rather than SETAF.) Color_prompt=YesElsecolor_prompt=Fifiif["$color _prompt"=Yes]; Then PS1='${debian_chroot:+ ($debian _chroot)}\[\033[01;32m\]\[email protected]\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[ 00m\]\$'ElsePS1='${debian_chroot:+ ($debian _chroot)}\[email protected]\h:<\w\$>'fiunset color_prompt force_color_prompt# If This  isAn xtermSetThe title to [email protected]:d ir Case "$TERM" inchxterm*|rxvt*) PS1="\[\e]0;${debian_chroot:+ ($debian _chroot)}\[email protected]\h: \w\a\] $PS 1"    ;;*)    ;; esac# enable color support of LS and also add handy aliasesif[-x/usr/bin/Dircolors]; Then test-R ~/.dircolors && eval"$ (dircolors-b ~/.dircolors)"|| Eval"$ (dircolors-b)"alias ls='ls--color=auto'#alias dir='dir--color=auto'#alias VDir='VDir--color=auto'alias grep='grep--color=auto'alias Fgrep='Fgrep--color=auto'alias Egrep='egrep--color=auto'fi# some more ls aliasesalias ll='Ls-alf'alias La='ls-a'alias L='LS-CF'# ADD an"Alert"Alias for Longrunning commands. Use like so:# sleepTen; Alertalias Alert='notify-send--urgency=low-i "$ ([$? = 0] && echo Terminal | | echo error) "" $ (history|tail-n1|sed-e'\"'s/^\s*[0-9]\+\s*//; s/[;&|] \s*alert$//' \ ') '# Alias definitions.# want to put all your additions into a separate file like#~/. bash_aliases, instead of adding them here directly.# see/usr/share/doc/bash-doc/examplesinchThe bash-Doc package.if[-F ~/. bash_aliases]; Then. ~/. bash_aliasesfi# Enable programmable completion features (you don't need to enable# This,ifIt's already enabled IN/ETC/BASH.BASHRC And/etc/profile# sources/etc/BASH.BASHRC).if! Shopt-OQ POSIX; Thenif[-f/usr/share/bash-completion/Bash_completion]; Then. /usr/share/bash-completion/bash_completion Elif [-f/etc/Bash_completion]; Then. /etc/bash_completion fifiexport PATH=/opt/toolchain/arm-2012.03/Bin: $PATHsource~/.git-completion.bash

Welcome to Exchange, if reproduced please indicate the source

Sina Blog: http://blog.sina.com.cn/u/2049150530
Blog Park: http://www.cnblogs.com/sky-heaven/
Know: Http://www.zhihu.com/people/zhang-bing-hua

Configure environment variables under Linux "original"

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.