Common environment variables in Linux include:
-
PATH: This variable contains a list of directories that the shell searches for executable files. It allows you to run commands without specifying their full path.echo $PATH -
HOME: This variable points to the current user's home directory. It is used to reference user-specific files and directories.echo $HOME -
USER: This variable holds the name of the currently logged-in user.echo $USER -
SHELL: This variable indicates the path to the current user's default shell.echo $SHELL -
LANG: This variable defines the locale and language settings for the system, affecting how programs display text.echo $LANG -
PWD: This variable represents the current working directory.echo $PWD -
EDITOR: This variable specifies the default text editor used by command-line applications.echo $EDITOR
These environment variables are crucial for configuring user sessions and controlling the behavior of various applications and scripts. If you have any specific questions about these variables or need further details, feel free to ask!
