Customizing the shell environment
Lesson 1 of 2 in objective 105. Shells and shell scripting, part of LPIC-1 Exam 102-500.
- Objective
- 105. Shells and shell scripting
- Share of the exam
- 15% (the whole objective)
- Questions in this lesson
- 7
- Signed for by a person
- 0
Partly checked. None of the 7 questions here has been read against the cited source by a person. 7 questions have been checked against their cited clause by an automated pass — which is not the same thing, and is not a signature.
Only questions a person has signed for are used in mock exams here. That is the whole difference between the two kinds of checking above.
Questions in this lesson
- A user logs in at a text console, and bash starts as an interactive login shell. Which file in that user's home directory is read by bash itself as part of login startup? machine-checked
- You are already logged in to a graphical desktop and open a new terminal window, so bash starts as an interactive shell that is not a login shell. Which per-user file does bash read in that case? machine-checked
- An executable script contains only the line `export EDITOR=vim`. After running it as `./setenv.sh`, `echo $EDITOR` in the calling shell prints nothing. What explains this? machine-checked
- In bash, what is the effect of `export MYVAR`? machine-checked
- At a bash prompt you run `alias ll='ls -l'` and it works for the rest of that session, but a terminal window opened afterwards does not recognise `ll`. Which statement explains this and gives the standard remedy? machine-checked
- The file setenv.sh, in the current directory, sets and exports several variables. You are in an interactive bash shell running with default options (not POSIX mode). Which two invocations leave those variables set in that shell after the file has run? (Choose two.) machine-checked
- Which three commands print the current value of the PATH variable to the terminal? (Choose three.) machine-checked
Drill this lesson
A lesson is one sitting: the trainer draws a short run from these questions alone and spaces the ones you get wrong.
Practise Customizing the shell environment
The rest of objective 105
- Customizing the shell environment — you are here
- Writing simple shell scripts