How to display all Environment Variables in Linux

Posted on 7:16 PM by Bharathvn

To display all of the environment variables, in alphabetical order, that are already set for your shell, type the following:

$ set | less
BASH=/bin/bash
COLORS=/etc/DIR_COLORS.xterm
COLUMNS=118
DISPLAY=:0.0
HOME=/home/fcaen
HOSTNAME=einstein

Also, you can concatenate a string to an existing variable:

$ export PATH=$PATH:/home/fcaen

To list your bash’s environment variables:
$ env