INTRODUCTION Flashcards

Understanding Your Hardware

1
Q

What is hardware and what are peripherals?

A

Hardware refers to the entire computer your Linux operating system will run on while the peripherals are the hardware bits that are removable or otherwise talk with the world. Video cards can be part of the motherboard or separate cards, they’re still considered peripherals. Peripherals are also called devices.

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

What is the kernel of an operating system?

A

The kernel of an operating system is just the part that manages the interactions between the hardware and the applications.The Linux kernel runs on the CPU and memory that’s on the motherboard. To write something to disk, display something on the screen, or talk to a web server in Brazil, the kernel must send messages over the bus that connects the CPU to the peripherals. Think of the kernel as an air traffic controller that coordinates all the airplanes, runways, and ground crew.

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

What does a driver do? what is its function?

A

The solution is to get the kernel to speak a common language and have the peripheral manufacturers provide a driver that allows their specific hardware to speak that common language.

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

how to find out how the CPU address the peripheral?

A

the CPU needs to be able to address the peripheral through one or more of several means:
Enumerating Your Peripherals
Peripherals talk to the CPU and other peripherals on a shared resource called a bus. To uniquely identify hardware, the CPU needs to be able to address the peripheral through one or more of several means:

Image
Image IO port—An address, or range of addresses, identifying the device; e.g., 0080, 1000-107f.

Image IRQ—Interrupt requests (IRQs) signal the processor that an event has happened and that the CPU is requested to come check on the resource. It a limited resource that can sometimes be shared.

Image DMA—Direct memory access (DMA) allows a peripheral to access system memory directly rather than having the CPU intervene.

The two methods of viewing the current hardware list on a Linux system are

Image Viewing the contents of the /proc filesystem

Image Using one of the hardware listing tools

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

What is procfs?

A

procfs is the most popular way to expose kernel information to users.

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

what is the goal of sysfs?

A

The goal of sysfs is to solve some of these shortcomings by migrating device data to /sys. Data still can exist on both, and the device tools such as lspci still use /proc.

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

What is udev?

A

udev is the Linux kernel’s device manager. It manages the device files under /dev using information about the device from sysfs. Every accessible device on the system will have a corresponding device file under /dev
If a device is plugged in to the computer while it is running, udev can configure it and make it available to the system. Devices that support being plugged in at runtime are also called hotplug devices, as opposed to coldplug devices that require the computer to be rebooted for them to be used.

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

what is D-bus?

A

Another loosely related service is called D-Bus. This is a distributed software bus that lets desktop applications send messages to each other and receive messages from the kernel. It could also be used by udev to notify the window manager when a DVD has been inserted into the system.

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

What is the motherboard?

A

Motherboards is the component that houses the CPU and RAM. It often comes with integrated peripherals, which are peripherals built into the motherboard. Video cards and network adapters are the most frequent integrated peripherals, but sound cards, RAID adapters, or special external peripheral ports could also be present.

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

What is the command to check coldplug devices?

A

Its #lspci

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

What is the command to check or look for hotplug devices like usb?

A

Its #lsusb

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

What is Redundant Array of Independent Disks (RAID)??

A

. This adapter may do some of the necessary parity calculations and it prevents data lost and help to storage data.

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

What do you do when a peripheral is not supported at all?

A

If the peripheral is not supported at all, your best course of action is to disable it entirely so that you can replace it with something that works. To do so

Step 1. Reboot your computer and enter BIOS setup mode. This involves pressing a special key while the computer boots. Your computer’s BIOS displays a message such as “PRESS F12 TO ENTER BIOS SETUP.”

Step 2. Navigate the setup menu to find the hardware section corresponding to the device you want to disable.

Step 3. Select the option to disable the peripheral.

Step 4. Exit the BIOS menu, making sure to select the option to save. This last part is important as the usual default is to discard all changes and reboot!

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

What is a partition? And what is used for?

A

A single disk drive is divided up into one or more partitions that logically separate the disk. This logical separation allows you to assign space on the same drive for different uses.

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

What is the filesystem?

A

It´s a partition formatted that allows it to store files. The operating system uses the filesystem to map files to the actual blocks on disk and manage directories and permissions.

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

What are the benefits of partitions?

A

Partitioning allows you to limit the scope of disk problems and to tune according to the intended use. Also problems encountered in an unexpected reboot are also reduced through partitioning.

17
Q

how Linux names the partitions?

A

The drives or devices are given a letter and a number is appended for the partition as follows:

Image /dev/sda is the first hard drive (a) in the system.

Image /dev/sda1 is the first partition (1) on the first hard drive (a) in the system.

Image /dev/sdb3 is the third partition (3) on the second drive (b) in the system.

Caution: The first partition is partition 1, but in most other situations 0 (zero) is the first device. /dev/md0 is the first RAID volume and /dev/scd0 is the first CD drive.

18
Q

What is the main difference regarding partions between Linux and Windows?

A

In Windows, if you have three disk drives, they will probably be called C:, D:, and E:. Add a DVD drive and that is called F:. In Linux, just like other Unixes, there’s just one filesystem, and drives are grafted onto directories by mounting the filesystem at a particular point in the parent filesystem. The parent filesystem could be the root filesystem or it could be a descendant.

19
Q

true or false: Files in / go on sdb3; it is the root partition.?

A

false Files in / go on sda1; it is the root partition.

20
Q

true or false: Files in /sbin go on sda1; it is still part of the root filesystem ?

A

true:

Files in /sbin go on sda1; it is still part of the root filesystem.

21
Q

True or false: Files in /usr go on sdb2; it is mounted off the root filesystem on /usr.

A

False: Files in /usr go on sdb1; it is mounted off the root filesystem on /usr.

22
Q

True or false: Files in /usr/bin go on sdb1; it is part of the same filesystem as /usr. ??

A

True: Files in /usr/bin go on sdb1; it is part of the same filesystem as /usr.

23
Q

True or false: Files in /usr/local go on sda3; it is mounted on /usr/local/.

A

True: Files in /usr/local go on sda3; it is mounted on /usr/local/.

24
Q

True or False: Files in /usr/local/bin go on sda4; the /usr/local/mount is more specific than the /usr mount.??

A

False: Files in /usr/local/bin go on sda3; the /usr/local/mount is more specific than the /usr mount.

25
Q

True or false: Files in /home go over a network file system (NFS) share and are stored on a completely different computer. ??

A

True: Files in /home go over a network file system (NFS) share and are stored on a completely different computer.

26
Q

How the OS manage the partitions?

A

Each partition has a filesystem on it, and the operating system stitches everything together to look like one big filesystem even though it may span multiple devices or even separate computers.

27
Q

How is the USB drive treated in Linux?

A

it’s treated as if it were a fixed hard drive.

28
Q

When deciding how to lay out your disks, a useful acronym to remember for real-world needs is PIBS:

A

Performance—Performance increases if the system’s heavy usage directory trees are put on another disk. Good candidates for a move to another disk are the /home directory or the swap partition.
Integrity—Integrity improves by having critical files in their own partition. If disk resources become corrupted or damaged, such as from a sudden power outage, the computer can be down for hours to complete a filesystem check
Backup—Separate partitions give you more control over backups. For example, you may only want to back up files that change often in /home and conduct less frequent backups for files that do not change often within /usr.
Security—When placing partitions and directory trees on the system, be aware that it’s much easier to isolate or jail a risky portion of your server if it’s contained on a separate partition or disk.