How can I view all current environment variables?

0115

To view all current environment variables in a Linux terminal, you can use one of the following commands:

  1. Using printenv:

    printenv
  2. Using env:

    env
  3. Using set (this also shows shell functions):

    set

These commands will display a list of all environment variables along with their values in your current session. Each variable will be shown in the format VARIABLE_NAME=value.

0 Comments

no data
Be the first to share your comment!