Introduction to Linux
Question 1:
Which statement(s) is/are true about the Linux Boot Loader:
A. It is executed before Linux
B. It gives us more control on how we boot the system
C. It can be used to select operating systems or kernels
D. All of the above
Answer: D. All of the above
Question 2:
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
B. Running the xstart command from the command-line
C. Running the runX command from the command-line
D. Running the X –begin command from the command-line
Answer: A. Running the startx command from the command-line
Question 3:
To change your desktop background:
A. Edit the desktop-background file
B. Right-click on the desktop, select Change Desktop Background and select a wallpaper
C. Double-click the desktop, select an available wallpaper and click on Save
D. Try a different Linux distribution
Answer: B. Right-click on the desktop, select Change Desktop Background and select a wallpaper
Question 4:
For best coordination between multiple Linux systems, you should set the date and time:
A. Manually as close as possible to each other
B. Manually, but the various systems' time only needs to be synchronized within a few minutes
C. Using the Network Time Protocol (NTP) so that machines are automatically very close to the same time
D. Manually every time you boot the system
Answer: C. Using the Network Time Protocol (NTP) so that machines are automatically very close to the same time
Question 5:
The _________ environment variable lists the directories in which the shell looks for executable programs and scripts.
A. PATH
B. HOME
C. PS1
D. SHELL
Answer: A. PATH
Question 6:
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. chown 660 data
B. chmod 660 data
C. chgrp 670 data
D. chmod 777 data
Answer: B. chmod 660 data
Question 7:
An easy-to-use text-based editor that utilizes on-screen prompts is:
A. edit
B. cat
C. edln
D. nano
Answer: D. nano
Question 8:
The command-mode keystroke _______ within vi will delete the characters from the cursor to the end of the word.
A. D
B. dw
C. d$
D. rl
Answer: C. d$
Question 9:
Encrypted account passwords are found in the file _________ and are typically encrypted using the _________ algorithm.
A. ∕etc ∕passwd; SHA-512
B. ∕etc ∕password; SSH-512
C. ∕etc ∕shadow; SHA-512
D. ∕etc ∕shadow; HASH-256
Answer: C. ∕etc ∕shadow; SHA-512
Question 10:
The root account:
A. Has authority over the entire system
B. Requires extreme caution when using because small mistakes can lead to disasters
C. Should be used carefully; think before pressing the Enter key and run complex commands in a safe way, first, to ensure mistakes aren’t made
D. All of the above
Answer: D. All of the above
Question 11:
IP addresses are divided into two parts:
A. Address and octets
B. TCP and IP
C. Network and host
D. Class A and B
Answer: C. Network and host
Question 12:
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. nslookup
B. ip addr show
C. dig
D. ping
Answer: D. ping
Question 13:
How would you use sed to replace all the occurrences of the word "tiger" with "lion" in the file named "data"?
A. sed ‘s/tiger/lion/’ data
B. sed ‘s/lion/tiger/’ data
C. sed -i ‘s/tiger/lion/g’ data
D. sed –i ‘r/lion/tiger/’ data
Answer: C. sed -i ‘s/tiger/lion/g’ data
Question 14:
The command wc –l some_file will print out the number of:
A. lines in some_file
B. words in some_file
C. characters in some_file
D. bytes in some_file
Answer: A. lines in some_file
Question 15:
Which of the following can be used to show which processes are using most of the CPU or memory resources on your system?
A. most
B. big
C. lots
D. top
Answer: D. top
Question 16:
Why should we use shell scripts?
A. They combine long, possibly repetitive commands into one simple command
B. They allow you to create new commands and share these procedures among several users
C. They automate tasks and reduce the risk of errors
D. All of the above
Answer: D. All of the above
Question 17:
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
B. if [ RESPONSE = "yes" ) ; then
C. if [ $RESPONSE == "yes" ] ; then
D. if ( RESPONSE = "yes" ) ; then
Answer: C. if [ $RESPONSE == "yes" ] ; then
Question 18:
Your shell script needs to test to see if a directory, document, exists; a way to do this is:
A. [ -h document ]
B. [ document –gt 0 ]
C. [ -d document ]
D. [ -s document ]
Answer: C. [ -d document ]
Question 19:
Which of the following could you use to check the status of all your printers?
A. status –a
B. lp status –all
C. lprm my-printers
D. lpstat –a
Answer: D. lpstat –a
Question 20:
The ssh command provides a way to:
A. Exit your login shell cleanly
B. Silently copy files from one directory to another
C. Connect securely to remote systems
D. Check the process status of your shell
Answer: C. Connect securely to remote systems
0 Comments