Advanced · Let commands collaborate
printenv: Output the value of the environment variable
Syntax
printenv [variable name...]Examples
printenv HOMEUsage and sandbox support
When viewing a single variable, the variable name does not need to be output.
Hands-on exercises
- Only read the value of HOMEAdvanced
Related commands
echoOutput a piece of textprintfOutput text according to formatteeOutput and save pipeline contentsxargsConvert input into command parametersexportSet environment variablesenvView environment variablesunsetRemove variableshistoryView command historyclearClear the terminal displaytrueReturn success statusfalseReturn failure statusseqGenerate a sequence of numberssleepPause for specified timealiasSet command aliasunaliasRemove command aliassourceRead script in current ShellreadRead variables from inputbashRun the Bash scriptshRun the POSIX Shell scriptcommandControl command lookupjobsView current Shell jobsbgResume background jobfgResume foreground jobwaitWait for child process to endnohupIgnore hangup signal and runtimeoutLimit command running timewatchDisplay command results periodicallytimeMeasure run timeulimitView or set resource limitssetSet Shell behaviortrapHandle exit or signaltmuxManage terminal sessionsscreenKeep terminal session