Linux 1 Midterm (1-14)

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/96

encourage image

There's no tags or description

Looks like no tags are added yet.

97 Terms

1
New cards

Bash is: A) a networking term | B) a shell | C) an operating system | D) a website

B. a shell

2
New cards

The two login types are: A) URI and CLU | B) CLI and GUI | C) GUX and CLI | D) URI and CLI

B. CLI and GUI

3
New cards

A software release cycle describes: A) How often the computer must be upgraded to support new software | B) How often the computer must be rebooted | C) How often upgrades come out to software | D) The often security fixes are implemented | E) How often the software’s memory is released back to the operating system

C. How often upgrades come out to software

4
New cards

Which Linux distributions are derived from Red Hat? A) CentOS | B) Slackware | C) Ubuntu | D) Debian | E) Fedora

A. CentOS; E. Fedora

5
New cards

Bundling utilities, management tools, and application software with a Linux kernel is called a: A) A trademark | B) A text editor | C) A type of hardware | D) A distribution of Linux

D. A distribution of Linux

6
New cards

To display your current location within the filesystem, you can type: A) cwd | B) pwd | C) dir | D) whereami

B. pwd

7
New cards

A command can take the form of: A) A configuration file | B) A block | C) A program built-in to the shell | D) An alias | E) A function | F) A variable

C. A program built-in to the shell; D. An alias; E. A function

8
New cards

You want to execute the ls command with two options: -r and -l. Which of the following are valid ways to run this command: A) ls -r -l | B) ls rl | C) rl ls | D) ls -l -r | E) ls --r --l | F) ls -rl

A. ls -r -l; D. ls -l -r; F. ls -rl

9
New cards

You can pass arguments to long options by using which of the following techniques: A) –option~argument | B) –option argument | C) –option=argument | D) –option{argument}

B. –option argument; C. –option=argument

10
New cards

When typing a command, you can have the bash shell complete the command by pressing which key? A) The Enter key | B) The Del key | C) The Backspace key | D) The Tab key | E) The Up Arrow key

D. The Tab key

11
New cards

Long command options are preceded by which two characters? A) | B) -- | C) || | D) &&

B. --

12
New cards

Which command is used in order to view the manual page for a topic? A) -m | B) -x | C) show | D) doc | E) man

E. man

13
New cards

The ______ command will display your current working directory. A) exit | B) uname | C) pwd | D) exec

C. pwd

14
New cards

To see a list of commands that are available while viewing a man page, you can type the __ character. A) c | B) g | C) w | D) h

D. h

15
New cards

Environment variables are: A) Not used by shells at all | B) Are not a valid type of variable | C) Only available to the shell they are created in | D) Passed into other shells and commands

D. Passed into other shells and commands

16
New cards

If you want to delete a variable, you can run: A) wipe | B) unset | C) clear | D) delete

B. unset

17
New cards

Local variables are: A) Not used by shells at all | B) Are not a valid type of variable | C) Passed into other shells and commands | D) Only available to the shell they are created in

D. Only available to the shell they are created in

18
New cards

Shell variables are used to: A) Hold critical system information | B) Hide passwords | C) Prevent users from logging in | D) Reboot the system

A. Hold critical system information

19
New cards

The /bin directory contains: A) Nothing; it is not a valid directory | B) Essential administrative commands | C) The most fundamental commands that are essential for the operating system to function | D) Commands that have been compiled from local sources

C. The most fundamental commands that are essential for the operating system to function

20
New cards

The /sbin directory contains: A) Nothing; it is not a valid directory | B) Commands that have been compiled from local sources | C) Essential administrative commands | D) The most fundamental commands that are essential

C. Essential administrative commands

21
New cards

To view all current variables, you can use: A) var | B) view | C) dump | D) set

D. set

22
New cards

Which file can you place in your home directory to be executed when you log off the system? A) /etc/bashrc | B) ~/.bash_profile | C) ~/.bash_logout | D) ~/.bashrc

C. ~/.bash_logout

23
New cards

Which of the following files is for all bash shell users and executed every time a bash shell is opened? A) ~/.bashrc | B) /etc/bashrc | C) /etc/profile | D) ~/.bash_profile

B. /etc/bashrc

24
New cards

Which of the following files is for all bash shell users and executed only at login? A) /etc/bashrc | B) /etc/profile | C) ~/.bashrc | D) ~/.bash_profile

B. /etc/profile

25
New cards

Which of the following will create a variable? A) variable~value | B) variable value | C) variable=value | D) variable+value

C. variable=value

26
New cards

Which of the following is not used for globbing? A) | B) ? | C) # | D) [ ]

C. #

27
New cards

Which command will display more information about globbing? A) man globbing | B) man 7 globbing | C) man 7 glob | D) man -7 glob

C. man 7 glob

28
New cards

The glob pattern [a-d] would match: A) All files | B) A file name with a single character that is either an a, -, or d. | C) A file name with a single character that is either a a, b, c, or d. | D) Nothing, this is an invalid glob pattern.

C. A file name with a single character that is either a a, b, c, or d.

29
New cards

Use the ___ option to display hidden files with the ls command. A) -h | B) -a | C) -D

B. -a

30
New cards

The ls command can list the contents of only one directory at a time. A) True | B) False

B. False

31
New cards

The period . character in the output of the ls command represents: A) Hidden files | B) The end of the command output | C) The current directory | D) Directories that can’t be accessed

C. The current directory

32
New cards

To perform a long listing to show file details, use which of the following commands: A) ls -l | B) ll | C) ls -L | D) ls -D

A. ls -l

33
New cards

To copy the contents of a directory, use the following option(s) for the cp command: A) -r | B) -A | C) -R | D) -d

A. -r; C. -R

34
New cards

The mv command can be used to move more than one file at a time. A) True | B) False

A. True

35
New cards

The mv command will rename a file when a new directory is not specified. A) True | B) False

A. True

36
New cards

The rmdir command can be used to delete directories and their contents. A) True | B) False

B. False

37
New cards

Which character at the beginning of a long listing indicates a directory? A) d | B) c | C) l | D) –

A. d

38
New cards

Which of the following are advantages of using the find command? A) It is quicker than the locate command | B) Its results are always the most up-to-date | C) It pages the results | D) It can search by file attribute types

B. Its results are always the most up-to-date; D. It can search by file attribute types

39
New cards

The FHS sets which standard? A) Which filesystem types should be used | B) Which partitions should be created | C) Which directories should be used to hold specific files | D) Which services should be installed

C. Which directories should be used to hold specific files

40
New cards

What directory is used as a temporary mount point? A) /tmpmnt | B) /xbin | C) /mnt | D) /etc

C. /mnt

41
New cards

Which option to the find command will search by user owner? A) -uowner | B) -owner | C) -user | D) -person

C. -user

42
New cards

Which directory represents the root of the filesystem hierarchy? A) /etc | B) /var | C) / | D) /root

C. /

43
New cards

Which directory is used to store user home directories? A) /home | B) /usr | C) /homedir | D) /tmp

A. /home

44
New cards

Which directory is used for the home directory of the root user? A) / | B) /root | C) /var | D) /home

B. /root

45
New cards

If you want to see the entire contents of a text file, you can use the _____ command: A) type | B) cat | C) wc | D) cut

B. cat

46
New cards

The head -n -1 readme.txt command will: A) Display all but the first line of readme.txt | B) Number the first line of readme.txt | C) Display the first line of readme.txt | D) Display all but the last line of readme.txt

D. Display all but the last line of readme.txt

47
New cards

Which command will merge two files together line by line? A) join | B) merge | C) combo | D) paste

D. paste

48
New cards

If you want to break apart a large file into smaller files, you can use: A) dump | B) split | C) cat | D) break

B. split

49
New cards

If you want a file to be displayed with its lines numbered, you can use: A) nc | B) nl | C) fmt | D) cut

B. nl

50
New cards

Which of the following commands can be used to scroll through a text file? A) head | B) sed | C) less | D) cat

C. less

51
New cards

The regular expression a is equivalent to: A) a{0,} | B) a{1} | C) a{0,1} | D) a{1,}

A. a{0,}

52
New cards

To use extended regular expressions, you can use: A) grep -e | B) egrep | C) grep -E | D) fgrep

B. egrep; C. grep -E

53
New cards

What does the vertical bar | character do in a regular expression? A) Redirects input to the command | B) Redirects output from the command | C) Separates alternative patterns that can be matches | D) Separates repetition modifiers

C. Separates alternative patterns that can be matches

54
New cards

What is not a purpose of using parentheses around parts of a regular expression? A) They can be used to make alternation more efficient | B) They can be used to refer back to what was matched | C) They can be used to change the order that the pattern is evaluating | D) They can be used to group characters for repetition

C. They can be used to change the order that the pattern is evaluating

55
New cards

Which of the following regular expression characters is an extended regular expression character? A) . | B) + | C) $ | D) \

B. +

56
New cards

Which regular expression character matches any one character? A) + | B) \ | C) . | D) ?

C. .

57
New cards

If you are in the vi command mode and want to begin inserting text before your cursor, you can type: A) O | B) i | C) A | D) o

B. i

58
New cards

If you are in vi command mode and want to add a new line after your cursor, you can type: A) O | B) i | C) o | D) a

C. o

59
New cards

If you want to move a character to the right in vi command mode, you can press the Right Arrow Key → or: A) k | B) l | C) j | D) h

B. l

60
New cards

To go to the first line of a vi document in command mode, you can type: A) 1G | B) G | C) gg | D) GG

A. 1G; C. gg

61
New cards

To perform cut and paste in a vi document, you actually do: A) delete and put | B) yank and put | C) delete and yank | D) yank and paste

A. delete and put

62
New cards

To save and then quit, you can type in command mode: A) WW | B) ZZ | C) QQ | D) !!

B. ZZ

63
New cards

If you want to append content to a file with the normal output of a command, you can use: A) 1> | B) > | C) >> | D) 2>>

C. >>

64
New cards

This stream is the output of a command operating normally: A) stdout | B) stdin | C) stdnorm | D) stderr

A. stdout

65
New cards

Two or more commands combined with the vertical bar | character between them form a: A) pipeline | B) streamline | C) outputline | D) command line

A. pipeline

66
New cards

Which command can be used to send the output of a command to both stdout and a file: A) ls | tee /tmp/output.txt | B) ls 2 | /tmp/output | C) ls | echo /tmp/output.txt | D) ls | /tmp/output.txt

A. ls | tee /tmp/output.txt

67
New cards

A popular program for monitoring running processes in real-time is: A) top | B) ghost | C) mon | D) watcher

A. top

68
New cards

The uptime command prints a statistic representing the system load over what three time spans? A) Last ten minutes | B) Last five minutes | C) Last minute | D) Last fifteen minutes | E) Last hour | F) Last thirty minutes

B. Last five minutes; C. Last minute; D. Last fifteen minutes

69
New cards

The _____ command will list the commands that are running in your terminal. A) proc | B) ps | C) ls | D) list

B. ps

70
New cards

The key press combination that will request a process to stop is: A) CTRL+C | B) CTRL+P | C) CTRL+Z | D) CTRL+D

A. CTRL+C

71
New cards

To change the niceness value of an existing process, you can use the _____ command. A) renice | B) reset | C) set | D) nice

A. renice

72
New cards

To execute a command with the default priority, which value do you pass to the nice command? A) 19 | B) 20 | C) -20 | D) 0

D. 0

73
New cards

To see how long the system has been running, you can use the _____ command. A) nice | B) free | C) uptime | D) ps

C. uptime

74
New cards

To see the list of background processes that you have started in your shell, you can run: A) process | B) jobs | C) list | D) work

B. jobs

75
New cards

To send a signal to a set of processes with the same name, you can run: A) sigkill | B) allkill | C) grpkill | D) killall

D. killall

76
New cards

To view statistics on memory availability, you can use: A) free | B) mem | C) stat | D) uname

A. free

77
New cards

Using the kill command always terminates processes. A) True | B) False

B. False

78
New cards

By default, tar will attempt to extract an archive… A) to the specified directory. | B) into the archive’s parent directory. | C) into the working directory. | D) into the user’s home directory.

C. into the working directory.

79
New cards

The dd command can be used to copy entire partitions. A) False | B) True

B. True

80
New cards

To decompress the archive example.gz, use the following command: A) gzip -u example.gz | B) gunzip -x example.gz | C) gzip -x example.gz | D) gunzip example.gz

D. gunzip example.gz

81
New cards

Which of the following commands could be used to extract the archive, example.tar? A) tar -uz example.tar | B) tar -uf example.tar | C) tar -xf example.tar | D) tar -xz example.tar

C. tar -xf example.tar

82
New cards

Which option to the zip command will list its files without uncompressing them? A) -l | B) -d | C) -R | D) -r

A. -l

83
New cards

For the rwxr-x--x permission set, the highlighted permissions belong to: A) The user owner of the file | B) All users besides the user owner and group owner | C) The user owner and group owner of the file | D) The group owner of the file | E) Cannot determine from supplied text: the highlighted portion of the permission string is not visible.

Cannot determine from supplied text: the highlighted portion of the permission string is not visible.

84
New cards

The command, chmod u=g will: A) Set the user owners permissions to match the group owners permission | B) Set the group owners permissions to match the user owners permissions | C) Set the user owners permissions to rwx | D) Nothing, the command syntax is invalid

A. Set the user owners permissions to match the group owners permission

85
New cards

The group ownership of a file may only be changed by: A) Any user can change the group ownership of any file | B) The root user | C) The owner of the file | D) Both the root user and the owner of the file

D. Both the root user and the owner of the file

86
New cards

The only person who can change the user ownership of a file is: A) The root user | B) Any user can change the group ownership of any file | C) The owner of the file | D) Both the root user and owner of the file

A. The root user

87
New cards

The setuid permission on a file: A) Causes the file to run under the owner’s identity | B) Causes the file to never run as root | C) Causes the file to run under the user’s identity | D) Causes the file to always run as root

A. Causes the file to run under the owner’s identity

88
New cards

To run a script file, you need both read and execute permission. A) True | B) False

A. True

89
New cards

Which command can be used to set what your default permissions will be on new files? A) mode | B) umode | C) umask | D) mask

C. umask

90
New cards

Which command can change the user owner of a file? A) own | B) chown | C) pawn | D) chpawn

B. chown

91
New cards

Which command is used to change permissions on a file? A) chmod | B) chperm | C) chgperm | D) chgmode

A. chmod

92
New cards

Which commands can be used to change the ownership of a file? A) chown | B) chgrp | C) chggrp | D) newgrp

A. chown; B. chgrp

93
New cards

Which command will allow you to change the group ownership of a file that you own? A) chgrp | B) regroup | C) chmod | D) chown

A. chgrp

94
New cards

Which permission, when set on a directory, causes new files and directories that are created inside to be owned by the group that owns the directory? A) write | B) setgid | C) setuid | D) sticky bit

B. setgid

95
New cards

What permissions are typically placed on soft link files? A) rw-rw-rw- | B) --------- | C) rwxrwxrwx | D) rwx------

C. rwxrwxrwx

96
New cards

Which are valid link types in Linux? A) Stable links | B) Hard links | C) Filesystem links | D) Soft links

B. Hard links; D. Soft links

97
New cards

Which type of link can be made to directories, hard or soft? A) soft | B) hard

A. soft