1-Filesystem and Device Files Flashcards Preview

LPIC 1 - Self Study - Linux Academy > 1-Filesystem and Device Files > Flashcards

Flashcards in 1-Filesystem and Device Files Deck (19)
Loading flashcards...
1

pseudo file system

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

2

/etc/fstab

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

3

/proc

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).

4

/proc/interrupts

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)

5

/proc/ioports

Addresses that identify a device.

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

6

/proc/dma

it is address that a device can used to access system memory directly (without going through CPU)
Example usb (cat usb)

7

/sys

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)

8

/dev

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).

9

udev

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)

10

dbus

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)

11

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

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

12

command to display CPU information

lscpu

13

lscpu -ae

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

14

lsblk

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.

15

lspci

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

lspci -vmm display more organized info in separate sections

16

lsscsi

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

lsusb

display information about attached usb devices

18

lsdev

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

lspci
lsmod
lsblk
lscpu
lsdev

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