Linux Final Exam

Grade: 100 %

Q: The kernel is defined as:
A: The glue between the hardware and applications

Q: Which statements are true about the Linux Boot Loader:
A: All of the above

Q: If the display manager is not started by default in the default runlevel, you can start the X-Window System by:
A: Running the startx command from the command-line

Q: To change your desktop background:
A: Right-click on the desktop, select Change Desktop Background and select a wallpaper

Q: For best coordination between multiple Linux systems, you should set the date and time:
A: Using the Network Time Protocol (NTP) so that machines are automatically very close to the same time

Q: Display settings allow you to change things like:
A: Screen resolution and multiple screens configuration

Q: One of the reasons you should learn text mode operations is:
A: Your server may not have the overhead for a graphical user interface (GUI)

Q: To move around the file system tree from one directory to another you can use:
A: cd

Q: To remove a directory named data and all of its files, including sub-directories, in that directory, use:
A: rm –rf data

Q: The Linux manual pages can be read using:
A: man

Q: Many programs have built-in help; to access this, use:
A: The -h or --help option

Q: Which of the following compares two files line by line and reports differences?
A: diff

Q: Which of the following is useful for creating a backup of a disk Master Boot Record (MBR)?
A: dd

Q: In order to execute a Linux command as the root user, what should you prefix it with?
A: sudo command (as in sudo ls /etc)

Q: The_________environment variable lists the directories in which the shell looks for executable programs and scripts.
A: $PATH

Q: Which command is used to set the Linux file permissions to make the file named data, readable and writable by the owner and group owner of the file, but not accessible by any others?
A: chmod 660 data

Q: An easy to use text-based editor that utilizes on-screen prompts is:
A: nano

Q: The command-mode key stroke(s)______within vi will delete the characters from the cursor to the end of the word.
A: dw

Q: Encrypted account passwords are found in the file,_________, and are typically encrypted using the__________algorithm.
A: /etc/shadow; SHA-512

Q: The root account:
A: All of the above

Q: IP addresses are divided into two parts:
A: Network and host

Q: To confirm that a remote host is online and responding and to measure network latency between machines at the same time , one can use:
A: ping

Q: How would you use sed to replace all the occurrences of the word "tiger" with "lion" in the file named data?
A: sed -i 's/tiger/lion/g' data

Q: The command "wc –l data" will print out the number of :
A: lines in the file data

Q: Which of following could you use to check the status of all your printers?
A: lpstat –a

Q: Why should we use shell scripts?
A: All of the above

Q: Your shell script uses an "if" statement to see if the word "yes" was entered. This "if" statement looks like:
A: if [ $RESPONSE == "yes" ] ; then

Q: Your shell script needs to test to see if a directory, document, exists; a way to do this is:
A: [ -d document ]

Q: Which of the following can be used to show which processes are using most of the CPU or memory resources on your system:
A: top

Q: The ssh command provides a way to:
A: Connect securely to remote systems