MODULE 13- Where data is stored Flashcards

1
Q

What provides a guideline for distributions on how to organize files?

A

The filesystem Hierarchy is a guidelines for distros on how to organize files.

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

Where does the kernel provide access to information about active processes in Linux?

A

The kernel provides access to information about active processes in Linux through the /proc directory.

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

Which filesystem type appears to be real files but only exist in memory with no actual data stored on the disk?

A

A pseudo filesystem appears to be real files but only exist in memory.

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

Which directory contains special files providing access to hardware devices?

A

The /dev directory contains special files providing access to hardware devices.

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

What are two pseudo filesystem examples?

A

The /sys and /proc are two examples of the pseudo filesystems.

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

What is the difference between /sys and /dev?

A

/sys stores information about hardware devices and /dev stores special files for hardware access (to communicate).

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

Which directory store real time information about running processes, system hardware and kernel configuration?

A

The /proc directory stores real time information about running processes, system hardware and kernel information.

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

Which command is used to view active processes utilizing information from the /proc directory?

A

The ‘top’ command is used to view active processes utilizing resources from the /proc directory.

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

Which directory shows information passed to the kernel at boot time?

A

The /proc/cmdline directory shows information passed to the kernel at boot time.

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

Which directory shows the modules currently loaded?

A

the /proc/modules directory shows the modules currently loaded.

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

Which directory shows memory usage by the kernel ?

A

/proc/meminfo directory shows memoery usage by a kernel.

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

Modifying which files under which directory can change the behavior of the Linux kernel?

A

Modifying the files under /proc/sys files can change the behavior of the Linux kernel.

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

What is the purpose of the admin making changes to /proc/sys and adding the configuration to/etc/sysctl.conf.

A

The admin can make changes made to /proc/sys persist after reboot by adding the configuration to/etc/sysctl.conf

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

Which process starts other system processes after the kernel finishes loading?

A

The init process starts other system processes after the kernel finishes loading.

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

What is the PID of the first process started by the kernel during the boot procedure?

A

The first process started by the kernel during the boot procedure is assigned a PID of 1, known as the init process.

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

Where can you find information about the init process on a Linux system?

A

Information about the init process can be found in the /proc/1 directory.

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

What do we call a process started by another process ?

A

A child process is a process started by another process (the parent process).

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

What does PPID represent in the Linux process hierarchy?

A

PPID represents the Parent Process ID, which is the PID of the process that started another process.

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

What can you do with the /proc/sys/kernel/pid_max file ?

A

The maximum PID value can be viewed through the /proc/sys/kernel/pid_max file.

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

What command is used to view the process family tree in Linux?

A

The command pstree is used to display the process family tree.

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

Which command is used to view processes and their parent-child relationship?

A

The ‘ps –forest’ command is used to view processes and their parent-child relationship.

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

Which command can be used to view processes?

A

The ‘ps’ command can be used to view processes.

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

Which two commands allow viewing all processes on a system?

A

The ‘ps aux’ and ‘ps -ef’ commands allow viewing all processes on a system

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

What key in the top command is used to terminate a runaway process?

A

The ‘K’ -key in the top command is used to terminate a process.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
What is the effect of sending signal number 9 (KILL signal) in the top + 'k'-key command?
Sending signal number 9 (KILL signal) forces the process to terminate immediately
16
Which ps option allows viewing a process of a specific user?
The 'ps -u' option allows viewing a process of a specific user.
16
What are you required to specify after using the K key prompt in the top command?
User must provide the PID of the process and a signal number to send.
17
What key is used to adjust the priority (renice) of a process in the top command?
The R key is used to adjust the priority (renice) of a process in the top command.
18
What does pressing the R key in the top command prompt the user for?
Pressing the R key prompts the user for the process to renice and the niceness value to assign.
19
What is the range of niceness values in the top command, and how do they affect priority?
Niceness values range from -20 to 19, with lower values increasing priority and higher values decreasing priority.
20
what indicates how busy the system has been during the last one, five and fifteen minutes?
load averages indicate how busy the system has been during the last one, five and fifteen minutes.
21
How can you view load averages through a file and a command?
You can view the load averages via the cat '/proc/loadavg' file or the 'uptime' command.
22
What does the fourth value in this load averages output indicate? (0.12 0.46 0.25 '1/254' 3052)
The fourth value indicates the number of processes currently executing code on the CPU (1) and the total number of processes (254).
23
What does the fifth value in this load averages output indicate? (0.12 0.46 0.25 1/254 '3052')
The fifth value is the last PID value that executed code on the CPU.
24
What do we call the processes of addressing more memory than physically available by mapping portions of a physical hard disk as additional memory.
Virtual addressing is the processes of addressing more memory than physically available by mapping portions of a physical hard disk as additional memory.
24
What do we call the area where user programs and applications run, and it allows users to interact with the system through system calls to the kernel?
User space is where user programs and applications run, and it allows users to interact with the system through system calls to the kernel.
25
What method does Linux use to allow multiple processes to share memory without conflicts or crashes?
Linux uses virtual addressing, which allows many processes to access the same memory without conflicts or crashes.
26
What act as intermediaries between user space programs and the kernel, allowing communication between the two?
System call APIs act as intermediaries between user space programs and the kernel, allowing communication between the two.
27
What do we call the area where the kernel code is stored and executed, and it is protected from other processes?
Kernel space is where the kernel code is stored and executed, and it is protected from other processes.
28
Which command can be used to view memory?
The 'free' command can be used to view memory.
29
Which command would one use to view memory and have it update every 10 seconds?
To view memory and have it update every 10 seconds use the 'free -s 10' command.
30
Which files are used for troubleshooting problems, monitoring system activity, and detecting unauthorized access attempts.
Log files are used for troubleshooting problems, monitoring system activity, and detecting unauthorized access attempts.
31
What do we call the process that handles the collection and management of log data from processes and stores it in log files?
A logging daemon handles the collection and management of log data from processes and stores it in log files.
32
What is rsyslogd responsible for in modern Linux distributions?
rsyslogd is responsible for handling system logging, combining the functions of syslogd and klogd into a single service.
33
What command is used to view logs in systemd-based distributions?
The command used to view logs in systemd-based distributions is journalctl
34
How does journald differ from older logging daemons like syslogd and klogd?
Journald is part of systemd and allows for both text and binary log outputs, while older logging daemons (syslogd and klogd) were text-based
34
Where are log files typically stored in Linux systems?
Log files are almost always stored in the /var/log directory structure.
35
What is it called when older log files are renamed and replaced with newer log files?
when older log files are renamed and replaced with newer log files it is called rotation.
36
What are the key characteristics of /var/log/btmp and /var/log/wtmp files that differentiate them from other log files?
They contain binary data rather than plain text and require specific commands (lastb and last) to interpret their contents correctly.
37
How can a user safely determine the content type of a log file before viewing it?
By using the 'file' command -then the log file as argument, which classifies the content type and alerts if it's binary
38
Which command is used to view the contents of /var/log/wtmp?
The 'last' command.
39
Which command is used to view the contents of /var/log/btmp?
The lastb command.
40
Which commands are used for interpreting binary data relation to binary log files?
last and lastb commands interpret and convert the binary data in /var/log/wtmp and /var/log/btmp into human-readable text.
41
Which command shows the contents of the kernel ring buffer?
dmesg command shows the contents of the kernel ring buffer.
42
Which file contains kernel messages specifically from system startup and helps diagnose hardware initialization and kernel boot issues?
the /var/log/dmesg file contains kernel messages specifically from system startup and helps diagnose hardware initialization and kernel boot issues?
43
What is the difference between the /var/log/dmesg file and the /var/log/messages file?
/var/log/dmesg contains only startup kernel messages, while /var/log/messages contains ongoing kernel messages mixed with output from daemons and other processes.
44
What do we call a directory that can be shared across a network and used by multiple machines.?
A shareable directory is one that can be shared across a network and used by multiple machines.
45
Which type of directory is one where the contents are expected to change over time?
A variable directory is one where the contents are expected to change over time.
46
Which directory contains files that typically do not change after installation?
A static directory contains files that typically do not change after installation.
47
What directory holds essential binary commands like ls, cp, and rm?
/bin directory holds essential binary commands like ls, cp, and rm?
48
Which directory contains Device files representing hardware and special devices.
the /dev directory contains Device files representing hardware and special devices.
48
Which directory serves as the top-level directory that unifies all other directories, including local, removable, and network-mounted resources?
/ directory serves as the top-level directory that unifies all other directories, including local, removable, and network-mounted resources?
48
Which directory Contains files needed to boot the system, such as the kernel and bootloader configs?
the /boot directory Contains files needed to boot the system, such as the kernel and bootloader configs?
49
Which directory contains Host-specific configuration files?
/etc directory contains Host-specific configuration files like /etc/passwd and /etc/hosts
50
Which directory stores User home directories?
/home directory stores User home directories
51
Which directory contains essential shared libraries for binaries in /bin and /sbin?
/lib directory contains essential shared libraries for binaries in /bin and /sbin
52
Which directory is the Mount point for removable media that is auto-mounted?
/media directory is the Mount point for removable media that is auto-mounted.
53
What makes /lib64 different from /lib?
It contains 64-bit architecture-specific libraries, e.g., for x86_64 systems.
54
Which directory is the Mount point for manually mounted filesystems?
/mnt directory is the Mount point for manually mounted filesystems?
55
What kind of software is found in /opt?
Optional third-party software not managed by the package manager.
56
Which directory is A virtual filesystem providing kernel and process information?
the /proc directory is A virtual filesystem providing kernel and process information
57
Which is the home directory for the root user.
/root is the home directory for the root user.
58
Which directory stores Essential system binaries, usually only used by the root user?
/sbin directory stores Essential system binaries, usually only used by the root user?
59
Which directory is a virtual filesystem with details about system hardware and devices?
/sys directory is a virtual filesystem with details about system hardware and devices.
60
Which directory Hosts site-specific data for services such as FTP or HTTP.
/srv directory Hosts site-specific data for services such as FTP or HTTP.
61
Which directory is a Temporary file storage for all users; expected to be cleared at boot time (though not guaranteed).?
/tmp directory is a Temporary file storage for all users; expected to be cleared at boot time (though not guaranteed).
62
Which directory Holds non-essential software and data for multi-user environments?
/usr directory Holds non-essential software and data for multi-user environments?
63
Which directory stores Application cache data used to improve performance?
/var/cache directory stores Application cache data used to improve performance?
64
Which directory Stores most log files generated by the system and services?
/var/log Stores most log files generated by the system and services
65
Which directory is for installation of software that does not originate with the distribution. Often this directory is used for software that is compiled from the source code?
/usr/local hierarchy is for installation of software that does not originate with the distribution. Often this directory is used for software that is compiled from the source code
66
Which directory is used to alter the settings of the kernel?
The /proc/sys directory is used to alter the settings of the kernel
67
Which directory is also known as the bit bucket?
The /dev/null directory is known as the bit bucket.
67
Which character do you use after a command to run it in the back round so you can continue to use the terminal?
Use the & character after a command to run it in the back round so you can continue to use the terminal.
67
Which command would you use to bring a command with job number 5 to the foreground?
fg %5
68
Which command is used to see commands running in the current terminal?
jobs
68
Which command/keystroke is used to suspend a job/command and send it to the back round?
Ctrl+Z
68
Which command would you use to send a command or process with a job number 7 to the back round?
bg %7
68
Which command/keystroke is used to kill or end a job/command currently running in the foreground?
Ctrl+C
68
Which command allows you to simultaneously kill all jobs working under the same command?
killall (commandname), eg killall ping.
68
Which command allows you to kill a command or job using its job number?
kill %5
69
How do you kill a command without using a PID or job number but using its program name?
pkill -15 (programname) , eg pkil -15 ping
69
How do you kill a command with the PID of 57?
kill 57
69
Which command is used to manage or work with processes?
top
69
Which signal in the top command is for force kill and which one is the default kill signal?
9 is the force kill signal and 15 is the default kill signal.
70
Which ps option shows all the processes?
ps -e
70
Which ps option allows you to specify which columns to output?
ps -o
70
Which ps option allows you to specify which column to sort by?
--sort