Skip to main content
Improved readability
Source Link
Fabby
  • 34.4k
  • 39
  • 98
  • 191

For bash: (the standard shell in Ubuntu)

Enter the following command in a terminal to print all the environment variables:

printenv

For further information about this command, read the printenv man page.


To show a list including the "shell variables" you can enter the next command:

( set -o posix ; set ) | less

This will show you not only the shell variables, but the environment variables too.

For more information related with this topic read:


In ZSH useFor zsh: (an advanced shell)

Use the following command which does the same as above:

( setopt posixbuiltin; set; ) | less

For more information about ZSH options, see zshoptions man page.

Enter the following command in a terminal to print all the environment variables:

printenv

For further information about this command, read the printenv man page.


To show a list including the "shell variables" you can enter the next command:

( set -o posix ; set ) | less

This will show you not only the shell variables, but the environment variables too.

For more information related with this topic read:


In ZSH use the following command which does the same as above:

( setopt posixbuiltin; set; ) | less

For more information about ZSH options, see zshoptions man page.

For bash: (the standard shell in Ubuntu)

Enter the following command in a terminal to print all the environment variables:

printenv

For further information about this command, read the printenv man page.


To show a list including the "shell variables" you can enter the next command:

( set -o posix ; set ) | less

This will show you not only the shell variables, but the environment variables too.

For more information related with this topic read:


For zsh: (an advanced shell)

Use the following command:

( setopt posixbuiltin; set; ) | less

For more information about ZSH options, see zshoptions man page.

Enter the following command in a terminal to print all the environment variables:

printenv

For further information about this command, read the printenv man page.


To show a list including the "shell variables" you can enter the next command:

( set -o posix ; set ) | less

This will show you not only the shell variables, but the environment variables too.

For more information related with this topic read:


In ZSH use the following command which does the same as above:

( setopt posixbuiltin; set; ) | less

For more information about ZSH options, see zshoptions man page.

Enter the following command in a terminal to print all the environment variables:

printenv

For further information about this command, read the printenv man page.


To show a list including the "shell variables" you can enter the next command:

( set -o posix ; set ) | less

This will show you not only the shell variables, but the environment variables too.

For more information related with this topic read:

Enter the following command in a terminal to print all the environment variables:

printenv

For further information about this command, read the printenv man page.


To show a list including the "shell variables" you can enter the next command:

( set -o posix ; set ) | less

This will show you not only the shell variables, but the environment variables too.

For more information related with this topic read:


In ZSH use the following command which does the same as above:

( setopt posixbuiltin; set; ) | less

For more information about ZSH options, see zshoptions man page.

replaced http://stackoverflow.com/ with https://stackoverflow.com/
Source Link

Enter the following command in a terminal to print all the environment variables:

printenv

For further information about this command, read the printenv man page.


To show a list including the "shell variables" you can enter the next command:

( set -o posix ; set ) | less

This will show you not only the shell variables, but the environment variables too.

For more information related with this topic read:

Enter the following command in a terminal to print all the environment variables:

printenv

For further information about this command, read the printenv man page.


To show a list including the "shell variables" you can enter the next command:

( set -o posix ; set ) | less

This will show you not only the shell variables, but the environment variables too.

For more information related with this topic read:

Enter the following command in a terminal to print all the environment variables:

printenv

For further information about this command, read the printenv man page.


To show a list including the "shell variables" you can enter the next command:

( set -o posix ; set ) | less

This will show you not only the shell variables, but the environment variables too.

For more information related with this topic read:

replaced http://unix.stackexchange.com/ with https://unix.stackexchange.com/
Source Link
Loading
replaced http://askubuntu.com/ with https://askubuntu.com/
Source Link
Loading
Do not sort as it breaks showing environment variables set to have newline in its value. E.g. COMP_WORDBREAKS
Source Link
Loading
Add link to "environment variable vs. shell variable". Clarify that "your variables" are "shell" vars.
Source Link
Loading
removed obsolete paste ubuntu link
Source Link
Lucio
  • 19k
  • 31
  • 109
  • 190
Loading
added information
Source Link
Lucio
  • 19k
  • 31
  • 109
  • 190
Loading
added information
Source Link
Lucio
  • 19k
  • 31
  • 109
  • 190
Loading
Source Link
Lucio
  • 19k
  • 31
  • 109
  • 190
Loading