Linux: Bash Variables Cheat Sheet

# Show enviro­nment variables

env

# Output value of $NAME variable

echo $NAME

# Set $NAME to value

export NAME=value

# Executable search path

$PATH

# Home directory

$HOME

# Current shell

$SHELL

Leave a Reply

Your email address will not be published. Required fields are marked *