TEST 1 Flashcards
LPIC
Which of the following does Raspbian Linux run on?
raspberry Pi
Which of the following is an example of embedded Linux?
Android
a customized version of the Linux operating system (OS) that’s designed to run on embedded systems, such as mobile devices, routers, and other Internet of Things (IoT) devices
Which of the following programs on a Linux system could you use as a replacement for Microsoft Word?
Writer
is a well-known word processor that is part of the LibreOffice suite. It can be used to replace just about anything that Microsoft Word can do. While vi and nano are text editors, they are not full-featured word processors like Microsoft Word. Pages is a word processor developed by Apple, and it only works on Mac OS X systems.
Which of the following is an American non-profit organization devoted to expanding the range of creative works available for others to build upon legally and to share?
Creative Commons
is an American non-profit organization devoted to expanding the range of creative works available for others to build upon legally and to share. The organization has released several copyright-licenses, known as Creative Commons licenses, free of charge to the public. These licenses allow creators to communicate which rights they reserve and which rights they waive for recipients or other creators’ benefit.
What is the generic name given to the action of protecting shell meta-characters from being treated specially by the shell?
Quoting
is the generic name given to the action of protecting shell meta-characters from being treated specially by the shell.
Which of the following can be used to represent a single number from 3 to 9?
The range [3-9] is used to represent a single number of either 3, 4, 5, 6, 7, 8, or 9 within a search function.
Which of the following is a valid option for a typical command to get its built-in usage information?
–help
option is used with most commands to provide built-in information on the command’s usage. For more detailed information, info <command></command> or man <command></command> could be used instead.
Which option will cause the echo command NOT to output a trailing newline?
-n
this option of the echo command does not output a trailing newline.
-n Displays the output while omitting the newline after it.
-E The default option. Disables the interpretation of escape characters.
-e Enables the interpretation of escape characters.
Which of the following commands will output a list of all of the file names under your home directory and all subdirectories with file names ending with .pdf?
find ~ -name ‘*.pdf’
To display all of the files with a .pdf extension at the end. This will display all files named *.pdf in the home directory.
What is a set of pages that explain every command available on the system?
man pages
are a set of pages that explain every command available on the system. This includes information on what they do, the specifics of how to execute them, and what command-line arguments or syntax they accept.
Your current present working directory is /home/jason/documents/. You just entered cd .. into the command line and then enter pwd. What output do you receive?
The .. is a special directory reference to the parent of the current present working directory. Using cd .. essentially moves the pwd up a single level to /home/jason.
Which of the following options must be used to remove a directory and its subdirectories?
The rm -r option is used to remove a directory and its files/folders recursively.
-f: Forces the removal of all files or directories.
-i: Prompts for confirmation before removing.
-I: Prompts once before removing more than three files or when removing recursively.
-r: Removes directories and their content recursively.
-d: Removes empty directories.
-v: Provides a verbose output.
What are valid rules in naming a variable?
The name of a variable should only contain letters (a to z or A to Z), numbers ( 0 to 9), or the underscore character ( _). Variables should also always start with a letter.
Consider the following script:
#!/bin/bash ip=`route -n | grep UG | tr -s “ “ | cut -f 2 -d “ “` echo “Checking to see if $ip is up...” ping -c 5 $ip
Which of the following would be the first line displayed to the screen when the script is executed by the user?
The line in the script that starts with the echo command will cause the string, “Checking to see if $ip is up…” will be executed. When this is executed, the value of $ip will be replaced with the result of the command in the second line (which contains route).
What is the proper command to use to compress the file filename.txt into the zip archive called myfile.zip?
zip myfile.zip filename.txt
Which option can be used with tail to print the last 10 lines of a file and then keep printing any new lines that may be added continuously?
-f
this option is used to “follow” the contents of the file. This lets tail print the last 10 lines of a file (usually a log file) and continue to print out new lines to the screen as they are added to the file.
What statement is used to get input from the terminal when a shell script is being run?
read
read command is used to get input from the terminal when using a shell script.
Which command is used to make a shell variable known to subsequently executed programs?
export
this command is used to make a shell variable known to subsequently executed programs. Essentially, the export command creates a globally accessible variable when it is run.
What option can be used with cat to display line numbers with the text of a file to the screen?
-n
this option will show the line numbers next to a file’s contents when displayed to the screen. For example, “cat -n song.txt” will display the contents of the song.txt file with line numbers down the left column of the display.
What is one of the most basic features of a shell script?
Ability to run commands
A shell script is a computer program designed to be run by the shell. Typical operations performed by shell scripts include file manipulation and command execution. The most basic scripts run commands in serial order and do not provide any output back to the screen or seek input from a user.
Which of the following commands will create an archive file, named backup.tar, containing all the files from the directory /home?
tar -cf backup.tar /home
The tar command allows you to quickly access a collection of files and place them into a highly compressed archive file. The -c option creates a new archive while -f uses the given filename as the archive’s filename. Specifying the directory ensures the files to be placed in the archive file come from that folder.
What does HCL mean?
hardware compatibility list
HCL lists tested, compatible, and sometimes incompatible hardware devices for a particular distro.
Which command is used to print the first 10 lines of a file to the display?
Head
this command is the opposite of the tail command. The head command is used to print the first 10 lines of a file. The tail command is used to print the last 10 lines of a file.
What is a daemon?
A daemon is a computer program that runs as a background process rather than under the direct control of an interactive user. Daemons are commonly used for processes that maintain server operations, such as the HTTPD (HTTP daemon) used by Apache to provide web server services to an end-user.
Which of the following is the correct order of a computer’s operation?
(1) The computer waits for user input, (2) The user selects a command and enters it via the keyboard or mouse, (3) The computer executes the command
Which of the following is a requirement of the GPL license but not the BSD license?
Users who modify and distribute the software under the GPL license must make the modifications they made available to the recipients under the same license
The GPL license is copyleft; therefore, users must disclose the source code and make any modified versions of the code open source. Under GPL, users cannot change any of the original license terms or introduce their own. The BSD license family does not compel users to do any of these things and instead has fairly relaxed redistribution terms.
After installing a new package, in which directory are you most likely to find its configuration file?
/etc
The folder which contains all your system configuration files.
Which of the following displays network connections for Transmission Control Protocol, routing tables, and a number of network interface and network protocol statistics?
netstat (SS is superior)
a command that displays network connections for Transmission Control Protocol, routing tables, and a number of network interface and network protocol statistics.
Which of the following is used as a virtual or pseudo filesystem to provide a tree of all of the device nodes and drivers in the running kernel?
The /dev tree contains device nodes, which gives user space access to the device drivers in your OS’s running kernel. All POSIX type OSes have a /dev tree.
Which of the following directories is often used to store log files?
/var
a standard subdirectory of the root directory in Linux contains files to which the system writes data during the course of its operation. /var/log contains log files.