Test3 Flashcards

1
Q

Which of the following is a Debian-based computer operating system for Raspberry Pi?

A

Raspbian

Raspbian is a Debian-based computer operating system for Raspberry Pi. It is highly optimized for the Raspberry Pi line’s low-performance ARM CPUs.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Which of the following is an open-source relational database management system?

A

MySQL

MySQL is an open-source relational database management system.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What command would you use to get comprehensive documentation about any command in Linux?

A

man command

The man command in Linux is used to display the user manual of any command that we can run on the terminal.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What key do you press to quit reading a man page?

A

Q

When done reading through the man page, use the letter q to quit.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Which command searches manual page names and descriptions for a user-supplied keyword?

A

apropos

The command apropos searches manual page names and descriptions for a user-supplied keyword.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What command should be used to display the permissions for every file in the current directory?

A

ls -la

The command ls -la will provide the long view of the directory listing with all of the information, including the file permissions.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Which keyboard shortcut allows pasting a previously copied highlighted text while working in the command line terminal?

A

CTRL + SHIFT + V

Holding down the CTRL and SHIFT keys and pressing V allows any previously copied highlighted text in the terminal to be pasted. Pressing CTRL + V within the terminal waits for a character press after the V. So pressing CTRL + V + R inserts the letter R to the terminal.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

To see all the variables that are in the user’s environment, use the _______ command.

A

printenv

The printenv command displays the values of environment variables.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Which software handles the installation and removal of software on Debian and Ubuntu?

A

apt

Advanced Package Tool, or APT, is a free software user interface that works with core libraries to handle the installation and removal of software on Debian, Ubuntu, and related Linux distributions.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

In order to rename the directory ~/documents/letters to ~/documents/archive, which of the following commands should be used?

A

mv ~/documents/letters ~/documents/archive

To rename a file in Linux, you utilize the move (mv) command. The command should use the syntax of mv <original_filename> <new_filename). Rename and copy are not valid Linux commands but instead are used in Windows. The cp (copy) command will make a new file with the name “archive”; therefore, it is not the correct answer.</original_filename>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is a pre-integrated, self-contained system made by combining a software application (e.g., server software) with just enough operating system to run optimally on industry-standard hardware or a virtual machine?

A

Virtual appliance

A virtual appliance is a pre-integrated, self-contained system that is made by combining a software application (e.g., server software) with just enough operating system for it to run optimally on industry-standard hardware or a virtual machine. This offers companies several benefits over traditional software applications installed on top of a full operating system.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Which of the following is TRUE about open source software?

A

Open source software is a prominent example of open collaboration

Open-source software is usually developed in a collaborative public manner and is a good example of open collaboration.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Which of the following can you NOT install Linux on?

A

Smartcard

Linux can be installed on just about anything, including desktops/laptops, servers, the cloud, smartphones/tablets, the IoTs, and even a Smart TV. But, Linux cannot be installed on a smartcard since it is a device with extremely limited storage space and no processing power. A smartcard is used as a form of two-factor authentication in corporate networks.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Which command shows all of the directories that the shell searches for programs?

A

echo $PATH

The echo $PATH command shows all the directories used by the shell during a search for a program. By default, anything listed in the $PATH will be looked at by the shell before returning an error that states it cannot find a file’s location.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Where does Linux stores most of its log files in the directory tree?

A

/var/log

Most of the Linux log files are stored in /var/log portion of the directory tree. This is the common log directory for all programs, but some programs keep their log files within their own specialized directories, as well.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Which type of IP addresses uses a dotted-decimal notation?

A

IPv4

IPv4 uses dotted decimal notation, such as 192.168.1.1. IPv6 uses a 128-bit address written as hexadecimal digits separated by colons. MAC addresses are 48-bit addresses written in hexadecimal digits separated by colons.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

In computer networks, what does DHCP stand for?

A

Dynamic Host Configuration Protocol

The DHCP or Dynamic Host Configuration Protocol is a network management protocol where a DHCP server dynamically assigns an IP address and other network configuration parameters to each device on a network to communicate with other IP networks.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

Which information is used by a computer to connect to a typical local area network?

A

IP address

Network administrators assign an IP address to each device connected to a network. An IP address serves two main functions: host or network interface identification and location addressing.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

Which of the following commands can be used to resolve a DNS name to an IP address?

A

host

The host command is used for DNS (Domain Name System) lookup operations. It is used to find the IP address of a particular domain name or the domain name of a particular IP address. Nslookup and dig are also commands that can be used to lookup a domain name and convert it to an IP address within a Linux system.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

What command would you use to create a symbolic link in Linux?

A

ln -s

To create a soft link from the shell, you should use “ln -s <original_file> <link_created>". The soft link is essentially a pointer to the original file, and when the original file is deleted, the soft link does not point to anything, so “no such file or directory” is reported.</link_created></original_file>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

After installing a new package, in which directory are you most likely to find its configuration file?

A

/etc

The /etc folder is where configuration files are usually stored in a Linux system.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

What permissions would be represented by the octal 517?

A

r-x–xrwx

In Linux, you can convert letter permissions to octals by giving 4 for each R, 2 for each W, and 1 for each X. So, R-X is 5, –X is 1, and RWX is 7.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

Where are the passwords stored for users on a Linux system?

A

/etc/shadow

The /etc/shadow file stores the actual password in an encrypted format (more like the hash of the password) for the user’s account with additional properties related to the user password. Basically, it stores secure user account information. All fields are separated by a colon (:) symbol. It contains one entry per line for each user listed in /etc/passwd file.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

What is the limit on the number of user accounts in a single computer in Linux?

A

Unlimited

In Linux, there is virtually no limit to the number of user accounts on a single computer. It is considered to be unlimited.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

What is the output of the following command?

for token in a b c;
do echo -n ${token};
done

A

abc

A token is a sequence of characters that forms a word or punctuation sign. It is made up of ordinary characters or operator characters but not both.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

Which of the following information is provided in the default output of the who command?

A

Username, Terminal Identifier, Login Date and Time

The output of the who command includes Username, Terminal Identifier, Login Date, and Time. The who command displays a list of users who are currently logged into the computer. The who command is related to the command w, which provides the same information but also displays additional data and statistics.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

Which UID is usually used to represent the root user on a Linux system?

A

0

The UID of 0 has a special role: it is always the root account (i.e., the superuser or administrative user). Although the user name can be changed on this account, and additional accounts can be created with the same UID, neither action is recommended since they are considered a poor security practice.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
Q

How would you represent rwxr-xr– in octal notation?

A

754

In Linux, you can convert letter permissions to octal by giving 4 for each R, 2 for each W, and 1 for each X. So, RWX is 7, R-X is 5, and R– is 4.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
26
Q

Which of the following is the dmesg command used for?

A

To show the kernel log messages

The dmesg (display message or driver message) command is a command on most Unix-like operating systems that prints the message buffer of the kernel. The output of this command typically contains the messages produced by the device drivers and serves to show the kernel’s log messages to the screen.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
27
Q

Which of the following software packages is a mail server?

A

Postfix

Postfix is a free and open-source mail transfer agent that routes and delivers electronic mail. Thunderbird is a mail client, Apache is a web server, and GIMP is an image manipulation program.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
28
Q

Which of the following commands creates an archive file work.tar from the contents of the directory ./work/?

A

tar -cf work.tar ./work/

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
29
Q

Which command is used to print the last 10 lines of a file to the display?

A

tail

Tail is a command which prints the last few numbers of lines (10 lines by default) of a certain file, then terminates.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
30
Q

Which command will display the last line of the file document.txt?

A

tail -n 1 document.txt

The tail command with the -n 1 option will show the last line of a file.

31
Q

Which of the following is used to redirect the standard output of a command to a file?

A

1>

To redirect the standard output, 1> is used with a command.

32
Q

Which of the following commands is used to extract files from a zip archive?

A

unzip

Unzip will list, test, or extract files from a ZIP archive, commonly found on Unix systems. The default behavior (with no options) is to extract into the current directory (and subdirectories below it) all files from the specified ZIP archive.

33
Q

Which of the following options is used with tar to display the tar command’s progress during execution?

A

-v

The -v option is used to verbosely show the .tar file progress during execution.

34
Q

Which of the following is used to untar a tar archive file?

A

tar -x

The -x option in tar is used to extract the contents of a tar archive.

35
Q

Which command is used to print one page of text to the screen at a time?

A

less

On Linux systems, less is a command that displays file contents or commands output one page at a time in your terminal. Less is most useful for viewing the content of large files or the results of commands that produce many lines of output. The content displayed by less can be navigated by entering keyboard shortcuts.

36
Q

Which of the following characters in a shell prompt indicates the shell is running with root privileges?

A

#

When the prompt ends in a hashtag/pound sign symbol (#), it indicates the current user has root privileges.

36
Q

Typing $ followed by pressing which key twice, in quick succession, will list all of the variables?

A

TAB

Typing $ followed by TAB TAB in quick succession will list all variables.

37
Q

Which of the following is NOT an example of a Linux software package manager?

A

abc

APT, dpkg, yum, and rpm are all Linux package management systems.

38
Q

Which of the following is NOT one of the core technologies of the World Wide Web?

A

Browser

HTML, CSS, and JavaScript are the core technologies of the World Wide Web. Hypertext Markup Language (HTML) is the standard markup language for documents designed to be displayed in a web browser. Cascading Style Sheets (CSS) is a style sheet language used for describing the presentation of a document written in a markup language like HTML. JavaScript enables interactive web pages and is an essential part of web applications.

39
Q

Which command lists all files in the current directory that start with a capital letter?

A

ls [A-Z]*

To list all the files in the current directory that start with a capital letter, the ls [A-Z]* should be used. The ls command is used to list files, and the [A-Z] tells the command to select a single letter from uppercase A to uppercase Z, and then the * says to use anything else after the single letter.

40
Q

Which option of the command history can be used to clear the user’s history?

A

-c

Using history -c will clear the current users’ history.

41
Q

Which of the following are not man page sections?

A

Mistakes

There is no Mistakes section. Man pages have Name, Configuration, Return Value, and Errors sections.

42
Q

Which symbol is used to prefix a variable?

A

$

The $ symbol identifies variables that need to be expanded in the command line.

43
Q

Which of the following is a series of small single-board computers developed to promote the teaching of basic computer science in schools and developing countries?

A

Raspberry Pi

The Raspberry Pi is a series of small single-board computers that have become popular as educational and recreational computer systems.

44
Q

Which of the following is a suite of client-server software for creating and using file hosting services?

A

ownCloud

ownCloud is a suite of client-server software for creating and using file hosting services. ownCloud functionally has similarities to the widely used Dropbox. The primary functional difference between ownCloud and Dropbox is that ownCloud does not offer data center capacity to host stored files. The Server Edition of ownCloud is free and open-source, thereby allowing anyone to install and operate it without charge on their own private server.

45
Q

Which command launches the web browser Firefox from the command line?

A

firefox

Typing firefox at the command prompt launches the web browser Firefox if it is installed in the system.

45
Q

Your system is having an issue that you think is being caused by a faulty device driver. Which of the following commands should you use to print the message buffer of the kernel?

A

dmesg

The dmesg (display message or driver message) command is a command on most Unix-like operating systems that prints the message buffer of the kernel. The output of this command typically contains the messages produced by the device drivers.

46
Q

Which of the following is the core computer program with complete control over everything in the system?

A

Kernel

The kernel is the central module of an operating system. It is the part of the operating system that loads first, and it is responsible for memory management, process and task management, and disk management. The kernel connects the system hardware to the application software.

47
Q

What is the command that will show system boot time messages?

A

dmesg

dmesg, short for display message or driver message, is a command that prints the message buffer of the kernel. This command’s output typically contains the messages produced by the device drivers that occur during the system startup and boot.

47
Q

Which Linux distribution is used as a basis for the creation of Scientific Linux?

A

Red Hat

Scientific Linux is a Linux distribution produced by Fermilab, CERN, DESY, and ETH Zurich. It is a free and open-source operating system based on Red Hat Enterprise Linux.

48
Q

How would you represent r-xrw-r– in octal notation?

A

564

In Linux, you can convert letter permissions to octals by giving 4 for each R, 2 for each W, and 1 for each X. So, R-X is 5, RW- is 6, and R– is 4.

49
Q

Where is the BIOS located?

A

Motherboard

BIOS or Basic Input/Output System is firmware used to perform hardware initialization during the booting process and provide runtime services for operating systems and programs. The BIOS firmware comes pre-installed on a personal computer’s motherboard as a chip, and it is the first software to run when powered on.

50
Q

Which of the following properly identifies the third partition, on the second hard disk, on the first IDE controller on a PC system?

A

/dev/hdb3

Partitions on these disks can range from 1 (for the first partition) to 16 (for the sixteenth partition). If you have a few ide/pata devices installed in a system, they will be hda (the first device), hdb (the second device), hdc (the third device), and so on. Each partition on that device will append a number to it, so the third partition on the third device would be /dev/hdb3.

51
Q

Which type of files is an important part of diagnosing problems with daemons?

A

Log files

Since daemons don’t usually provide output to the screen, checking log files is an important part of diagnosing problems.

52
Q

What does LAMP mean?

A

The combination of Linux, Apache, MySQL and PHP or other programming languages

LAMP (Linux, Apache, MySQL, PHP) is an archetypal model of web service stacks, named as an acronym of the names of its original four open-source components: the Linux operating system, the Apache HTTP Server, the MySQL relational database management system (RDBMS), and the PHP programming language.

53
Q

Which file contains a list of the user’s secondary groups?

A

/etc/group

The /etc/group file contains a list of every user on the system and their secondary groups.

54
Q

Which network device serves as the gateway between your internal network and external network?

A

Router

A router is a device used to connect two networks, such as your internal and external networks. A router also usually serves as your default gateway in the network.

55
Q

What is a special permission bit set on a file or a directory that lets only the owner of the file/directory or the root user delete or rename the file?

A

Sticky bit

A sticky bit is a special permission bit set on a file or a directory that lets only the owner of the file/directory or the root user delete or rename the file. No other user is given privileges to delete the file created by some other user.

56
Q

Which command is used to provide information about a user’s identity, including the names of the groups that the user belongs to?

A

id

Only the id command can provide information about the user’s identity, including the names of the groups they belong to. If you use cat /etc/passwd or cat /etc/groups, they can give you parts of that information, but not all of the information unless you run both of those commands.

57
Q

Which command adds the new user tux and creates the user’s home directory with default configuration files?

A

useradd -m tux

The useradd command with the –m option creates the user’s home directory with default configuration files.

58
Q

Which of the following outputs might be displayed when executing the command last?

A

root tty2 Wed Sep 29 21:11 - 21:11 (00:00)

The last command reads from a log file and prints the entries of successful login attempts made by the users in the past. The output is such that the last logged in user’s entry appears on top.

59
Q

Which of the following commands can be used to determine the time of the last login of a given user?

A

last

The last command reads from a log file and prints the entries of successful login attempts made by the previous users.

60
Q

Which of the following statements is FALSE?

A

Hidden files start with a pound/hashtag.

Hidden files in Linux start with a dot or a period. The other three statements are all true.

61
Q

How can the normal output from a command be written to a file while discarding the error output?

A

command >file 2>/dev/null

Specifying 2>/dev/null will filter out the errors instead of displaying them to your console. In more detail: 2 represents the error descriptor, which is where errors are written to. By default, they are printed out on the console. /dev/null is the standard Linux device where you can send output that you want to be ignored.

62
Q

What does the grep command allow a user to do?

A

Search for files that contain a specified string

grep is a command-line utility for searching plain-text data sets for lines that match a regular expression. Grep does a global search with the regular expression and prints all matching lines within any files that contain those search strings.

63
Q

Which option can be used to redirect the errors of a command to a specified file?

A

2>

Using 2> will redirect the errors from a command to the specified file.

64
Q

To determine if the last command run on a system was successful, which command should be executed?

A

echo $?

The command “echo $?” will display the exit code of the last command executed from the shell. If the result is 0, then the last command was successfully run without any errors.

64
Q

Which of the following are two types of output messages?

A

Standard Output and Standard Error messages

The two types of output messages are standard output and standard error messages. Standard Output is the shell window or the terminal from which the script runs, abstracted as a file to make writing scripts & programs easier. Standard error is the same as standard output: the shell window or terminal from which the script runs.

65
Q

What is the correct statement to be used for comparison in a Linux shell script?

A

if [ $x -gt $y ]

The standard syntax for an if statement is “if [ condition ].” In this case, the comparison is testing if the variable X is greater than the variable Y.

66
Q

Which command would a user type to compress and package several files into a single file?

A

zip

Zip is used to compress the files to reduce file size and is also used as a file package utility in Linux. Each file is stored in single .zip {.zip-filename} file with the extension .zip.

67
Q

The “cd” command is short for _____________.

A

Change Directory

67
Q

What redirection operator accepts text on the following lines as standard input and standard output

A

Using the <> redirection operator causes the specified file to be used for both standard input and standard output.

68
Q

Which of the following is an example of globbing?

A

ls /etc/*.txt

Globbing is a feature provided by the UNIX/Linux shell to represent multiple filenames by using special characters called wildcards with a single file name. A wildcard is essentially a symbol which may be used to substitute for one or more characters. The only answer choice with a wildcard is ls /etc/*.txt since the * is a wildcard character. Therefore, this is the only answer choice that is using globbing.

69
Q

Which command can be used to display and clear the command line history for a given user?

A

history

The command “history” can be used to display and clear the command line history for a given user. Each user has their own unique history file, which is created in the user’s home directory.

69
Q

Which command shows if /usr/bin is in the current shell search path?

A

echo $PATH

The command “echo $PATH” will display the current shell search path. Once entering “echo $PATH” in the terminal, look at the path to verify if /usr/bin is listed as part of the path.

70
Q

Which command to use to show which shell is being used?

A

echo $SHELL

Typing “echo $SHELL” outputs the current shell being used.

71
Q

How can the current directory and its subdirectories be searched for in the file named MyFile.xml?

A

find . -name MyFile.xml

find is a command that searches one or more directory trees of a file system, locates files based on some user-specified criteria, and applies a user-specified action on each matched file.