linux Flashcards

1
Q

What is the prompt for the root user?

A

#

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

What is the prompt for the user?

A

$

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

What do you call the administrator?

A

root

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

What command is used to list directory and files?

A

ls

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

What command is used to display the message on screen?

A

echo

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

What command is used to diplay the current working directory?

A

pwd

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

What command is used to change directory?

A

cd

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

What command is used to create a blank file?

A

touch

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

What command is used to copy a file or directory?

A

cp

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

What command is used to make a directory?

A

mkdir

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

What command is used to view the contents of file or concatenate two or more files?

A

cat

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

What command is used to break output into pages?

A

less

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

What command is used to open the VIM text editor?

A

vim

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

What command is used to open the GNU nano text editor?

A

nano

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

What command is used to reboot a machine?

A

reboot

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

What command is used to shutdown a machine?

A

shutdown

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

What is the command that is used to open the manual of a command?

A

man

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

What command is used to move files or directories?

A

mv

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

What is the command that is used to rename directories?

A

mv

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

What is the command that is used to provide a brief description of the specified command?

A

whatis

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

What are the desktop environments for CentOS?

A

Gnome / KDE

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

In which directory can you find the users accounts?

A

etc/passwd

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

In which directory can you find the encrypted passwords?

A

etc/shadow

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

In which directory can you find the groups?

A

etc/group

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
What is the file that contains the list of users and groups that are given with the sudo privileges [wheel group]?
sudoers
26
What command is used to execute commands as root?
sudo
27
What command is used to configure or edit the sudoers file? This command is simpler and more secure
visudo
28
What command is used to open the sudoers file using vi text editor?
vim /etc/sudoers
29
What command is used to remove files?
rm
30
What command is used to remove directories?
rmdir
31
What command is used to add user?
useradd
32
What command is used to set a user's password?
passwd
33
What command is used to change age? i.e password expiration
chage
34
What command is used to modify user settings
usermod
35
What command is used to delete user?
userdel
36
What command is used to add a group?
groupadd
37
What command is used to delete group?
groupdel
38
What is the command that is used to modify a group?
groupmod
39
What command is used to display the username you're currently logged in as?
whoami
40
What is the command that is used to determine who are currently logged in?
w
41
What command is used to display the history of user login/logout?
last
42
What command is used to display the uid/guid?
id
43
What command is used to switch user to a specified user or account name?
su
44
What command is used to remote a print job?
lpr
45
What command is used to dislay the history or login/logout times for accounts?
lastlog
46
"*study the octal values for different permissions, ie. [rwx | owner, group, others] What is the octal for the permission rw- r-x --x"
651
47
What command is used to set the default permissions on newly created files and directories?
umask
48
What command is used to modify permissions on file / directories?
chmod
49
What command is used to change ownership for a file or directory?
chown
50
What command is used to change group ownership of a file or directory?
chgrp
51
What command is used to list attributes of files or directory?
lsattr
52
What command is used to change the attribute of files or directory?
chattr
53
What is the permission that allows a user to have similar permissions as the file's user or owner?
suid
54
What is the permission that allows a user to have similar permissions as the file's group owner?
guid
55
What do you call the special permission bit that protects files in a directory?
stickybit
56
What do you call the list of permissions that are attached to an object?
acl
57
What command is used to get the file access control list?
getfacl
58
What command is used to set the file access control list?
setfacl
59
What partition table does legacy BIOS use?
MBR
60
What partition table does UEFI use?
GPT
61
In which directory can you find the device drivers?
/dev
62
In which directory can you find the binary files?
/bin
63
Name a bootloader that linux uses
GRUB or GRUB2 or LILO
64
In which directory can you find the home directories?
/home
65
In which directory can you find the libraries?
/lib
66
In which directory can you find the basic configuration files
/etc
67
In which directory can you find the optional files?
/opt
68
In which directory can you find the root directory?
/root
69
In which directory can you find the user files and programs?
/usr
70
In which directory can you find the variable files?
/var
71
In which directory can you find the temporary files?
/tmp
72
In which directory can you find the necessary files to boot the Linux operating system?
/boot
73
Which directories are VFS (virtual file systems)?
/proc
74
What command is used to display the file system in a hierarchical structure?
tree
75
What command is used to search for files using the mlocate database?
locate
76
What command is used to search for files using the directory structure?
find
77
What command is used to display the complete path of a command?
which
78
What is the command that is used to display the complete path of a command, and its manuals?
whereis
79
What command is used to display the content of a file or concatenate two or more files?
cat
80
What is the command that is used to display the first 10 lines of a file?
head
81
What command is used to display the last 10 lines of a file?
tail
82
What command is used to display the contents of a file page by page?
more or less
83
What command is used to make directory?
mkdir
84
What command is used to remote a print job?
lpr
85
What command is used to translate string of characters?
tr
86
What command is used to count the number of lines, words or characters in a file?
wc
87
What command is used to sort or arrange the lines in a file?
sort
88
What command is used to cut or extract lines of text from a file?
cut
89
What command is used to merge lines from text files horizontally?
paste
90
What command is used to compares the difference between two files?
diff
91
What command is used to filter or search for strings?
grep
92
What command is used to perform pattern matching on files?
awk
93
What is the command that is used for global search and replace actions, using the stream editor?
sed
94
What command is used to create links?
ln
95
What is the character that is used to redirect an output?
>
96
What is the character that is used to append an output to the end of a file?
>>
97
What is the character that is used to pipe or combine the output of a command to another?
|
98
What command is used to copy the output to a specified file and to the screen, at the same time?
tee
99
What command is used to read from standard input and execute a command for each argument that is provided?
xargs
100
What character can you append to a command for it to be executed in the background?
&
101
What command is used to diplay file metadata in a relatively user-friendly structure?
stat
102
What command is used to build and update a database of files? This is based on the /etc/updatedb.conf file
updatedb
103
What is the default text editor in GNOME desktop environments?
gedit
104
What keystroke is used to enter the command mode in VIM?
esc
105
What keystroke is used to enter the execute mode in VIM?
:
106
What keystroke is used to enter the insert mode in VIM?
i
107
What keystroke is used to write or save the file, then quit VIM?
:wq
108
What command is used to extract files from a tar ball?
tar -xf
109
What command is used to copy in and out of an archive?
cpio
110
What command is used to copy and convert files from one media type to another?
dd
111
What command is used to compress/decompress .gz files?
gzip
112
What command is used to compress/decompress .xz files?
xz
113
What command is used to compress/decompress .bz2 files?
bzip2
114
What command is used to invoke the package manager for RHEL?
yum or dnf or rpm
115
What command is used to invoke the package manager for Debian?
apt or dpkg
116
What do you call the software storage locations that package managers can check when installing or updating software?
repo
117
What command is used to create repositories?
createrepo
118
What command is used to see or list all available repositories?
repolist
119
What command is used to clear out-of-date cache information?
clean all
120
What is the compiler in Linux?
gcc
121
What command is used to create a makefile, containing instructions for compiling the software?
./configure
122
What command is used to download files from websites?
wget or curl
123
What do you call the VM or container that is used to isolate an application from the rest of the system ie. for testing new software?
sandbox
124
What command is used to invoke a package manager, to distribute and run software in a sanbox environment?
snap or flatpack or appimage
125
What command is used to show linux processes in real time?
top
126
What command is used to show a snapshot of linux processes?
ps
127
Which partition type can be used to create basic disks, with max of 2TB disks?
mbr
128
Which storage design are the directories organized in hierarchical structure?
file system
129
Which RAID standard does mirroring and requires a minimum of 2 disks?
1
130
In which file can you find the file system table?
etc/fstab
131
What command is used to display the info or details about hardware components?
hwinfo
132
What command is used to add or remove modules on linux?
modprobe
133
What command is used to list (block) storage devices?
lsblk
134
What command is used to list SCSI devices?
lsscsi
135
What is the naming convention for the first storage device containing the second partition?
sda2
136
What is the naming convention for the second storage device containing the first partition?
sdb1
137
What command is used to update the kernel with changes to the partition table?
partprobe
138
What command is used to display (block) partition information i.e. UUID?
blkid
139
What command is used to make a file system?
mkfs
140
Name a file system that is currently used in modern Linux distributions.
xfs
141
What command is used to mount or attach a disk/storage to file system?
mount
142
What is the command that is used to unmount a file system?
umount
143
What command is used to display the disk usage?
du
144
What command is used to display the disk's free space?
df
145
What command is used to control systemd init daemon? It is also used to start, stop, restart, enable and disable services
systemctl
146
What command is used to check the integrity of file system?
fsck
147
What command is used to display or change the file system labels?
e2label
148
What command is used to configure various tunable parameters associated with ext2/3/4 filesystem?
tune2fs
149
What command is used to dump information about ext2/3/4 filesystem?
dumpe2fs
150
What command is used to scan physical volumes?
pvscan
151
What command is used to create physical volumes?
pvcreate
152
What command is used to change attributes of physical volume?
pvchange
153
What command is used to remove physical volumes?
pvremove
154
What command is used to check physical volumes?
pvcheck
155
What command is used to display info about physical volumes?
pvs
156
What command is used to scan virtual group?
vgscan
157
What command is used to create virtual group?
vgcreate
158
What command is used to check the metadata of virtual group?
vgck
159
What command is used to display info about virtual group?
vgs
160
What command is used to rename virtual groups?
vgrename
161
What command is used to add volume or extend virtual group?
vgextend
162
What command is used to reduce or remove volumes from virtual group?
vgreduce
163
What command is used to remove virtual group?
vgremove
164
What command is used to scan logical volume?
lvscan
165
What command is used to create logical volume?
lvcreate
166
What command is used to change attributes of logical volume?
lvchange
167
What command is used to display info about logical volume?
lvs
168
What command is used to rename logical volumes?
lvrename
169
What command is used to add volume or extend logical volume?
lvextend
170
What command is used to reduce the size of logical volumes?
lvreduce
171
What command is used to remove logical volume?
lvremove
172
Bitlocker is for Microsoft device encryption whereas ____ is for Linux
LUKS
173
What is the command that is used to encrypt data before it is written to disk? It is also the front end to LUKS and dm-crypt.
cryptsetup
174
What command is used to display information about existing fibre channel adapters?
fcstat
175
What command is used to display information about the state of multiple paths?
multipathd
176
What file system is prefered in situations where Linux clients access Linux servers?
NFS
177
What command is used to keep track of the IOPS?
iostat or ioping
178
What is the default I/O scheduler in modern versions of Linux kernel?
CFQ
179
Which I/O scheduler is the simplest, and does not sort I/O requests but merely mergest them?
noop
180
Which I/o scheduler sorts I/O operations using three queues?
deadline
181
What command is used to trim the file system with the deleted files?
fstrim
182
What commands can be used to show configuration information for each of the three layers of the LVM?
pvdisplay / vgdisplay / lvdisplay
183
What command is used to securely wipe a storage device? It overwrites contents with random data or all zeroes
shred
184
What command is used to administer or manage udev?
udevadm
185
What command is used to list usb devices?
lsusb
186
What command is used to list pci devices?
lspci
187
Which special device file is used as target for generated data that should be discarded?
null
188
Which special device file is used to fill storage capacity?
/dev/zero
189
Which special device file is used for creating random characters?
/dev/urandom
190
What command is used to display information about the CPU?
lscpu
191
What command is used to display memory blocks?
lsmem
192
What command is used to search for a particular process based on a string that completely or partially identifies the process?
pgrep
193
What command is used to stop a process?
kill
194
What command is used to display the processes consuming the most system resources?
top
195
What command is used to display CPU and memory utilization, with bar graphs and color codes?
htop
196
What command is used to list the running processes?
ps
197
What command is used to list or display open files?
lsof
198
What command is used to retrieve performance stats for boot operation?
systemd-analyse
199
What command is used to display the processes that take the most time to start during boot operations?
systemd-analyse blame
200
What command is used to display system (activity) usage reports?
sar
201
What command is used to display how long the system has been up?
uptime
202
What is the command that is used to change the priority of a process? (a process priority can be changed by its ___ value)
renice
203
What character can you append to a command for it to be executed in the background?
&
204
What command is used to move a job to the background?
bg
205
What command is used to move a job to the foreground?
fg
206
What key stroke can be used to pause a job temporarily, so it can be moved to the background?
ctrl-z
207
What key stroke can be used to stop a running process?
ctrl-c
208
What command is used to prevent process from ending when user logs off (no hang up)?
nohup
209
What command is used to make swap space?
mkswap
210
What command is used to turn on or activate a swap partition?
swapon
211
What command is used to turn off or deactivate a swap partition?
swapoff
212
What command is used to display the quantity of free or unused physical memory?
free
213
What option can be appended to the du, df, and free commands to make the output human-readable?
-h
214
What command is used to display the use of virtual memory?
vmstat
215
What command is used to show device driver messages?
dmesg
216
What command is used to print the name of the kernel?
uname
217
What command is used to list or display the kernel modules?
lsmod
218
What command is used to display info about a module?
modinfo
219
What command is used to install a module?
insmod
220
What command is used to remove a module?
rmmod
221
What command is used to add or remove a module, instead of insmod or rmmod?
modprobe
222
What command is used to identify and update the module dependencies?
depmod
223
In which directory can you find the parameters that you can configure on your system?
proc/sys
224
What command is used to specify an alternative name for a module with a long name?
alias
225
What do you call the fatal system error (BSOD) in Linux?
kernel panic
226
What command is used to display or print messages that have been sent to the kernel's message buffer during and after a system boot?
dmesg
227
What command is used to view and query log files created by systemd journal?
journalctl
228
What do you call the programs that run in the background, in Linux?
daemons
229
What do you call the software that responds to request from other programs?
services
230
Which service synchronizes time among network servers?
ntp krony
231
Which service allows remote access to exported directories? It is also commonly used to connect file servers.
nfs
232
Which service makes web pages available across the network?
http
233
Which service allows secure remote administration?
ssh
234
What is the configuration file (daemon) that initiates the processes listed in it?
init
235
What is the software suite that provides an init method for initializing a system?
systemd
236
What command is used to control systemd init daemon? It is also used to start, stop, restart, enable and disable services
systemctl
237
What command is used to set the graphical target as the default?
graphical.target
238
What commands are used to control SysVinit services?
service
239
What is the default port number for SSH?
22
240
What logging utility is capable of forwarding log files to remote systems?
rsyslog
241
In which directory can you find the various log files?
var/log
242
In which directory can you find the file that defines the time servers?
etc
243
What is the default port number for NTP? It is also used by chrony
123
244
What is the primary task scheduler in Linux?
cron
245
In which directory can you find the file for configuring scheduled tasks?
etc
246
A script shows [30 4 1 * *]. When is the task scheduled to run?
0430 1st day of month
247
In cron what do each of the asterisks represent[* * * * *]?
minute - hour - day of month - month of year - day of week
248
What command is used to run tasks once at a specified time?
at
249
In which directory can you find the files that make up a website?
var
250
What is the default port number for http?
80
251
What is the print management system for Linux that enables a computer to function as a print server?
cups
252
What command is used to list printer queue?
lpq
253
What command is used to print?
lpr
254
What is the port number used by CUPS?
631
255
What command is used to set the time and date in the system?
timedatectl
256
What command is used to display the date?
date
257
What command is used to view or set the hardware clock?
hwclock
258
What command is used to configure the system locale (language) and keyboard layout?
localectl
259
In which directory can you find the the regional timezones that you can configure the system to use?
usr/share/zoneinfo
260
What protocol is used for dynamic IP address assignment?
dhcp ports 67 and 68
261
What protocol is used for host/server name resolution?
dns port 53
262
What protocol is used for file transfer?
ftp ports 20 and 21
263
What command is used to view IP settings? [deprecated]
ifconfig
264
What command is used to view IP settings? Newer command
ip
265
What command is used to configure wireless settings?
iwconfig
266
What command is used to invoke the network manager via CLI?
nmcli
267
What command is used to invoke the network manager via text-based user interface?
nmtui
268
What command is used to invoke the network manager via GUI?
nmgui
269
In which directory can you find the network settings for the Linux system?
etc
270
What command is used to manage (ethernet) NIC driver and network config?
ethertool
271
What command is used to manage the DHCP client configuration?
dhclient
272
What command is used to change the hostname?
hostnamectl
273
In which directory can you find the hosts file?
etc/hostname
274
In which directory can you find the files used by DNS?
etc/resolve.conf
275
What command is used to display and manage routing table?
iproute
276
In which directory can you find the files for managing SSH?
etc/ssh
277
What command is used to download files from websites?
wget or curl
278
What command is used to listen on, and attempt a connection to, a remote computer?
netcat
279
What command is used to conduct secure copy to or from a remote host?
scp
280
Name atleast one GUI-based option for remote access.
cockpit
281
What solution would you recommend if you'd like to connect via SSH yet avoid entering a password?
key based authentication
282
What command is used to send test packets between systems on a network? (command to test connectivity)
ping
283
What command is used to display the network path (hops) between the client and the server?
traceroute
284
What command is used to test name resolution? (linux only)
whois
285
What command is used to test name resolution? (linux and windows)
nslookup
286
What is the command that is used to provide info on internet DNS registration?
whois
287
What command is used for SSL connectivity between client and server?
openssl
288
What command is used to display bandwidth usage information?
iftop
289
What command is used to test throughput between endpoints, server and client?
iperf
290
What is the command that is used to check the related IP addresses and MAC addresses?
arp
291
What is the IPv4 loopback address?
127.0.0.1
292
What are the first 2 numbers in an APIPA?
169.254
293
What command is used to generate SSH keys?
ssh-keygen
294
What command is used to append user's public keys to remote server's authorized keys file
ssh-copy-id
295
What command is used to connect via ssh?
ssh
296
What command is used to scan ports, network nodes and/or subnets?
nmap
297
What is the process of converting data — text, numbers, files, or anything — into a fixed-length string of letters and numbers.
hashing
298
What is the name of the algorithm used to create a 128-bit hash value?
MD5
299
What is the default Linux shell?
bash
300
What are other linux shells?
korn shell or z shell
301
What is the command to alter the firewall?
firewall-cmd
302
What command is used to calculate SHA 256 hash values?
sha256sum
303
What command is used to calculate MD5 hash values
md5sum