Linux Essentials: Third Edition

Ace your homework & exams now with Quizwiz!

Which of the following devices us not commonly attached via USB Video monitors Scanners External hard disks Printers Keyboards

Video monitors

A Linux text-mode login prompt reads _______________ (one word).

login

A common security problem with Windows that is essentially nonexistent on Linux is _____________

virus(es)

While in Vi's command, you can type ______ to undo a change

u

T/F:Some DVR's run Linux

T

A _______________ computer is likely to run a word processor and Web browser.

desktop

Which of the following is an example of an embedded Linux OS?

Android

The _______ command displays the path to the current working directory

pwd

Complete the following command to redirect both standard output and standard error from the bigprog program to the file out.txt. $ bigprog____out.txt

&>

To view all files, including hidden files and directories, in the current directory, you would type ls ___.

-a

You want to copy a file (origfile.txt) to the backups directory, but if a file called origfile.txt exists in the backups directory, you want to go ahead with the copy only if the file in the source location is newer than the one in the backups. The command to do this is cp _____ origfile.txt backups/

-u

ASCII supports _____ unique characters

128

The x86 CPU uses a ____-bit architecture

32

File formats are described in man section _____

5

Which wildcard character matches any ONE symbol in a filename?

?

Where do most log files reside on a Linux computer? A. /var/log B. /etc/logging C. /usr/log D. /home/logging E. /log/usr

A. /var/log

How would you remove two lines of text from a file using Vi? A. In command mode, position the cursor on the first line and type 2dd B. In command mode, position the cursor on the last line and type 2yy C. in insert mode, position the cursor at the start of the first line, hold down the Shift key while pressing the Down arrow key twice, and press the Delete key on the keyboard D. In insert mode, position the cursor at the start of the first line and press Ctrl+K twice E. Select the text with the mouse and then select File > Delete from the menu

A. In command mode, position the cursor on the first line and type 2dd

After using a text editor to create a shell script, what step should you take before trying to use the script by typing its name? A. Set one or more executable B. Copy the script to the /usr/bin/scripts directory C. Compile the script by typing bash scriptname, where scriptname is the script's name D. Run a virus checker on the script to be sure it contains no viruses. E. Run a spell checker on the script to ensure it contains no bugs

A. Set one or more executable

Which of the following commands will print lines from the file world.txt that contain matches to "changes" and "changed"? A. grep change[ds] world.txt B. tar change[d-s] world.txt C. find "change'd|s' " world.txt D. cat world.txt changes changed E. find change[^ds] world.txt

A. grep change[ds] world.txt

What is the usual name for the first process that the Linux kernel runs, aside from itself? A. init B. bash C. cron D. login E. grub

A. init

How can you run a program in the background when launching it from a shell? (Select all that apply.) Launch the program normally, type Ctrl+Z in the shell, and then type fg in the shell. Launch the program by typing bg command, where the command is the command you want to run. Append an ampersand (&) to the end of the command line. Launch the program by typing start command, where the command is the command you want to run. Launch the program normally, type Ctrl+Z in the shell, and then type bg in the shell

Append an ampersand (&) to the end of the command line. Launch the program normally, type Ctrl+Z in the shell, and then type bg in the shell

Which keystrokes invoke the pico or nano search function? A. F3 B. F6 C. Esc-S D. Ctrl+F E. Ctrl+W

B. F6 E. Ctrl+W

Which of the following is a notable difference between Linux and Mac OS X? A. Linux can run common GNU programs, whereas OS X cannot. B. Linux's GUI is based on the X Window System, whereas OS X's is not. C. Linux cannot run on Apple Macintosh hardware, whereas OS X can run only on Apple hardware. D. Linux relies relies heavily on BSD software, whereas OS X uses no BSD software. E. Linux supports text-mode commands, but OS X is a GUI-focused OS.

B. Linux's GUI is based on the X Window System, whereas OS X's is not.

In which of the following languages was most of the Linux kernel written? C Bash shell script C++ Perl Java

C

Which of the following is not a function of the Linux kernel? A. Allocating memory for use by programs B. Allocating CPU time for use by programs C. Creating menus in GUI programs D. Controlling access to the hard disk E. Enabling programs to use the network

C. Creating menus in GUI programs

Describe the effect of the following short script, cp1, if it's called as cpl big.c big.cc: #!/bin/bash A. It has the same effect as the cp command-copying the contents of big.c to big.cc B. It compiles the C program big.c and calls the result big.cc C. It copies the contents of big.cc to big.c, eliminating the old big.c D. It converts the C program big.c into C++ program called big.cc E. The script's first line is invalid, so it won't work

C. It copies the contents of big.cc to big.c, eliminating the old big.c

A user types "whatis less". What type of document output can be expected? A. A short one-paragraph description of the purpose of the less command B. The complete path to the less command in the Linux filesystem C. Summary information from man pages whose Name sections mention less D. The complete man page for less, which you would then scroll through with your terminal E. The URLs for Web sites with information on the less command

C. Summary information from man pages whose Name sections mention less

An organization devoted to promoting open source-like principles in fields such as video and audio recordings is the ________________.

Creative Commons

What keystroke moves the cursor to the start of the line when typing a command in Bash? Ctrl+E Left arrow Ctrl+T Ctrl+A Up arrow

Ctrl+A

Three keystrokes that can initiate a search-and-replace operation in nano are F14, ____, and ______

Ctrl+\ and Esc-R

Which type of file is nano LEAST likely to be useful for examining or editing? A. a /var/log/messages log file B. An HTML Web page file C. An e-mail message saved from an e-mail D. A LibreOffice word processing document E. An /etc/X11/xorg.conf configuration file

D. A LibreOffice word processing document

What type of multitasking does Linux use? A. Single-user B. Co-operative C. Multi-user D. Preemptive E. Single-tasking

D. Preemptive

Which of the following programs is most likely to be installed and regularly used on a desktop computer that runs Linux? BIND Android Postfix Evolution Apache

Evolution

Which of the following is a characteristic of all open source software? A. The software was originally written at a college or university. B. The software must be written in an interpreted language that requires no compilation. C. It must be distributed with both source code and binaries. D. Users are permitted to redistribute altered versions of the original software. E. The software cannot be sold for a profit; it must be distributed free of charge.

D. Users are permitted to redistribute altered versions of the original software

Which of the following commands is an improved version of more? A. grep B. html C. cat D. less E. man

D. less

Which of the following statements is a fair comparison of man pages to HOWTO documents? A. man pages require Internet access to read; HOWTOs do not B. man pages are a type of printed documentation; HOWTOs are electronic C. man pages describe software from a user's point of view; HOWTOs are programmers' documents D. man pages are brief reference documents; HOWTOs are tutorial in nature E. man pages use hyperlinked format, whereas HOWTOs do not

D. man pages are brief reference documents; HOWTOs are tutorial in nature

You've received a tarball called data79.tar from a colleague, but you want to check the names of the files it contains before extracting them. Which of the following commands would you use to do this? A. tar uvf data79.tar B. tar cvf data79.tar C. tar xvf data79.tar D. tar tvf data79.tar E. tar Avf data79.tar

D. tar tvf data79.tar

The ______________ standard is a modern video interface that is commonly used on computer monitors.

DVI

Which of the following redirection operators appends a program's standard output to an existing file, without overwriting that file's original contents? A. | B. 2> C. &> D. > E. >>

E. >>

Which of the following tools is best suited to installing a software package and all its dependencies on a Debian computer? A. yum B. zypper C. dmesg D. rpm E. apt-get

E. apt-get

T/F: If you log into a Linux system in graphical mode, you cannot use text-mode commands in that session.

F

T/F: The Linux kernel is derived from the BSD kernel.

F

T/F: VMS was a common OS on x86 PC's at the time Linux was created.

F

Because their hardware designs are proprietary, hardware vendors cannot release open source drivers for their products. True False

False

T/F: GUI text editors for ASCII are superior to text-mode ASCII text editors because the GUI editors support underlining, italics, and multiple fonts

False

T/F: To compress files archived with zip, you must use an external compression such as gzip or bzip2 in a pipeline with zip

False

T/F: Unicode is useful for encoding most European languages, but not most Asian languages

False

T/F: info pages are a Web'based documentation format

False

The -r option to ls creates a recursive directory listing True False

False

The Alt+F2 keystroke, typed in X, brings up a text-mode display you can use to log into Linux. True False

False

UDF is a good filesystem to use for a Linux installation on a hard disk. True False

False

You can easily damage your Linux installation by mistyping an rm command when you log into your regular account. True False

False

T/F: Linux documentation in the /usr/share/doc directory tree almost always in OpenDocment Text format

False (his quiz said True, but the book said False)

Which of the following are Linux desktop environments? (Select all that apply) GNOME Evolution Xfce GTK+ KDE

GNOME, Xfce, KDE

Which of the following commands provides the most information about your motherboard's features? http://localhost:631 lspci Xorg -configure lscpu fdisk -l /dev/sda

Isspci

You type mkdir one/two/three and receive an error message that reads, in part, No such file or directory. What can you do to overcome this problem? (Select all apply) Issue three separate mkdir commands: mkdir one, mkdir one/two. and then mkdir one/two/three The rm -r one to clear away the interfering base of the desired new directory tree. Add the --parents parameter to mkdir command type touch /bin/mkdir to be sure the mkdir program file exists.

Issue three separate mkdir commands: mkdir one, mkdir one/two. and then mkdir one/two/three Add the --parents parameter to mkdir command

A license created by the FSF and often used for libraries is the ______________.

LGPL

If you want to enable one Linux computer to access files stored on another Linux computer's hard disk, which of the following network protocols is the best choice? NFS PHP DNS SMTP DHCP

NFS

You want to copy a directory, MyFiles, to a USB flash drive that uses the FAT filesystem. The contents of MyFiles are as follows: $ ls -l MyFIles/ total 276 -rw-r--r-- 1 jen users 129840 Nov 8 15:13 contract.odt -rw-r--r-- 1 rod users 42667 Nov 8 15:12 outline.pdf -rw-r--r-- 1 sam users 105979 Nov 8 15:12 Outline.PDF The USB flash drive is mounted at /media/usb, and so you type cp -a MyFiles/ /media/usb. What problem will occur when you attempt to copy these files? One file's name will be changed during the copy. The command will fail because it tries to create links. On file will be missing on the USB flash dr The MyFIles directory will be copied, but none of its files will be copied Everything will be fine; the command will work correctly.

On file will be missing on the USB flash dr

A Linux server that handles the SMB/CIFS protocol normally runs the _____________ software.

Samba

Which is true of Linux distributions as a whole Sometimes, they may not be copied because of non-open source software they may contain. They may be copied only after software using the MFT license is removed. They all completely conform to the principles of the open source movement. They all qualify as free software, as the FSF uses the term. They're covered by the GPL or the BSD license, depending on the distribution.

Sometimes, they may not be copied because of non-open source software they may contain.

T/F: A Linux computer being used as a server generally does not require X.

T

T/F: CentOS is a Linux distribution with a long release cycle

T

Which of the following is NOT required in order to be certified as open source? The license must require that changes be distributed under the same license. The license must not discriminate against people or groups of people. The license must automatically apply to anybody who acquires the software. The program must come with source code, or the author must make it readily available on the Internet. The license must not require that the software be distributed as part of a specific product.

The license must require that changes be distributed under the same license.

Why might you want to partition a hard disk? (Select all that apply.) To install more then one OS on the disk. To separate filesystem data from swap space To use ext4fs rather then ReiserFS To turn a PATA disk into an SATA disk. To separate the disk's cache from its main data.

To install more then one OS on the disk. To separate filesystem data from swap space

An EM64T CPU is capable of running a Linux distribution identified as being for the AMD64 CPU. True False

True

Copyright law governs the distribution of software in most countries. True False

True

OpenOffice.org and LibreOffice are very similar office suites True False

True

Python is generally implemented as an interpreted language. True False

True

Servers can be disrupted by malicious outsiders even if the computer that runs them is never broken into. True False

True

T/F: By default, the first process listed in top is currently consuming the most CPU time.

True

T/F: Many (but not all) configuration files use a hash mark (#) to identify comment lines

True

T/F: The dmesg command may produce different output after a computer has been running for weeks after it first started

True

T/F: The find command enables you to locate files based on their sizes

True

T/F: The regular expression Linu[^x].*lds matches the string Linus Torvalds

True

T/F: When using suitable commands, you can normally install a program and be sure that all the software on which it depends will also be installed, provided you have an Internet connection

True

T/F: You can force man to display a man page in a specific section of the manual by preceding the search name with the section number, as in "man 5 passwd"

True

The FSF's free software definition and the OSI's ten principles of open source software both require that users have the ability to examine a program's workings---that is, its source code. True False

True

The Linux kernel includes drivers for various disk controllers, network adapters, and USB interfaces, among other things. True False

True

You can create a symbolic link from one low-level filesystem to another. True False

True

You can set a directory's time stamps with the touch command True False

True

Which of the following is a key part of the FSF's philosophy? Developers should use the latest version of the FSF's GPL. Users must have the right to use software as they see fit. Developers should write software only for free operating systems such as GNU/Linux. Users should have the right to modify free software and distribute it under a commercial license. Users should engage in civil disobedience by copying proprietary software.

Users must have the right to use software as they see fit.

The character that represents the start of a line in a regular expression is ______

^

Pre-release software that's likely to contain bugs is known as alpha and ___________.

beta

The ________ command displays text files or can concatenate multiple files together.

cat

Which of the following commands, typed at a Bash prompt, returns you to your home directory? cd ~ home homedir cd /home

cd ~

You're using bash, and you type "emacs" to launch the editor. In this case, emacs is bash's _____

child

A program written in a(n)____________ programming language is completely converted to the binary form before being run.

compiled

The FSF's general principles are summarized by the term ____________ , which refers to using copyright laws for the purposes that are in some ways contrary to copyright's original intent.

copyleft

A computer power supply converts electricity from alternating current to _______________ . (Two words)

direct current

Thunderbird is a(n) ____________ program. (Specify the general category of the software)

email client

The ________ command searches a database of filenames, enabling you to quickly identify files whose names match a term you specify

locate

The gxip, bzip2, and xz programs all perform _______ compression, in which the decompressed data exactly match the original pre-compression data

lossless

Linux uses a ________________ kernel design, as contrasted with a microkernel design.

monolithic

Which of the following commands would you type to rename newfile.txt to afile.txt? cp newfile.txt afile.txt ln newfile.txt afile.txt touch newfile.txt afile.txt mv newfile.txt afile.txt rn newfile.txt afile.txt

mv newfile.txt afile.txt

Each document in an info page is known as a(n)_______

node

Most Linux distributions maintain information on what packages are installed in the ____ _____ (two words)

package database

You've typed rmdir junk to delete the junk directory, but this command has failed because junk contains word processing files. What command might you type to do the job?

rm -R junk

A type of software that is distributed for free but requires payment on the "honor system" if a person uses it is called ____________________.

shareware

General system messages are likely to be found in /var/log/messages or /var/log/_______, depending on your distribiution

syslog


Related study sets

Week 7- Antifungal and Antiviral Agents (Ch 8)

View Set

MH NCLEX Quiz on Addictions/Eating Disorders

View Set

N201 MEDSURG 2: THROMBOCYTOPENIA

View Set

NUR 128 - Labor and Delivery, Ch. 13, 14, 15, 16 -- Ricci, Kyle & Carman Fourth Edition

View Set