开发者

Env variables on Solaris [closed]

开发者 https://www.devze.com 2023-02-25 06:32 出处:网络
Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed. This question is off-topic. It is not currently accepting answers.

Want to improve this question? Update the question so it's on-topic for Stack Overflow.

Closed 11 years ago.

开发者_开发问答 Improve this question

How do i display all the env variables and value of a particular env variable on a solaris server?


Open up a shell and type env. This will show you all environment variables in the current shell.

Use the name of a specific variable, prefix it with a $ and do echo $name to echo the value of the env variable name.


You can view all environment variables using a shell with

set | more


The way to display environment variables doesn't depends that much one the operating system, as far as Unix and Unix like systems are concerned.

If you want to know the exported variables, i.e. those that are inherited by subprocesses, you can use the export shell builtin/alias or the env command. Otherwise, set is the usual way to display all shell environment variables.

As already answered, for any specific variable, use echo $variable

0

精彩评论

暂无评论...
验证码 换一张
取 消