Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Linux Operating System: Exam Questions and Answers, Exams of Information Technology

A comprehensive set of exam questions and answers covering various aspects of the linux operating system. It delves into fundamental concepts, commands, and functionalities, offering valuable insights for students and professionals seeking to enhance their linux knowledge. The questions are designed to test understanding of core linux principles, including file systems, permissions, commands, and system administration tasks.

Typology: Exams

2024/2025

Available from 11/02/2024

Exemplary
Exemplary šŸ‡ŗšŸ‡ø

3.7

(3)

232 documents

1 / 23

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Yo u w or k at a la w f ir m wi t h ei g ht ot h er p eo p le . A l l of t he e i gh t co m pu te rs on
the firm's network use wireless connections to communicate with one another
without a server. This is an example of which of the following?
-a mainframe computer
-a desktop PC
-a server
-a workstation
On which of the following types of computers might you find a UNIX or Linux
operating system? (Choose all that apply.)
Press the up key one time.
You're in a hurry and have just executed a command to print the contents of a
file; and you decide you want another copy of the printout. What key sequence
can you use to repeat the last command, which was used to print the file?
Date -u
Your international company is scheduling a meeting among managers in
Canada, the United States, Spain, Sweden, and Hong Kong on the basis of
Greenwich Mean Time (GMT). What command enables you to display the
current time in GMT?
The more command enables you to view a file's contents by scrolling down.
How would you describe the purpose of the more command?
Tel net c an be used t o con nect a UNIX , Linu x, or Windows PC to a rem ote
computer.
What is the purpose of Telnet?
NOS 120 MIDTERM EXAM |
ACTUAL EXAM QUESTIONS
AND CORRECT ANSWERS
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17

Partial preview of the text

Download Linux Operating System: Exam Questions and Answers and more Exams Information Technology in PDF only on Docsity!

You work at a law firm with eight other people. All of the eight computers on the firm's network use wireless connections to communicate with one another without a server. This is an example of which of the following?

  • a mainframe computer
  • a desktop PC
  • a server
  • a workstation On which of the following types of computers might you find a UNIX or Linux operating system? (Choose all that apply.) Press the up key one time. You're in a hurry and have just executed a command to print the contents of a file; and you decide you want another copy of the printout. What key sequence can you use to repeat the last command, which was used to print the file? Date - u Your international company is scheduling a meeting among managers in Canada, the United States, Spain, Sweden, and Hong Kong on the basis of Greenwich Mean Time (GMT). What command enables you to display the current time in GMT? The more command enables you to view a file's contents by scrolling down. How would you describe the purpose of the more command? Telnet can be used to connect a UNIX, Linux, or Windows PC to a remote computer. What is the purpose of Telnet?

NOS 120 MIDTERM EXAM |

ACTUAL EXAM QUESTIONS

AND CORRECT ANSWERS

Linux is case sensitive, so to display a calendar you must use the cal command and not Cal. You enter Cal on the command line to view a calendar but only see an error message. Explain why you got the error message. To run more than one command on a single line use the ; (semicolon) character to separate each command. How you can run more than on command on a single line? Linux supports both the UDF and iso9660 file systems for CD and DVD use. Your company is discussing plans to migrate desktop and laptop users to Linux. One concern raised by the users is whether Linux supports the use of CD's and dvds for both work files and for listening to music. Which of the following is an appropriate answer? The second partition on your main disk. You receive a message that you've successfully backed up hda2 on your Linux system. What is hda2? /etc You have purchased a special monitor for your computer and the instructions tell you to make a minor modification to the inittab file. Where would you locate this file on a typical Linux system. Cd You're frantically trying to get ready for a meeting and want to access a file in your home directory, but you are currently working in a public directory open to all users. What command can you enter to instantly go to your home directory?

  • root
  • swap
  • /boot

directory is bramirez. Which of the following commands should you use to display the contents of the accounting directory? Cp - u It's late and you have been working all day to finish a report. Before you go home, you want to copy several files, including your report file. What copy command should you use to ensure that you don't inadvertently copy an older report file over the newer report file you've been working on for the last four hours?

  • NTFS
  • vfat
  • ufs
  • ext Which of the following are files systems supported by UNIX and Linux operating systems? The very first character in the line for an entry will be "d" for directory or "-" for an ordinary file. You are helping a friend who is new to Linux. You want to determine which entries under her home directory are directories instead of files. When you perform a long listing of the home directory's contents, what do you use to distinguish a directory from a file? Rm - i Your boss is planning to do some house cleaning by deleting several old files. However, she mentions that she doesn't want to delete an important file inadvertently. What command can she use so that she is prompted to make sure she wants to delete a particular file? /var You are curious about the error and system logs kept by your operating system. In what main directory under the root (/) would you most likely find these logs?

Keep the /lib directory because it holds security information, shared library images, kernel modules and other important files. A friend of yours is trying to make more space on his hard disk drive and is considering deleting the /lib directory because he has heard it mostly contains games that he doesn't use. What is your recommendation?

  • read
  • write
  • execute Which of the following are permissions that can be granted to a file? (Choose all that apply.) Chmod Which of the following commands enable(s) you to set permissions on a directory after you create it? (Choose all that apply.) Ls *.txt You have created many notes to yourself that end in .txt. Which of the following commands enables you to list all of the .txt files in your home directory while you are in the Bash shell? Virtual memory is located on disk, such as in swap space. Where is your virtual memory located? Owner has read, write, execute; group has execute; others have execute. When you see the permissions rwx--x--x associated with a file, what permissions are granted? The command to view hidden files is ls - a. In the resulting list of files, the hidden files are the files that start with a dot(.) In front of the file name. Your boss wants to use the command to view hidden files and also wants to know how to find them among other files. What do you tell her? Account??

You have forgotten the purpose of the - n option in the cat command. Which of the following can you enter at the Linux command line to find out what the - n option does when used with cat? System V Which of the following is the UNIX distribution originally developed through AT&T Bell Labs? Bash shell Which shell is used by Linux as the default command interpreter? Cat >> Annual_Report You need to type in a line of text to the end of a file called Annual_Report. Which of the following commands enables you to add the text? Log in remotely to another computer on a network. SSH can be used to ___________________. The administrative account that has complete access to UNIX/Linux system. This is your first day on the job as a Linux server administrator and your boss gives you the password for root. What is root? Tail - n 2 project In your document files, you often put the date you created the file and the date you last modified it in the last two lines of the file. What command can you use to look at only the last two lines of the file called, project? Q You are working with a new colleague who has entered the man command, but who does not know how to end the man session to return to the regular command prompt. What keystrokes do you show your colleague to end the man session? (Choose the best option .)

  • less
  • cat Which of the following are examples of Linux distributions? (Choose all that apply.)

The current logged in user When you enter the who command, what information do you see? (Choose all that apply.) Clear You have been entering lots of commands and now your terminal window is cluttered will all kinds of activity. What command can you use to clear your window of the clutter? Use a GUI menu option to log out or enter an appropriate command for the shell you are using. Such as exit or logout (if there is no GUI desktop in use). You share a Linux computer with a coworker. What is the best way to exit your UNIX or Linux session when you are done? Peer-to-peer network. You can use the _____ command to turn on word wrap feature in Emacs. False Emacs is a modal editor. (T/F) Emacs UNIX/Linux normally include two editors: vi and _____. Alt + < The _____ Emacs command is used to move the cursor to the beginning of the file. A period (.) You are using vi to edit a file and have just entered 12 new lines. You need to replicate the same 12 lines right after you entered them. What command-mode command can you type to replicate the lines?

  • Press the left arrow key
  • Press h Which of the following enables you to move the cursor to the left while you are in command mode in the vi editor? Enter vi and the filename, such as "vi myfile".

While working in the Emacs editor, you delete a section of text and then decide to undo your deletion. Which of the following commands should you use? Use Ctrl+Spacebar to mark the beginning of the text and Alt+w to mark the end as well as to copy the text. When you copy text in Emacs, you must mark the text you want to copy by using which of the following commands? Press Ctrl+s You've used Emacs to write advertising copy about a new software product your company has developed. Now you find out that the name of the product has been changed slightly. What command can you use to track down all references to the old name so you can locate them? From command mode, enter :set number You are using the vi editor to create a list of tasks on each line and you would like an easy way to number each line (task) listed in the file. Which of the following is an easy solution? Press Ctrl+g while in command mode. How can you find out information about the status of an editing session while in the vi editor? (Choose all that apply.) Command mode :wq Command mode:ZZ Command mode:x You have been working on a long vi text file and now you've got to rush off to a meeting. How can you quickly save your work and exit the vi editor? (Choose all that apply.) Command mode, type/receive and press Enter While editing a file in vi, you realize you have been spelling the word receive as recieve. How can you find all occurrences of your misspelled receive? (Choose all that apply.)

It changes all instances of capitol to capital. As you look over the shoulder of an employee who is using the vi editor, you see her use the command :1,$s/capitol/capital. What does this command do? Ctrl+x,Ctrl+s is a command sequence that saves your file, but it does not cause Emacs to close. You have just pressed Ctrl+x,Ctrl+s in the Emacs editor thinking that this will exit Emacs, but it seems like nothing has happened. What is the problem? Alt+< You've just finished entering a one-page memo in Emacs and now want to quickly go to the beginning so you can reread it. What command enables you to quickly go to the beginning?

  • Options
  • Edit
  • Buffers Which of the following are menus that you would find on the menu bar in Emacs? (Choose all that apply.) Ctrl+h Which of the following commands enables you to use online help in Emacs?
  • From command mode, enter :help
  • From the regular command line outside of vi, enter man vi. How can you get help for using the vi editor? (Choose all that apply.) American Standard Code for Information Interchange What is the name of a standardized bit pattern for characters and numbers that is used by most computer operating systems? Compiling is a process of translating a program file into machine-readable language What is the process called compiling? Editor type :!Lpr filename and press Enter How can you print a file while you are in the vi editor?

do you use? Cut - f2 personnel You have a personnel file that contains the names, addresses, and telephone numbers of all employees. The first field in the personnel file is the employee number and the second field is the employee last name. The third field is the first name and middle initial. Because there are no employees with the same last name, you want to check the file by last name to make certain all employees are included. Which of the following commands should you use? Rmdir You are doing some "house cleaning" and want to delete several empty directories. Which of the following commands can you use? (Choose all that apply.) Enter sort - t: +5 datastore 2> error You are trying to use the command sort - t: +5 datastore, but you get an error message each time you try it. How can you save the error message in a file called error, so you can e-mail the file to your computer support person? Cp AR2008 AR2008.bak Which of the following commands would you use to make a backup copy of the file AR2008? Find - name supplemental You have a lot of sub directories under your home directory and know that you saved

the file supplemental in one of them, but you are not sure which one. After you use cd to change to your home directory, which of the following commands enables you to search all of your sub directories for the file? ./sum_report You have created a script file called sum_report in your home directory and have made it executable. What command do you use to run the script? Stdout Standard output is referred to as which of the following? The two files must have a common field, such as last name. Which of the following conditions must be met for you to combine two files using the join command? (Choose all that apply.) Sort vendor_name Which of the following commands can you use to sort the file vendor_name and display the results on the screen?

  • d: When you use the paste command, columns of information are separated by a tab. However, your boss wants the columns separated by a colon. What option enables you to specify the colon as the separator? Cut - f1,7 addresses You are examining your addresses file, which contains the first and last names of people you know as well as their street address, city, state, zip code, and telephone number. You want to print a list of last names, which is field 1, and telephone numbers, which is field 7. Which of the following commands enables you to print this list?

Create a command that sorts on the second field in the file addresses and then writes the sorted results to the new file, sorted_addresses. Cp spreadsheets/* accounts Create a command that enables you to copy all of the files in the spreadsheets directory to the accounts directory (when both directories are first-level directories under your home directory and you are currently in your home directory). (Choose all that apply.) You see two columns side-by-side on the screen. The left column lists the strings and the right column lists the music books. You play guitar and keep two files on your computer. One file, called strings, lists the different brands of strings you keep on hand. Another file, called music, lists the music books and scores you own. When you enter the command paste strings music, what happens? Grep "data is" /assignments/data_sources You have just finished a 25-page paper that you have written using Emacs.The file containing the paper is called /assignments/data_sources. After your instructor has briefly looked at the paper, she recommends that you change all instances of the reference "data is" to "data are" before you submit it.Which of the following commands can you use to locate these references in the file for a quick assessment of how much you have to change? Wc - w/ assignments/data-sources You are interested in determining the number of words in your /assignments/ data_sources file mentioned in Question 1. Which of the following commands should you use?

  • sed
  • pr
  • join
  • paste

Which of the following are examples of manipulation and transformation commands? (Choose all that apply.) It redirects the output of one command to the input of another command Which of the following is true of the pipe operator? (Choose all that apply.) Uniq Because the data was formatted the same in two inventory files, you decided to combine their contents into one file. Now you want to determine if there are duplicate entries on consecutive lines in the new file.Which of the following commands enables you to find the duplicate entries? It is necessary to specify two files when you use the comm command Your friend is using the command comm entryfile, but is getting an error message. What is the problem? (Choose all that apply.) Tr "-" ":" < customers Your boss is trying to import the customers file into her spreadsheet program, but the data goes into the spreadsheet incorrectly.This is because the fields are separated by dashes (-) and the spreadsheet program requires the fields to be separated by colons (:).Which of the following commands can you use to convert the customers file? With a common or key field How can you link multiple files to manipulate the data in those files? Sh While in the Bash shell, you have written a simple script file and now want to execute the script. Which of the following commands enables you to run the script?

  • r You are using the grep command, but it is only searching through files in your immediate home directory.What option enables you to search through subdirectories below your home directory?

When you use the pr command how can you limit the output to only a screen full of text to view. (Choose all that apply.) A data field When you use the Awk printf capability, what does the dollar sign ($) represent? Tr - d "difficult" < motivate Your boss is trying to delete the word "difficult" as it appears in a text file containing his speech about motivation. The name of the file is motivate. When he decides to use the tr command to delete this word, it instead deletes characters throughout the text.Which of the following commands is he likely to have used? 10 lines When you enter the command grep Linux /info/Linux_ features | head, what is the maximum number of lines that will be displayed?

  • comm
  • cut
  • diff
  • grep List four examples of selection commands. First_command | second_command What is the general format using the pipe operator
  • The sed command can be used to edit the contents of one or more files. Briefly explain what you can accomplish with the sed command This format enables you to sort the file, such as by last name. You want to create a file of your friends' and relatives' names, addresses, telephone numbers, and other information.When you mention this to your sister- in-law, she recommends having separate fields for the first, middle, and last names. Briefly explain why this is a good idea. Alt + d

In the Linux Bash shell, the ____ key combination deletes a word or consecutive characters. 32 Fedora, Red Hat Enterprise Linux, SUSE, and Knoppix, recognize up to ____ characters in your user name. Multitasking UNIX and Linux are ____ systems, which allow one user to execute more than one program at a time. 10 The head and tail commands, allow you to view the first few or last lines of a file (____ lines by default). Ctrl + k In the Linux bash shell, the ___ key combination deletes the content of the command line from the current cursor position to the end of the command line. Date The UNIX/Linux _____ command displays the system date, which the system admin maintains. POSIX Currently, the ___ project, a joint effort of experts from industry, academia and government is working to standardize UNIX Bash Linux uses the freeware ____ shell as its default command interpreter. True The command cd source uses relative path addressing (T/F) Swap The partition acts like an extension of memory, so that UNIX/Linux have more room to run large programs. Hot fixes