Skip to content

Latest commit

 

History

History
26 lines (21 loc) · 632 Bytes

environment-variables.md

File metadata and controls

26 lines (21 loc) · 632 Bytes

environment-variables.md

Environment Variables - Affect process behavior in Linux.

  • Common Environment Variables:

    • $HOME : User's home directory.
    • $PATH : Directories to search for executable files.
    • $USER : Current logged-in user.
    • $SHELL : Default shell for the user.
    • $EDITOR : Default text editor.
  • Setting Environment Variables:

    export VAR=value  # set 'VAR' to 'value'
  • Displaying Environment Variables:

    echo $PATH  # display PATH variable
  • Using Variables:

    export GREETING="Hello"
    echo $GREETING  # outputs: Hello