Flashcards in 1-Filesystem and Device Files Deck (19)
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
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
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).
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)
Addresses that identify a device.
The CPU uses IO ports to communicate with devices and check the status of a device.
it is address that a device can used to access system memory directly (without going through CPU)
Example usb (cat usb)
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)
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).
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)
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)
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
command to display CPU information
Shows all active CPU information and offline CPU's as well
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.
display pci info (slot and port) of pci devices (ex. audio device, usb,..etc)
lspci -vmm display more organized info in separate sections
Short for list scsi, a command used to list attached sata devices of a system.
-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.
display information about attached usb devices
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.