How to list all variables?

0131

To list all variables in a Linux environment, you can use the set command. This command will display all shell variables and functions. Here’s how to do it:

  1. Open your terminal.

  2. Type the following command and press Enter:

    set
    

This will output a list of all variables and their values.

If you want to list only environment variables, you can use the printenv command:

printenv

Alternatively, you can also use the env command:

env

Both printenv and env will show you the environment variables currently set in your session.

0 Comments

no data
Be the first to share your comment!