Embercode
✕
The TerminalQuick quiz

History, PATH and manuals

9 questions. Covers Reading manuals and --help.

Questions 1 to 5 of 9

  1. 1. You press Ctrl+R and type beta. The shell shows echo beta-two. You then press Enter once. What happens?
  2. 2. After Ctrl+R has put an old command on the line, which key combination moves the cursor to the end of the line? Write the key combination.

    Type your answer.

  3. 3. The previous command was apt update. You type sudo !! and press Enter. What does the shell do?
  4. 4. Run this code in bash. What line does it print? ``bash add_path() { [ -d "$1" ] || return 0 case ":$PATH:" in *":$1:"*) ;; *) PATH="$PATH:$1" ;; esac } PATH=/usr/bin:/bin add_path /usr/bin add_path /etc add_path /no-such-folder echo "$PATH" ``
  5. 5. This line is in ~/.bashrc to add ~/bin to PATH. After it, new windows cannot find ls or cat: ``bash PATH=$HOME/bin `` What is the bug?

5 question(s) left on this page.

Typed answers ignore extra spaces and, for most questions, capital letters.