DEV Community

Houda Belhad
Houda Belhad

Posted on

Executing "export" in a terminal!

What happens when you execute export in your terminal?
I'm going to answer this question very simply , with a natural language without using AI because - what the hell is writing with AI !!-
When you execute export your terminal return simply environment variables exported from your current session.

What does it mean an environment variable?
It's an information that your system and programs use to know in which environment it should execute.

  • example:
HOME="/home/houda-belhad"
Enter fullscreen mode Exit fullscreen mode

means your home directory is /home/houda-belhad
Most important variables:
-PATH:

PATH="/home/houda-belhad/.nvm/versions/node/v22.23.2/bin:..."
Enter fullscreen mode Exit fullscreen mode

PATH indicate to your linux OS where to find the executable programs when you type a command.
So when you type node , linux will go find it in your directory of PATH.

  • PWD:
PWD="/home/houda-belhad"
Enter fullscreen mode Exit fullscreen mode

It's your current directory! your terminal was actually there /home/houda-belhad.

  • LANG
LANG="en_US.UTF-8"
Enter fullscreen mode Exit fullscreen mode

it defines the language used by your OS.

That's it , want to stay simple for someone who's discovering Bash and Terminals world for the first time . Follow my posts for more deep informations !!

Top comments (0)