Comptia Linux+ study guide – by objective

Jump to sections:

1.1 – Summarize Linux fundamentals

Filesystem Hierarchy Standard (FHS)

/boot – files required for booting the system (bootloader, kernels, efi, etc)

/proc – virtual fs containing kernel and process info as files. real time data

/sys – virtual fs containing device, driver, kernel info as files. real time data

/var – contains files whose contents are likely to change frequently. spool, log files, some temp files, etc.

/usr – contains data for standard Linux programs. Read-only, shareable. (/usr/bin – local user programs. /usr/sbin/ – system programs. /usr/local – programs unique to local installation)

/lib – contains library files required by executables

/dev – contains device files (ex. /dev/sda, sata disk 1) and special device files (ex. /dev/null)

/etc – contains static system configuration files

/opt – contains optional/add-on software packages

/bin – commands or symlinks to commands for system admin or users, which can be used in single-user mode

/sbin – contains binaries required for system administration

/home – contains users’ home directories

/media – mount point for removable storage devices

/mnt – mount point for other temporarily mounted filesystems

/root – home directory for root user

/tmp – contains temporary files created by the system

Basic boot process

Basic input/output system (BIOS) – system firmware that starts the system, initializes the hardware, and loads a bootloader from a storage device or network location.

Unified Extensible Firmware Interface (UEFI) – modern implementation of bios that boots from the EFI disk partition, allowing it to use any size bootloader, or multiple bootloaders. Typically /boot/efi and uses .efi file extension, ex. linux.efi

initrd.img – file mounted by the kernel at boot time as a ramdisk. Allows the kernel to load modules for hardware/filesystems that are not compiled into the kernel itself. located in /boot/initrd.img-kernelversion

mkinitrd – used by (pre 7.0) Redhat systems to update the initrd.img after adding new hardware that needs to be available at boot time.

click to show/hide manpage
mkinitrd [--version] [-v] [-f] [--preload=module] [--omit-scsi-modules] [--omit-raid-modules] [--omit-lvm-modules] [--with=module] [--image-version] [--fstab=fstab] [--nocompress] [--builtin=module] [--nopivot] [--with-fips] image kernel-version 

options

--builtin=module

    Act as if module is built into the kernel being used. mkinitrd will not look for this module, and will not emit an error if it does not exist. This option may be used multiple times. 
-f

Allows mkinitrd to overwrite an existing image file.
--fstab=fstab
    Use fstab to automatically determine what type of filesystem the root device is on. Normally, /etc/fstab is used. 
--image-version
    The kernel version number is appended to the initrd image path before the image is created. 
--nocompress
    Normally the created initrd image is compressed with gzip. If this option is specified, the compression is skipped. 
--nopivot
    Do not use the pivot_root system call as part of the initrd. This lets mkinitrd build proper images for Linux 2.2 kernels at the expense of some features. In particular, some filesystems (such as ext3) will not work properly and filesystem options will not be used to mount root. This option is not recommended, and will be removed in future versions. 
--omit-lvm-modules
    Do not load any lvm modules, even if /etc/fstab expects them. 
--omit-raid-modules
    Do not load any raid modules, even if /etc/fstab and /etc/raidtab expect them. 
--omit-scsi-modules
    Do not load any scsi modules, including 'scsi_mod' and 'sd_mod' modules, even if they are present. If the root partition is on a scsi device, mkinitrd will still include the necessary scsi modules to support that device. 
--preload=module
    Load the module module in the initial ramdisk image. The module gets loaded before any SCSI modules which are specified in /etc/modprobe.conf. This option may be used as many times as necessary. 
-v

Prints out verbose information while creating the image (normally the mkinitrd runs silently).
--version
    Prints the version of mkinitrd that's being used and then exits. 
--with=module
    Load the modules module in the initial ramdisk image. The module gets loaded after any SCSI modules which are specified in /etc/modprobe.conf. This option may be used as many times as necessary. 
---with-fips
    Force adding kernel integrity checking to the created initrd. 

dracut – generates a new initramfs (debian) including the correct modules.

ex: dracut -f /boot/initramfs-(kernelversion).img

click to show/hide manpage
dracut [OPTION]... <image> <kernel-version> 

options

-f, --force
    overwrite existing initramfs file. 
-m, --modules LIST
    specify a space-separated list of dracut modules to call when building the initramfs. Modules are located in /usr/share/dracut/modules.d. 
-o, --omit LIST
    omit a space-separated list of dracut modules. 
-a, --add LIST
    add a space-separated list of dracut modules. 
-d, --drivers LIST
    specify a space-separated list of kernel modules to exclusively include in the initramfs. The kernel modules have to be specified without the ".ko" suffix. 
--add-drivers LIST
    specify a space-separated list of kernel modules to add to the initramfs. The kernel modules have to be specified without the ".ko" suffix. 
--omit-drivers LIST
    specify a space-separated list of kernel modules to omit from the initramfs. The kernel modules have to be specified without the ".ko" suffix. Regular expressions are also allowed like ".*/fs/ocfs/.*".

    If [LIST] has multiple arguments, then you have to put these in quotes.

    example: # dracut --omit "module1 module2" ... 
--filesystems LIST
    specify a space-separated list of kernel filesystem modules to exclusively include in the generic initramfs. 
-k, --kmoddir {DIR}
    specify the directory, where to look for kernel modules 
--fwdir {DIR}
    specify additional directory, where to look for firmwares 
--kernel-only
    only install kernel drivers and firmware files 
--no-kernel
    do not install kernel drivers and firmware files 
--mdadmconf
    include local /etc/mdadm.conf 
--nomdadmconf
    do not include local /etc/mdadm.conf 
--strip
    strip binaries in the initramfs (default) 
--nostrip
    do not strip binaries in the initramfs 
-h, --help
    display help text and exit. 
--debug
    output debug information of the build process 
-v, --verbose
    verbose output during the build process 
-c, --conf FILE
    specify configuration file to use. Default: /etc/dracut.conf 
--confdir DIR
    specify configuration directory to use. Default: /etc/dracut.conf.d 
-l, --local
    local mode. Use modules from the current working directory instead of the system-wide installed in /usr/share/dracut/modules.d. Useful when running dracut from a git checkout. 
-H, --hostonly
    Host-Only mode: Install only what is needed for booting the local host instead of a generic host. 
-i, --include SOURCE TARGET
    include the files in the SOURCE directory into the target directory in the final initramfs. 
-I, --install LIST
    install the space separated list of files into the initramfs. 

Grand Unified Bootloader version 2 (GRUB2) – replaces legacy Grub bootloader. Configuration file located at /boot/grub, but changes should be made to files in /etc/grub.d folder.

grub2-install – installs grub2 to the primary disk drive after grub.cfg has been created.

ex: grub2-install /dev/sda

click to show/hide manpage
grub-install [--modules=MODULES] [--install-modules=MODULES]
		     [--themes=THEMES] [--fonts=FONTS] [--locales=LOCALES]
		     [--compress[=no,xz,gz,lzo]] [-d | --directory=DIR]
		     [--grub-mkimage=FILE] [--boot-directory=DIR]
		     [--target=TARGET] [--grub-setup=FILE]
		     [--grub-mkrelpath=FILE] [--grub-probe=FILE]
		     [--allow-floppy] [--recheck] [--force] [--force-file-id]
		     [--disk-module=MODULE] [--no-nvram] [--removable]
		     [--bootloader-id=ID] [--efi-directory=DIR] INSTALL_DEVICE

options

       --modules=MODULES
	      Pre-load modules specified by MODULES.

       --install-modules=MODULES
	      Install only MODULES and their dependencies.  The default is to install all available modules.

       --themes=THEMES
	      Install THEMES.  The default is to install the starfield theme, if available.

       --fonts=FONTS
	      Install FONTS.  The default is to install the unicode font.

       --locales=LOCALES
	      Install only locales listed in LOCALES.  The default is to install all available locales.

       --compress=no,xz,gz,lzo
	      Compress GRUB files using the specified compression algorithm.

       --directory=DIR
	      Use images and modules in DIR.

       --grub-mkimage=FILE
	      Use FILE as grub-mkimage.  The default is /usr/bin/grub-mkimage.

       --boot-directory=DIR
	      Use DIR as the boot directory.  The default is /boot.  GRUB will put its files in a subdirectory of this directory named grub.

       --target=TARGET
	      Install GRUB for TARGET platform.  The default is the platform grub-install is running on.

       --grub-setup=FILE
	      Use FILE as grub-setup.  The default is /usr/bin/grub-setup.

       --grub-mkrelpath=FILE
	      Use FILE as grub-mkrelpath.  The default is /usr/bin/grub-mkrelpath.

       --grub-probe=FILE
	      Use FILE as grub-probe.  The default is /usr/bin/grub-mkrelpath.

       --allow-floppy
	      Make the device also bootable as a floppy.  This option is the default for /dev/fdX devices. Some BIOSes will not boot  images  cre-
	      ated with this option.

       --recheck
	      Delete any existing device map and create a new one if necessary.

       --force
	      Install even if problems are detected.

       --force-file-id
	      Use identifier file even if UUID is available.

       --disk-module=MODULE
	      Use  MODULE for disk access.  This allows you to manually specify either biosdisk or native disk access.	This option is only avail-
	      able on the BIOS target platform.

       --no-nvram
	      Do not update the boot-device NVRAM variable.  This option is only available on IEEE1275 target platforms.

       --removable
	      Treat the target device as if it is removeable.  This option is only available on the EFI target platform.

       --bootloader-id=ID
	      Use ID as the bootloader ID.  This opption is only available on the EFI target platform.

       --efi-directory=DIR
	      Use DIR as the EFI System Partition root.  This opption is only available on the EFI ta rget platform.

       INSTALL_DEVICE
	      Install GRUB to the block device INSTALL_DEVICE.

grub2-mkconfig – reads the configs located in /etc/grub.d and combines them into a single grub.cfg file. Can be used to manually edit the cfg file with -o flag:

grub2-mkconfig -o /boot/grub2/grub.cfg

click to show/hide manpage
grub-mkconfig [OPTION]

options

       Generate a grub config file

       -o, --output=FILE
	      output generated config to FILE [default=stdout]

       -h, --help
	      print this message and exit

       -v, --version
	      print the version information and exit

grub2-update – a frontend that combines the grub2-install and grub2-mkconfig utilities into a single script

click to show/hide manpage
    update-grub, update-grub2 
-- a stub for running grub-mkconfig -o /boot/grub/grub.cfg to generate a grub2 config file. 

vmlinuz – “z” at the end indicates compressed kernel image loaded into memory at boot time. vmlinux refers to an uncompressed kernel image. Decompressed once in memory. Located in /boot/vmlinuz-kernelversion

Preboot eXecution Environment (PXE) – network bootloader. Allows diskless systems or network installs. Uses dhcp to obtain an IP address and the location of PXE server. Uses BOOTP to download the bootloader image via TFTP (or NFS/etc). Each workstation must have a config file in /tfptboot/pxelinux.cfg directory. Files are named based on the MAC address of the workstations.

Booting from USB – duh

Booting from ISO – duh

Kernel Panic

Often caused by installing a new kernel without the correct modules or libraries, or starting/stopping a process at a new runlevel. Initrd/initramfs may not have been updated after changes. Use rescue mode at bootloader to boot single user mode or an older kernel to troubleshoot. (dracut / mkinitrd to generate new initrd.)

Device types in /dev

Block devices – transfer data in blocks rather than one character at a time. Represents the entire device, not just the filesystem. (list with lsblk, blkid)

Character devices – transfer data one character at a time. Devices that stream data, for ex. mice, keyboards, audio, serial ports, etc. No buffer

Special character devices – provide extra features to the shell. /dev/null, /dev/zero, /dev/urandom are special character devices

/dev/null – discards all data written to it. Useful for suppressing command output in scripts, etc. Returns EOF (end of file) when read

/dev/zero – produces a stream of binary zeros when read. Useful for erasing disks, creating test files, etc.

/dev/urandom – (/dev/random) provide access to kernel’s random number generator. urandom produces a pseudo-random number based on currently available data. random produces higher quality random numbers but may not produce a result if there is insufficient entropy.

Basic package compilation from source

3 basic steps after downloading/extracting source code:

./configure – analyzes your system and modifies the make script for your particular environment. Checks for required dependencies and enables/disables options selected by flags.

make – builds libraries and executables necessary for the application.

click to show/hide manpage
 make [ -f makefile ] [ options ] ... [ targets ] ... 

Options

-b, -m
    These options are ignored for compatibility with other versions of make. 
-B, --always-make
    Unconditionally make all targets. 
-C dir, --directory=dir
    Change to directory dir before reading the makefiles or doing anything else. If multiple -C options are specified, each is interpreted relative to the previous one: -C / -C etc is equivalent to -C /etc. This is typically used with recursive invocations of make. 
-d
    Print debugging information in addition to normal processing. The debugging information says which files are being considered for remaking, which file-times are being compared and with what results, which files actually need to be remade, which implicit rules are considered and which are applied---everything interesting about how make decides what to do. 
--debug[=FLAGS]
    Print debugging information in addition to normal processing. If the FLAGS are omitted, then the behavior is the same as if -d was specified. FLAGS may be a for all debugging output (same as using -d), b for basic debugging, v for more verbose basic debugging, i for showing implicit rules, j for details on invocation of commands, and m for debugging while remaking makefiles. 
-e,--environment-overrides
    Give variables taken from the environment precedence over variables from makefiles. 
+-f file, --file=file, --makefile=FILE
    Use file as a makefile. 
-i, --ignore-errors
    Ignore all errors in commands executed to remake files. 
-I dir, --include-dir=dir
    Specifies a directory dir to search for included makefiles. If several -I options are used to specify several directories, the directories are searched in the order specified. Unlike the arguments to other flags of make, directories given with -I flags may come directly after the flag: -Idir is allowed, as well as -I dir. This syntax is allowed for compatibility with the C preprocessor's -I flag. 
-j [jobs], --jobs[=jobs]
    Specifies the number of jobs (commands) to run simultaneously. If there is more than one -j option, the last one is effective. If the -j option is given without an argument, make will not limit the number of jobs that can run simultaneously. 
-k, --keep-going
    Continue as much as possible after an error. While the target that failed, and those that depend on it, cannot be remade, the other dependencies of these targets can be processed all the same. 
-l [load], --load-average[=load]
    Specifies that no new jobs (commands) should be started if there are others jobs running and the load average is at least load (a floating-point number). With no argument, removes a previous load limit. 
-L, --check-symlink-times
    Use the latest mtime between symlinks and target. 
-n, --just-print, --dry-run, --recon
    Print the commands that would be executed, but do not execute them. 
-o file, --old-file=file, --assume-old=file
    Do not remake the file file even if it is older than its dependencies, and do not remake anything on account of changes in file. Essentially the file is treated as very old and its rules are ignored. 
-p, --print-data-base
    Print the data base (rules and variable values) that results from reading the makefiles; then execute as usual or as otherwise specified. This also prints the version information given by the -v switch (see below). To print the data base without trying to remake any files, use make -p -f/dev/null. 
-q, --question
    ''Question mode''. Do not run any commands, or print anything; just return an exit status that is zero if the specified targets are already up to date, nonzero otherwise. 
-r, --no-builtin-rules
    Eliminate use of the built-in implicit rules. Also clear out the default list of suffixes for suffix rules. 
-R, --no-builtin-variables
    Don't define any built-in variables. 
-s, --silent, --quiet
    Silent operation; do not print the commands as they are executed. 
-S, --no-keep-going, --stop
    Cancel the effect of the -k option. This is never necessary except in a recursive make where -k might be inherited from the top-level make via MAKEFLAGS or if you set -k in MAKEFLAGS in your environment. 
-t, --touch
    Touch files (mark them up to date without really changing them) instead of running their commands. This is used to pretend that the commands were done, in order to fool future invocations of make. 
-v, --version
    Print the version of the make program plus a copyright, a list of authors and a notice that there is no warranty. 
-w, --print-directory
    Print a message containing the working directory before and after other processing. This may be useful for tracking down errors from complicated nests of recursive make commands. 
--no-print-directory
    Turn off -w, even if it was turned on implicitly. 
-W file, --what-if=file, --new-file=file, --assume-new=file
    Pretend that the target file has just been modified. When used with the -n flag, this shows you what would happen if you were to modify that file. Without -n, it is almost the same as running a touch command on the given file before running make, except that the modification time is changed only in the imagination of make. 
--warn-undefined-variables
    Warn when an undefined variable is referenced.

make install – installs the newly built components into the correct directories on the system, ready to use. Sometimes you can use make uninstall to remove the application.

Storage concepts

File storage – everything in linux is a file. Block storage devices are formatted with filesystems. Filesystems contain the virtual directory structure. Other storage devices can be mounted as directories (mountpoints) in that virtual structure.

Block storage – physical storage devices are block storage devices in linux. Need to be formatted with a filesystem and mounted. Represented as device files (ex. /dev/sda)

Object storage – data is stored as objects in a unstructured, flat hierarchy (buckets). Objects contain data, metadata, and a unique identifier, rather than being a file organized in a directory structure and spread across blocks or chunks. Ideal for objects which are written once and accessed once or many times. Accessed through an API. ex. Amazon s3, Ceph

Master boot record (MBR) – Old partitioning scheme with a 2TB disk size limit. Only the first sector of the disk is used to contain the partition table and the primary bootloader. May have up to 4 primary partitions. May create an extended partition (uses 1 of the primary slots and doesn’t have its own partition ID) which contains an unlimited number of logical partitions.

GUID [globally unique identifier] Partition Table (GPT) – newer partitioning scheme, no disk size limitation like MBR. Allows up to 128 primary partitions. May have a large EFI partition that allows for bootloaders of an unlimited size, or booting kernels directly.

Partition type – For MBR disks, Primary (up to 4) / Extended (1) / Logical (unlimited). For GPT disks, Primary (up to 128), EFI, Protected MBR, Microsoft Reserved MSR

Filesystem in Userspace (FUSE) – kernel module that allows non-privileged users to create, mount, and access filesystems without root access. Allows for the use of many different non-linux filesystems, remote filesystems, virtual filesystems, and more.

RAID levels - 0/1/5/10 are common.  
Raid 0 - data striped across all disks, no parity or mirroring.  Fastest reads, fastest writes, largest amount of usable space, but lose all data if any drive fails.  
Raid 1 - data mirrored across all disks, no parity or striping.  Fast reads, but write speed is = single drive.  Lowest usable space.  Can lose all but one drive before data loss.  
Raid 5 - data striped across all disks, with distributed parity.  High read speed similar to Raid 0, slightly lower write speed due to parity calculation.  Can lose any 1 drive without losing data.  
Raid 10 - Combination of Raid 0 and Raid 1.  Striped mirrors, no parity.  High performance, high fault tolerance, low usable space.  Can lose all but one drive of each mirror before losing data.

Striping – data is broken into chunks and split evenly across all drives in the array

Mirroring – data is replicated in full to all drives in the array. All drives have exactly the same data

Parity – a parity bit is calculated by comparing the differences between data chunks stored on different drives in a striped array. The parity bit can then be used to recalculate and restore data in the event of a drive failure.

Listing hardware information

lspci – generate a list of pci devices and buses in the system.

click to show/hide manpage
       lspci [options]

Options

Basic display modes

-m

Dump PCI device data in a backward-compatible machine readable form. See below for details.

-mm

Dump PCI device data in a machine readable form for easy parsing by scripts. See below for details.

-t

Show a tree-like diagram containing all buses, bridges, devices and connections between them.

Display options

-v

Be verbose and display detailed information about all devices.

-vv

Be very verbose and display more details. This level includes everything deemed useful.

-vvv

Be even more verbose and display everything we are able to parse, even if it doesn't look interesting at all (e.g., undefined memory regions).

-k

Show kernel drivers handling each device and also kernel modules capable of handling it. Turned on by default when -v is given in the normal mode of output. (Currently works only on Linux with kernel 2.6 or newer.)

-x

Show hexadecimal dump of the standard part of the configuration space (the first 64 bytes or 128 bytes for CardBus bridges).

-xxx

Show hexadecimal dump of the whole PCI configuration space. It is available only to root as several PCI devices crash when you try to read some parts of the config space (this behavior probably doesn't violate the PCI standard, but it's at least very stupid). However, such devices are rare, so you needn't worry much.

-xxxx

Show hexadecimal dump of the extended (4096-byte) PCI configuration space available on PCI-X 2.0 and PCI Express buses.

-b

Bus-centric view. Show all IRQ numbers and addresses as seen by the cards on the PCI bus instead of as seen by the kernel.

-D

Always show PCI domain numbers. By default, lspci suppresses them on machines which have only domain 0.

Options to control resolving ID's to names

-n

Show PCI vendor and device codes as numbers instead of looking them up in the PCI ID list.

-nn

Show PCI vendor and device codes as both numbers and names.

-q

Use DNS to query the central PCI ID database if a device is not found in the local pci.ids file. If the DNS query succeeds, the result is cached in ~/.pciids-cache and it is recognized in subsequent runs even if -q is not given any more. Please use this switch inside automated scripts only with caution to avoid overloading the database servers.

-qq

Same as -q, but the local cache is reset.

-Q

Query the central database even for entries which are recognized locally. Use this if you suspect that the displayed entry is wrong.

Options for selection of devices

-s [[[[<domain>]:]<bus>]:][<slot>][.[<func>]]
    Show only devices in the specified domain (in case your machine has several host bridges, they can either share a common bus number space or each of them can address a PCI domain of its own; domains are numbered from 0 to ffff), bus (0 to ff), slot (0 to 1f) and function (0 to 7). Each component of the device address can be omitted or set to "*", both meaning "any value". All numbers are hexadecimal. E.g., "0:" means all devices on bus 0, "0" means all functions of device 0 on any bus, "0.3" selects third function of device 0 on all buses and ".4" shows only the fourth function of each device. 
-d [<vendor>]:[<device>]
    Show only devices with specified vendor and device ID. Both ID's are given in hexadecimal and may be omitted or given as "*", both meaning "any value". 

Other options

-i <file>
    Use <file> as the PCI ID list instead of /usr/share/hwdata/pci.ids. 
-p <file>
    Use <file> as the map of PCI ID's handled by kernel modules. By default, lspci uses /lib/modules/kernel_version/modules.pcimap. Applies only to Linux systems with recent enough module tools. 
-M

Invoke bus mapping mode which performs a thorough scan of all PCI devices, including those behind misconfigured bridges, etc. This option gives meaningful results only with a direct hardware access mode, which usually requires root privileges. Please note that the bus mapper only scans PCI domain 0.
--version
    Shows lspci version. This option should be used stand-alone. 

PCI access options

The PCI utilities use the PCI library to talk to PCI devices (see pcilib(7) for details). You can use the following options to influence its behavior:
-A <method>
    The library supports a variety of methods to access the PCI hardware. By default, it uses the first access method available, but you can use this option to override this decision. See -A help for a list of available methods and their descriptions. 
-O <param>=<value>
    The behavior of the library is controlled by several named parameters. This option allows to set the value of any of the parameters. Use -O help for a list of known parameters and their default values. 
-H1

Use direct hardware access via Intel configuration mechanism 1. (This is a shorthand for -A intel-conf1.)

-H2

Use direct hardware access via Intel configuration mechanism 2. (This is a shorthand for -A intel-conf2.)
-F <file>
    Instead of accessing real hardware, read the list of devices and values of their configuration registers from the given file produced by an earlier run of lspci -x. This is very useful for analysis of user-supplied bug reports, because you can display the hardware configuration in any way you want without disturbing the user with requests for more dumps. 
-G

Increase debug level of the library. 

lsusb – generate a list of usb devices and buses in the system

click to show/hide manpage
lsusb [ options ] 

options

-v, --verbose

    Tells lsusb to be verbose and display detailed information about the devices shown. This includes configuration descriptors for the device's current speed. Class descriptors will be shown, when available, for USB device classes including hub, audio, HID, communications, and chipcard. 
-s [[bus]:][devnum]
    Show only devices in specified bus and/or devnum. Both ID's are given in decimal and may be omitted. 
-d [vendor]:[product]
    Show only devices with the specified vendor and product ID. Both ID's are given in hexadecimal. 
-D device
    Do not scan the /dev/bus/usb directory, instead display only information about the device whose device file is given. The device file should be something like /dev/bus/usb/001/001. This option displays detailed information like the v option; you must be root to do this. 
-t

Tells lsusb to dump the physical USB device hierarchy as a tree. This overrides the v option.
-V, --version
    Print version information on standard output, then exit successfully. 

dmidecode – pulls SMBIOS data from sysfs. (/sys/firmware/dmi/tables). -t for info type.

click to show/hide manpage
 dmidecode [OPTIONS] 

options

-d, --dev-mem FILE
    Read memory from device FILE (default: /dev/mem) 
-q, --quiet
    Be less verbose. Unknown, inactive and OEM -specific entries are not displayed. Meta-data and handle references are hidden. 
-s, --string KEYWORD
    Only display the value of the DMI string identified by KEYWORD. KEYWORD must be a keyword from the following list: bios-vendor, bios-version, bios-release-date, system-manufacturer, system-product-name, system-version, system-serial-number, system-uuid, baseboard-manufacturer, baseboard-product-name, baseboard-version, baseboard-serial-number, baseboard-asset-tag, chassis-manufacturer, chassis-type, chassis-version, chassis-serial-number, chassis-asset-tag, processor-family, processor-manufacturer, processor-version, processor-frequency. Each keyword corresponds to a given DMI type and a given offset within this entry type. Not all strings may be meaningful or even defined on all systems. Some keywords may return more than one result on some systems (e.g. processor-version on a multi-processor system). If KEYWORD is not provided or not valid, a list of all valid keywords is printed and dmidecode exits with an error. This option cannot be used more than once. 
-t, --type TYPE
    Only display the entries of type TYPE. TYPE can be either a DMI type number, or a comma-separated list of type numbers, or a keyword from the following list: bios, system, baseboard, chassis, processor, memory, cache, connector, slot. Refer to the DMI TYPES section below for details. If this option is used more than once, the set of displayed entries will be the union of all the given types. If TYPE is not provided or not valid, a list of all valid keywords is printed and dmidecode exits with an error. 
-u, --dump
    Do not decode the entries, dump their contents as hexadecimal instead. Note that this is still a text output, no binary data will be thrown upon you. The strings attached to each entry are displayed as both hexadecimal and ASCII . This option is mainly useful for debugging. 
--dump-bin FILE
    Do not decode the entries, instead dump the DMI data to a file in binary form. The generated file is suitable to pass to --from-dump later. 
--from-dump FILE
    Read the DMI data from a binary file previously generated using --dump-bin. 
-h, --help
    Display usage information and exit 
-V, --version
    Display the version and exit

Options --string, --type and --dump-bin determine the output format and are mutually exclusive. 
Return to top of page

Posted

in

by

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *