Saturday, April 23, 2011

Linux: Get the list of Environment Variables

Share at Facebook

Using the built in linux command, you can get all your Environment variables easily. The command is,

[root]# env

You can pipe the sort command with this to get the variables sorted.

[root]# env | sort

Sometime the environment variable list can be large. That case I'll suggest to use the less command with env. This will help you to scroll around.

[root]# env | sort | less

That's it!

No comments: