Linux Commands Reference - Complete Linux Command Guide

Comprehensive Linux command reference with 150+ commands. Search, filter by category, and view detailed usage examples.

Share
Back to commands

export

Set or display environment variables

Syntax

export [-fn] [NAME[=VALUE]...]

Common Options

-nRemove variable from export list
-fExport shell function
-pDisplay all exported variables
NAME=VALUESet and export variable

Common Examples

export PATH=$PATH:/new/path

Add to PATH

export VAR="value"

Set environment variable

export -p

Show all exported variables

export -n VAR

Unexport variable

export -f myfunc

Export shell function

export JAVA_HOME=/usr/lib/jvm/java-11

Set JAVA_HOME

export LANG=en_US.UTF-8

Set locale

export http_proxy=http://proxy:8080

Set HTTP proxy

Related Tools

More Code & Dev Tools