Shared Flashcard Set

Details

Linux
shell variables
17
Computer Science
Professional
07/12/2007

Additional Computer Science Flashcards

 


 

Cards

Term
what is a variable?
Definition
a bit of information that informs the system of configuration details
Term
what is an environmental variable?
Definition
a variable set by the system
Term
what is a user-defined variable?
Definition
is a variable you can set
Term
what is the command to see a list of variables and their values?
Definition
set
Term
what command do you use to see the value of the PATH variable?
Definition
echo $PATH
Term
what command do you use to see the syntax of the prompt?
Definition
echo $PS1
Term
how do you change the prompt to say "Hello"?
Definition
PS1="Hello"
Term
how do you view the contents of the HOME variable?
Definition
echo $HOME
Term
how do you change the contents of the HOME variable to /etc?
Definition
HOME=/etc
Term
what variable stores the user's current location in the directory tree?
Definition
PWD
Term
how do you view the contents of the PATH variable?
Definition
echo $PATH
Term
how do you create a user-defined variable called RON that has "Hello" in it?
Definition
RON="Hello"
Term
how do you view the contents of the RON variable?
Definition
echo $RON
Term
are your local user-defined variables available to shell scripts by default?
Definition
No, shell scripts open in a subshell
Term
what command allows you to make your variables available to shell scripts and programs?
Definition
export command
Term
what command lists all of the exported variables?
Definition
env command
Term
how can you create a variable called BOB with "Bye" in it and export it on one command?
Definition
export BOB="Bye"
Supporting users have an ad free experience!