Assessment Quizes and correct
answers
Geoff wants to examine the /etc/passwd file to see which shell is currently set as the default for a user.
Since there are quite a few users on the Linux server, he does not want to scroll through many lines
looking for the right account. Which of the following commands could Geoff use to narrow down the
search results? ✔️✔️Correct Ans-grep
Which of the following commands will replace all of the instances of france with the properly
capitalized France in a file named geography and writes the result to a file named newgeography?
✔️✔️Correct Ans-sed s/france/France/ geography < newgeography
Which of the following regular expressions would match the names George, Georgia, and Geoff, but
not Georgio? ✔️✔️Correct Ans-^Geo[aefgir]*
Kay can't remember the exact options that she needs to use with a command. Which of the following
utilities could she use to find which options are available for a command? ✔️✔️Correct Ans-man
What bash command could be used to display the path to the executable of the shell you are currently
using? ✔️✔️Correct Ans-echo $SHELL
Trey has noticed some unusual activity on a Linux server and needs to investigate what has been
occurring. Which of the following directories would provide a good place for Trey to start his
investigation? ✔️✔️Correct Ans-/var/log
Katie is logged into a Linux workstation and issues the cd command and presses enter. She then
issues the pwd command and presses enter. What output does Katie most likely see? ✔️✔️Correct Ans-
/home/katie
Xavier has just made a bunch of changes to a configuration file using the vi editor. However, he
realizes that he doesn't want to save those changes and needs to be able to exit without saving. Which
of the following keystroke combinations could he use to do that? ✔️✔️Correct Ans-:q!
, Tom wants to copy 5 lines and paste them somewhere else in the file. He positions the cursor at the
beginning of the lines that he wants to copy. Which keystroke combination will copy those 5 lines
into memory? ✔️✔️Correct Ans-5yy
Aria has just backed up an old project directory named projectx to a network file server and now
wants to delete the directory and all of its files and subdirectories from her workstation. Which of the
following should Aria run to accomplish this task? ✔️✔️Correct Ans-rm -rf projectx
Which of the following commands will create a new empty file named frogtown.txt? ✔️✔️Correct Ans-
touch frogtown.txt
Sam wants to create a new subdirectory named recipes within his directory. Which of the following
will accomplish this task? ✔️✔️Correct Ans-mkdir ~/recipes
Hannah downloaded a Linux ISO from the Internet last week, but can't seem to remember where she
saved it. Which of the following commands might help determine where the ISO was saved? (Choose
two.) ✔️✔️Correct Ans-find
locate
What command will set the following permissions on the file hobbit.pdf: (choose all that apply)
User: Read, Write, Execute
Group: Read, Execute
Other: Read ✔️✔️Correct Ans-chmod 764 hobbit.pdf
Frodo wants to set a special permission on a binary file so that when the binary is executed, the person
who executed the binary temporarily becomes the owner of the binary file while it is executing.
Which of the following does Frodo need to set? ✔️✔️Correct Ans-SUID
Which of the following commands can be used to change group ownership of a file or directory?
(Choose two.) ✔️✔️Correct Ans-chown
chgrp
Which of the following commands will display an at symbol in addition to the symbolic link?
✔️✔️Correct Ans-ls -F