Environment Variables
Paths
/etc/environment/etc/profile/etc/bashrc~/.bashrc~/.profile/etc/alternatives/
Variables
$HOME- User Home Directory$HOSTNAME- Hostname$IFS- Inter Field Separator$LANG- System Language$PATH- Executable Search Path$PS1- Prompt$PWD- Present Working Directory$SHELL- Current Shell$TERM- Current Terminal (character mapping)$UID- User ID$UMASK- Permission mask for new files$USER- Username$LANG-$LS_COLORS-$_-
PS1
Bash colors
# Colors
red='\[\033[00;31m\]'
green='\[\033[00;32m\]'
blue='\[\033[00;36m\]'
white='\[\033[00;39m\]'
# User Prompt
[ $UID != 0 ] && export PS1="\n${green}$ ${white}"
# Root Prompt
[ $UID == 0 ] && export PS1="\n${red}# ${white}"
# Remote Prompt
[ $SSH_CONNECTION ] && export PS1="\n${green}\h $ ${white}"
Commands
Command |
Type |
Description |
|---|---|---|
|
Show all environmental variables |
|
|
run a program in a modified environment |
|
|
maintain symbolic links determining default commands |
|
|
Set environment variable |