What is the Linux command to print the path of an environment variable

0

I am relatively new to Linux.I have to install a library in Ubuntu to be able to use some functions it provides. It seemed to install fine, but gives error when I am testing it, which has led me to believe that I might have made a mistake in setting one of the environment variables for this library($OPENJPEG_DIR). Is there a way to print the path saved in this variable? I tried

ECHO $OPENJPEG_DIR

It did not work. Any help would be appreciated. Thanks in advance.

vayu

Posted 2019-04-04T17:04:32.980

Reputation: 3

What library? How did you install it? – music2myear – 2019-04-04T17:11:08.397

Answers

0

You can use env to print the entire environment, which you could then pipe to grep to find specific variables. Additionally, I noticed that in your question, you tried ECHO $VARIABLE which would probably yield an error because commands are case sensitive, so echo $VARIABLE might work as well.

Kevin Rockwell

Posted 2019-04-04T17:04:32.980

Reputation: 169