Test2 Flashcards

1
Q

Which of the following programs on a Linux system could you use as a replacement for Adobe Photoshop?

A

Gimp

Gimp is the open-source created competitor to Adobe Photoshop. It is a full-featured program, like Photoshop, but is completely free to use. It can read and write to Photoshop formatted files, too!

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

Which of the following answers is true for cloud computing?

A

Cloud Computing provides new tools to manage IT resources

Cloud computing empowers organizations to process larger workloads and offers enhanced collaboration and improved mobility for employees. This also allows for better management of IT resources and provides many new tools that can be used to manage IT resources.

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

Which of the following is the UNIX device name for a physical or virtual terminal connection?

A

tty

A tty is the Unix device name for a physical or virtual terminal connection. It essentially represents a singular text/computer interface. On Linux, there are multiple tty interfaces (tty0, tty1, tty2, etc.). tty7 is the graphical interface.

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

Which is NOT a Linux distribution?

A

Torvalds

CentOS, openSUSE, and Debian are popular Linux distros. Torvalds is the last name of Linus Torvalds, a Finnish software engineer who is the creator and, historically, the Linux kernel’s principal developer, which is the kernel for Linux.

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

Which of the following programs on a Linux system could you use as a replacement for Microsoft PowerPoint?

A

Impress

Impress is the LibreOffice equivalent of Microsoft PowerPoint. It can even read and write to PowerPoint files directly from within Impress.

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

Which of the following is the on-demand availability of computer system resources, especially data storage and computing power, without direct active management by the user?

A

Cloud Computing

Cloud computing is the on-demand availability of computer system resources, especially data storage and computing power, without the user’s direct active management. The term is generally used to describe data centers available to many users over the Internet. Large clouds, predominant today, often have functions distributed over multiple locations from central servers.

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

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

A

Debian

Ubuntu is a free and open-source Linux distribution based on Debian.

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

Which command is used to rename a file on Linux?

A

mv

The mv command is used to move a file or rename a file in Linux.

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

Which of the following is true about environment variable names by convention?

A

Contains all uppercase letters

By convention, all environmental variable names should contain only uppercase letters.

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

Which command can be used to display the contents of multiple files to the screen at once?

A

cat

The cat command can display the contents of multiple files to the screen at once. For example, “cat file1 file2” will display the contents of file1 and then file2 to the screen before ending the command.

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

What symbol can be used to represent none, one, or multiple characters within search criteria?

A

*

The * is used to represent no, one, or multiple characters within search criteria. This process is known as globbing.

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

What does the “rm -rf” command do in Linux?

A

Remove all the files in the directory and subdirectories

The rm command is a UNIX and Linux command line utility for removing files or directories on a Linux system. When you combine the -r and -f flags, it means that recursively and forcibly remove a directory (and its contents) without prompting for confirmation. You should always keep in mind that “rm -rf” is one of the most dangerous commands, that you should be extremely careful when running on a Linux system, especially as root.

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

Which of the following commands increases the number of files within a directory?

A

touch newfile

The command touch is used to create a new file in the current directory. The command touch newfile will create a new empty textfile in the current directory. The ls and rmdir commands will not create a newfile in the directory. The command create here is not a valid command.

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

Which command would a user type to create a new file within the current directory?

A

touch

The touch command is a standard command used in Linux to create a new file. If the file or directory already exists specified by the user in the touch command, then the timestamp of it will be changed or modified.

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

Which command is used to copy files from one directory to another?

A

cp

The cp command stands for copy.

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

Which of the following is true about a recursive directory listing?

A

It includes the content of sub-directories

A recursive directory listing includes the content of sub-directories. Some of the other options provided may be true if you include the right switches and additional ls command options. By default, though, just using ls -R, you will get a list of the files within the current directory and any files within subdirectories.

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

What keyword should be used to fill in the blank in the following segment of the given shell script? for i in *; _____ cat $i done

A

do

The for loop lets you iterate or ‘do’ over a series of ‘words’ within a string.

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

You have been asked to create a script will present the user with a onboard menu in which they can select 4 different commands to run by entering 1, 2, 3, or 4. Which of the following statements should you use to create the simplest and most effective method of choosing the command to run based on the user’s input?

A

case

A case statement uses a variable, and each pattern shown before the right parenthesis is a possible value of that variable. If the user’s entry is equal to the value before the parenthesis, the case is run. Using a series of nested if-then-else statements will work, but it is rather clumsy and confusing to understand. A case statement is a much more efficient choice.

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

How is it possible to determine if an executable file is a shell script read by Bash?

A

The first line starts with #!/bin/bash.

The first line of the script should start with #!/bin/bash. Most shell scripts will end with a .sh by convention, but it is not required. Remember, in Linux, file extensions are only useful to the end-user, but the operating system completely ignores them.

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

Which of the following options is used to gzip a file called filename?

A

gzip filename

The syntax for using gzip is “gzip filename”. By default, when you compress a file or folder using the gzip command, it will have the same file name as before but with the extension .gz.

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

Which of the following statements may be used to access the second command line argument to a script?

A

$2

Inside a script, the $1 variable references the first argument from the command line and $2 is the second argument, and so on. The variable $0 references to the current script.

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

Which command line tool is used to compress a single file using the Burrows-Wheeler algorithm?

A

bzip2

bzip2 is a free and open-source file compression program that uses the Burrows-Wheeler block sorting text compression algorithm and Huffman coding. It only compresses single files and is not a file archiver.

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

Which command can be used to display the contents of multiple files to the screen at once?

A

cat

The cat command can display the contents of multiple files to the screen at once. For example, “cat file1 file2” will display the contents of file1 and then file2 to the screen before ending the command.

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

Which string should you add to put the date into the prompt of the shell?

A

\d

The \d option would be added to add the date to the prompt in the shell.

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

How can the normal output of 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 so that they will not be output 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 send output that you want to be ignored.

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

What is NOT one of the ways that DHCP can be used to deliver IP addresses?

A

Permanent

DHCP supports three mechanisms for IP address allocation. Automatic allocation allows DHCP to assigns a permanent IP address to a device. Dynamic allocation is used when DHCP assigns an IP address to a device for a limited period of time. Manual allocation occurs when a device’s IP address is assigned by the network administrator, and DHCP is used to convey the assigned address to the device.

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

What is a set of standards that underlie most modern network communications at the software level?

A

TCP/IP

TCP/IP stands for Transmission Control Protocol/Internet Protocol, which is a set of networking protocols that allows two or more computers to communicate.

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

Which storage device would be listed as /dev/sdb in Linux?

A

2nd hard drive

Storage devices are labeled as /dev/sd* with the * being a letter for the drive number. A is the first drive, B is the second, C is the third, and so forth.

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

Which network interface always exists in a Linux system?

A

lo

lo is the loopback interface. This is a special network interface that the system uses to communicate with itself, and it exists even if there is no hardware network interface (like eth0 or wlan0) in the system.

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

Which of the following is used as a virtual or pseudo filesystem used to interface with the kernel and system as a whole but not with individual processes?

A

/sys

The /sys virtual filesystem is used to interact with the kernel and system as a whole. It did not provide any method to interact with individual processes and was created to move some of the original functions from /proc to /sys to clean up the /proc structure.

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

Which of the following is the filesystem for a CD-ROM?

A

isofs

The ISO File System (isofs) is a file system for optical disc media. Being published by the International Organization for Standardization (ISO), the file system is considered an international technical standard. Since the specification is available for anybody to purchase, implementations have been written for many operating systems, including Linux.

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

Which of the following is NOT TRUE about the Linux Distribution Life cycle?

A

Linux distros are always short term releases

Many distros offer short-term support versions and long-term support (LTS) versions. Therefore Linux distributions are not always short term releases. Most release schedules are publicly announced months or years in advance. Often, distributions are given catchy names for each of their versions. For example, Ubuntu had the Disco Dingo as one of their release versions. The final release version of a distribution is considered the most stable.

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

Which of the following commands is used to view memory usage on a system?

A

free

The free command can be used to display the total amount of free space available, the amount of memory used and swap memory in the system, and the buffers used by the kernel. The top command can also be used to display the memory statistics, processor activity, and tasks managed by the kernel in real-time.

34
Q

Which of the following ways would NOT allow a user to perform a command-line task that requires root privileges?

A

Disabling firewall and force open a directory, file, or folder

A command-line task that requires root privileges can be done (1) by logging in directly as root at a shell or by using a remote login tool such as SSH, (2) by using the sudo command, or (3) by using the su command to switch to the root user.

34
Q

Which GID is usually used to represent the root group on a Linux system?

A

0

The GID of 0 has a special role: it is always the root group.

35
Q

Which of the following commands can be used to change default permissions for files and directories at the time of creation?

A

umask

The umask command is used to change the default permission for files and directories at the time of the file’s creation.

36
Q

What does the letter t at the end of drwxrwxrwt indicate within the following directory permissions? drwxrwxrwt 14 root root 36864 2012-03-02 11:17 /tmp

A

The t is used to show that the directory is globally writable, but only the owner can delete their own files within the directory

The t is a sticky bit, a specialized permission bit set on a directory that allows only the owner of the file within that directory, the owner of the directory, or the root user to delete or rename the file.

37
Q

Which option can be used with useradd to create a new user without a home directory?

A

-M

The -M option creates a user without a home directory using useradd. When the -m option is used, the user’s home directory will be created using the system’s default setup and template.

38
Q

What umask should be set for a directory to have 700 as its octal permissions?

A

rwx——

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, RWX is 7 and — is 0.

39
Q

What command is used to change the group ownership of a file?

A

chgrp

The chgrp command is used to change the group ownership of a file.

40
Q

Which of the following is NOT a Linux desktop environment?

A

Dwarf

Linux has numerous desktop environments. Some of the more popular desktop environments are Cinnamon, Gnome, KDE, XFCE, Unity, and Mate.

40
Q

Why are web browser cookies considered dangerous?

A

Cookies support identification and tracking of users

Cookies support the identification and tracking of users; therefore, they are considered dangerous to your privacy and confidentiality.

41
Q

What command can be used to find the executable and man pages that exist for a given command?

A

whereis

The whereis command lets users locate the executable, source, and manual page files for any command.

41
Q

What symbol can be used to represent a single character within the search criteria?

A

?

The ? is used to represent a single character within the search criteria. This process is known as globbing.

42
Q

Which command closes the terminal window?

A

exit

Typing “exit” exits the terminal session and closes the terminal window.

42
Q

Why is the file data.txt empty after executing sort data.txt > data.txt?

A

Because the file gets truncated before sort is executed

This is because the redirection is carried out first. This means that the > data.txt truncates the file so that sort finds nothing.

43
Q

What is the ls command used for in Linux?

A

Lists the files within a directory

The ls command stands for list. The list command is used to display a listing of all files within a directory.

44
Q

Which Linux file type hold lists of files rather than the actual data?

A

Directories

A directory is a special file type that contains a list of other files instead of actual data. The other types of files listed do not have this ability.

45
Q

How do you perform a recursive listing from the command prompt?

A

ls -R

To conduct a recursive directory listing, use the command ls -R.

45
Q

Which character is known as a root directory?

A

/

The slash (/) is the root of the filesystem and is known as the root directory.

46
Q

Which of the following can be used to represent the letters A through Q using only lowercase letters?

A

[a-q]

The range [a-q] is used to represent a single letter from the range of lowercase a to lowercase q.

47
Q

Which of the following is an interpreted, high-level, general-purpose programming language?

A

Python

Python is an interpreted, high-level, general-purpose programming language. Its language constructs and object-oriented approach aim to help programmers write clear, logical code for small and large-scale projects.

48
Q

Which of the following is a piece of software that listens for network requests and responds to them?

A

Apache

Apache HTTPD is an HTTP server daemon produced by the Apache Foundation. It is software that listens for network requests (expressed using the Hypertext Transfer Protocol) and responds to them.

49
Q

Which of the following is a mobile operating system based on a modified version of the Linux kernel designed primarily for touchscreen mobile devices?

A

Android

Android is a mobile operating system based on a modified version of the Linux kernel and other open-source software designed primarily for touchscreen mobile devices such as smartphones and tablets.

50
Q

Which of the following programs on a Linux system could you use as a replacement for Microsoft Outlook?

A

Thunderbird

Mozilla Thunderbird is a free and open-source, cross-platform email client, news client, RSS, and chat client developed by the Mozilla Foundation.

51
Q

What does the term GPL stand for?

A

General Public License

The GNU General Public License (GPL) is a widely-used free software license, which guarantees end users the freedom to run, study, share, and modify the software.

52
Q

The output of the program date should be saved in the variable datenow. What is the correct statement to enter into the shell to set this variable?

A

datenow=$(date)

To store the output of a command in a variable, you can use either of the following commands in the shell: (1) variable_name=$(command) or (2) variable_name=’command’.

53
Q

What is the main difference between the desktop environments of Windows/Mac OS and Linux?

A

Windows/Mac OS each have an inseparable desktop environment while Linux desktop environments are modular

While Windows and MAC OS each have an inseparable desktop environment, Linux desktop environments are modular. They can be mixed and matched according to user preference or distribution purpose.

54
Q

You have just installed a wireless network adapter in your Linux system, but you cannot connect to the wireless network. What is most likely the problem?

A

You didn’t install the right driver for the device

By default, Linux doesn’t have a bunch of drivers built into the operating system. If you get a device that isn’t on your distro’s HCL, then you will have to find and install the driver yourself.

55
Q

What is the maximum amount of memory accessible by a 32-bit operating system?

A

4 GB

A 32-bit operating system can only access 4GB of memory. If you need to access larger amounts of memory, you need to install an x64 (64-bit) Linux OS.

56
Q

When the free command is run, what does the Mem: line reveal about the system?

A

RAM statistics

Within the “free” command, the “Mem:” line reveals total RAM statistics for the Linux system.

57
Q

What is the symbolic representation of the octal numeric permission 644?

A

rw-r–r–

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, RW- is 6 and R– is 4.

58
Q

Which of the following commands will display a list of all files in the current directory, including those that may be hidden?

A

ls -a

The ls command stands for list. The -a option lists all the files in the current directory, including those that may be hidden.

58
Q

After running a command to delete all of the files beginning with the letter “a”, the file Access.txt remained. Assuming that the user had the correct ownership and permissions, why was Access.txt not deleted when the command was run?

A

Linux file names are case sensitive

The Linux file system treats all files as case sensitive. Therefore, rm a* will delete all files with the lowercase a but not the uppercase A. To delete the files with the uppercase A, rm A* would be used instead.

59
Q

Which directory contains the files and directories automatically copied over to a new user’s home directory when the account is first created?

A

/etc/skel

The /etc/skel directory contains files and directories automatically copied over to a new user’s home directory when such a user is created by the useradd program.

60
Q

Which file is used to define all of the users on a Linux system?

A

/etc/passwd

The /etc/passwd file is used to define all of the users on a Linux system.

61
Q

Which command shows who is logged on and what they are doing in the system?

A

w

The w command displays a list of all logged in to the system and what they are doing. This command is similar to the who command but ends up displaying more information about logged in users.

62
Q

Which file on a Linux system is modified to set the maximum number of days before a password must be changed?

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. The last 6 fields provide password aging and account lockout features.

63
Q

Which of the following files contains a mapping of IP addresses to URLs locally on your Linux machine?

A

/etc/hosts

The /etc/hosts file contains a mapping of IP addresses to URLs. Your browser uses entries in the /etc/hosts file to override the IP-address-to-URL mapping returned by a DNS server. This is useful for testing DNS (domain name system) changes and the SSL configuration before making a website live.

64
Q

You have downloaded a large Linux distribution as an ISO that requires 3 GB of installation files. You want to perform the install from an optical drive. What type of disc should you burn the ISO file onto?

A

DVD

A single-layer DVD can store up to 4.7 GB of data on a single disc. A CD can only store 700 MB. USB and ZIP drives are not considered optical drives; therefore, they are not the right answer.

65
Q

Which of the following statements is TRUE for a Linux distribution used in an enterprise environment?

A

These distributions contain software versions that have proven to be stable even when they are not the most recent version of the software available

In order to minimize downtimes and business interruptions, Linux distributions used in enterprise environments contain software versions that have proven to be stable. Even if they are not the recent versions of the software, this is done to minimize problems that could be introduced with newer software that is not as well tested as the stable releases.

66
Q

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

A

nslookup

The nslookup 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. Host 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.

67
Q

Which of the following provides the correct syntax to search for lines ending with the given pattern using the grep command?

A

pattern$

To search for lines ending with the given pattern using grep, pattern$ should be used. If the pattern is enclosed in single quotes, it suppresses the meaning of all of the meta-characters with special meanings.

68
Q

Which of the following statements would be used for sending both standard output and standard error to the same location?

A

2>&1

The statement “2>&1” is used to redirect the standard output and standard error to the same file.

69
Q

Which of the following is the file descriptor number used to represent the Standard Error (STDERR)?

A

2

The standard error (STDERR) is represented by the file descriptor number 2.

70
Q

What option can be used with tail or head to specify the number of lines to display to the screen?

A

-n

The -n option is used to specify the number of lines to display to the screen with tail and head. By default, these commands display only 10 lines to the screen.

71
Q

Which of the following options is used with tar to specify the filename of the tar archive?

A

-f

The -f option is used to specify the file name type of the archive file.

72
Q

What is used as a placeholder for an unknown value in a script, and its value is then calculated or determined when the script is executed?

A

Variable

A variable is a placeholder within a script. The value of the variable is determined when the script is executed.

73
Q

Which of the following commands could be used to connect to a remote server and execute some commands securely?

A

ssh

The ssh command is used to connect to a remote server and execute some commands securely. The telnet command can be used to connect to a remote server and execute some commands, but it is not considered to be secure.

74
Q

!/bin/bash

The script.sh consists of the following lines:

echo $2 $1

Which output will appear if the command, ./script.sh test1 test2, is entered?

A

test2 test1

This simple script will take two arguments as its input and then display the arguments in reverse order. So, whatever is input first (test1) will be displayed second. Therefore, “./script.sh test1 test2” will output “test2 test1” to the screen.