Linux Flashcards
(84 cards)
1
Q
- Bundling utilities, management tools, and application software with a Linux kernel is called a:
A
A distribution of Linux
2
Q
- To display your current location within the filesystem, you can type:
A
pwd
3
Q
- Long command options are preceded by which two characters?
A
–
4
Q
- The ______ command will display your current working directory.
A
pwd
5
Q
- To see a list of commands that are available while viewing a man page, you can type the __ character.
A
h
6
Q
- Environment variables are:
A
Passed into other shells and commands
7
Q
- If you want to delete a variable, you can run:
A
unset
8
Q
- Local variables are:
A
Only available to the shell they are created in
9
Q
- Shell variables are used to:
A
Hold critical system information
10
Q
- The /sbin directory contains:
A
Essential administrative commands
11
Q
- To view all current variables, you can use:
A
set
12
Q
- Which file can you place in your home directory to be executed when you log off the system?
A
~/.bash_logout
13
Q
- Which file is for all bash shell users and executed every time a bash shell is opened?
A
/etc/bashrc
14
Q
- Which file is for all bash shell users and executed only at login?
A
/etc/profile
15
Q
- What command will create a variable?
A
variable=value
16
Q
- Which command will display more information about globbing?
A
man 7 glob
17
Q
- The glob pattern [a-d] would match:
A
A file name with a single character that is either a a, b, c, or d.
18
Q
- The period . character in the output of the ls command represents:
A
The current directory
19
Q
- Which command is used to perform a long listing to show file details?
A
ls -l
20
Q
- Which character at the beginning of a long listing indicates a directory?
A
d
21
Q
- The FHS sets which standard?
A
Which directories should be used to hold specific files
22
Q
- What directory is used as a temporary mount point?
A
/mnt
23
Q
- Which directory represents the root of the filesystem hierarchy?
A
/
24
Q
- Which directory is used to store user home directories?
A
/home
25
36. Which directory is used for the home directory of the root user?
/root
26
37. If you want to see the entire contents of a text file, you can use the _____ command:
cat
27
38. The head -n -1 readme.txt command will:
Display all but the last line of readme.txt
28
39. Which command will merge two files together line by line?
paste
29
40. If you want to break apart a large file into smaller files, you can use:
split
30
41. If you want a file to be displayed with its lines numbered, you can use:
nl
31
42. Which command can be used to scroll through a text file?
less
32
43. The regular expression a is equivalent to:
a{0,}
33
45. What does the vertical bar | character do in a regular expression?
Separates alternative patterns that can be matches
34
48. Which regular expression character matches any one character?
.
35
49. If you are in the vi command mode and want to begin inserting text before your cursor, you can type:
i
36
50. If you are in vi command mode and want to add a new line after your cursor, you can type:
o
37
51. If you want to move a character to the right in vi command mode, you can press the Right Arrow Key or:
l
38
53. To perform cut and paste in a vi document, you actually do:
delete and put
39
54. To save and then quit, you can type in command mode:
ZZ
40
55. If you want to append content to a file with the normal output of a command, you can use:
>>
41
56. This stream is the output of a command operating normally:
stdout
42
57. Two or more commands combined with the vertical bar | character between them form a:
pipeline
43
59. A popular program for monitoring running processes in real-time is:
top
44
61. The _____ command will list the commands that are running in your terminal.
ps
45
62. The key press combination that will request a process to stop is:
CTRL+C
46
63. To change the niceness value of an existing process, you can use the _____ command.
renice
47
64. To execute a command with the default priority, which value do you pass to the nice command?
0
48
65. To see how long the system has been running, you can use the _____ command.
uptime
49
66. To see the list of background processes that you have started in your shell, you can run:
jobs
50
67. To send a signal to a set of processes with the same name, you can run:
killall
51
68. To view statistics on memory availability, you can use:
free
52
69. By default, tar will attempt to extract an archive...
into the working directory.
53
70. To decompress the archive example.gz, use the following command:
gunzip example.gz
54
73. For the rwxr-x--x permission set, the highlighted permissions belong to:
The user owner of the file
55
74. The command, chmod u=g will:
Set the user owners permissions to match the group owners permission
56
75. The group ownership of a file may only be changed by:
Both the root user and the owner of the file
57
76. The only person who can change the user ownership of a file is:
The root user
58
77. The setuid permission on a file:
Causes the file to run under the owner's identity
59
78. Which command can be used to set what your default permissions will be on new files?
umask
60
79. Which command can change the user owner of a file?
chown
61
80. Which command is used to change permissions on a file?
chmod
62
82. Which command will allow you to change the group ownership of a file that you own?
chgrp
63
84. What permissions are typically placed on soft link files?
rwxrwxrwx
64
86. Which type of link can be made to directories, hard or soft?
soft
65
96. A device name of /dev/hda1 indicates this partition is on which type of device?
IDE
66
97. A mount point is:
An empty directory that is used to access a filesystem
67
100. By default, the df command displays filesystem use in:
1-K block size
68
101. Inodes are used to store a file's:
Metadata
69
102. The _____ command will display how much space a directory is using.
du
70
104. Missing files don't have their original file names, instead they are named with their _____ number?
inode
71
107. How can you remove a package using an rpm command?
rpm -e
72
109. If a library is not accessible due to an error, the ldd would report which error message?
not found
73
110. What are benefits of a shared library:
Programs use a more consistent base of code
74
111. What command will find and load shared libraries when a program is executed?
The dynamic linker
75
112. Which command will create disk labels on an ext3 filesystem?
e2label
76
113. Which command will describe the mount options available for different filesystems?
man mount
77
114. Which file provides persistent mapping of block devices to mount points?
/etc/fstab
78
116. What is the primary configuration file for yum?
/etc/yum.d/yum.conf
79
117. Which command will show the dependencies of an RPM package?
rpm -qpR
80
118. In which file are repositories stored for Debian package management?
/etc/apt/sources.list
81
119. Which command may be used to get a list of the installed Debian packages?
dpkg -l
82
120. Which command will remove all files that belong to a Debian package?
apt-get purge
83
121. Which command will update the list of available packages for APT?
apt-get update
84
122. Which utility can automate changes needed for a base virtual machine image?
cloud-init