10 Questions
How can you make an environment variable available to subshells?
Using the export command
How are environment variables set manually?
Using the equal-sign assignment operator
What does $HOSTNAME conventionally hold?
The computer's name
How can you refer to an environment variable on a bash command line?
Using the echo command
How can you combine setting an environment variable and making it available to subshells into one line?
$ HOSTNAME=carson.example.com ; export HOSTNAME
What do environment variables provide the means to pass to programs launched from a shell or a subshell?
Named data (variables)
How is an environment variable set manually?
Via an equal-sign assignment operator
What command is used to make an environment variable available to subshells?
export
What is a subshell?
A child process created by either the shell or a shell script when a program is initiated
What conventionally holds the computer’s name, such as carson.example.com?
$HOSTNAME
Test your knowledge about environment variables and their usage in shell scripting. Learn about how environment variables are used to pass data to programs and how shells rely on them to store important information like computer's name.
Make Your Own Quizzes and Flashcards
Convert your notes into interactive study material.
Get started for free