1-Filesystem and Device Files Flashcards

1
Q

pseudo file system

A

A pseudo file system is something that looks like system devices but is not associated to real hardware and just exposes kernel information in human readable format.

proc, sysfs, ioports are examples of pseudofilesystems

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

/etc/fstab

A

A file that tells the system what storage devices to automatically mount at boot. A user can either display device names here or use the devices UUID number in case devices are frequently swaped.
Get the UUID with the command blkid.

Information the file needs:
Device Name: Name of the device.
System Mount: Where the device will mount on a user’s system
File System Type: If this is unknown, auto will detect it.
Options: defaults is the most common man fstab gives more options.
Partition Back up: 0=no 1=yes
Check Disk: Check for file system errors 0=no 1=yes

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

/proc

A

A directory that is classified as a pseudo file system. The /proc directory contains files with information about local devices and running processes. Process files are given it’s own directory named after it’s PID (Process Identification Number).

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

/proc/interrupts

A

it shows info about how are the hardware is communicating with CPU and interrupt is a number associated with a process that is a driver or kernel module that uses these numbers to interrupt the CPU to communicate with it (ex. eth0 is interrupt)

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

/proc/ioports

A

Addresses that identify a device.

The CPU uses IO ports to communicate with devices and check the status of a device.

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

/proc/dma

A
it is address that a device can used to access system memory directly (without going through CPU)
Example usb (cat usb)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

/sys

A

A pseudo file system created to address problems with the unstructured /proc directory. /sys stores a list of hardware and kernal modulars on a system and does not store running processes like the /proc directory. (it list general info about hardware and kernel modular)

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

/dev

A

it is not a separate file system, but it is a method of listing hardware within a directory (disk, floppy, tty, loopback, ram, standard input and standard output, ..etc).

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

udev

A

is a device manager and associated with /dev which contain devices date. udevice is detect the device when we add or remove devices (hot plugging and hot swapping)

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

dbus

A

it relating to /dev and it allows desktop app to send messages to devices

udev can send messages using dbus to desktop app to pop a message (example when we insert CD-ROM)

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

What does lsmod command do? what directory is it linked to?

A

Lists the kernel modules loaded into memory and any dependencies. Linked to /proc/modules. lsmod is just nicely format the content of /proc/module

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

command to display CPU information

A

lscpu

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

lscpu -ae

A

Shows all active CPU information and offline CPU’s as well

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

lsblk

A

List the block devices or storage devices and partitions of storage devices mounted on the system.

  • f flag will include the file system type.
  • t will display the output in a tree format.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

lspci

A

display pci info (slot and port) of pci devices (ex. audio device, usb,..etc)

lspci -vmm display more organized info in separate sections

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

lsscsi

A

Short for list scsi, a command used to list attached sata devices of a system.

Flags:

  • d Displays information about the major and minor device numbers.
  • g Give the generic scsi device name of each device.
  • s Shows the size of each scsi device.
  • v, -vv, -vvv Shows different levels of verbose information.
  • l Displays a long view of information.
17
Q

lsusb

A

display information about attached usb devices

18
Q

lsdev

A

List everything recognized by the running kernal.

Outputs the device name the IRQs (Interrupt Request), I/O ports and DMAs (Direct Memory Access).

lsdev pulls this information from the /proc file system.

19
Q
lspci
lsmod
lsblk
lscpu
lsdev
A

list informations by pulling them from pseudo filesystems such as /sys /proc /dev