101 Exam Flashcards

1
Q

Regular File System

A

Method of laying out files and folders on a physical hard disk

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

Two primary psuedo file system locations

A

/proc

/sys

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

Linux Kernel

A
  • Core framework of the OS
  • Handles memory management and hardware device interactions
  • Many third-party kernel modules are device drivers
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

uname

A

displays information about current running kernel

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

uname -m

A

prints machine hardware name

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

uname -rm

A

brings up kernel release version with hardware name

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

uname -a

A

brings up OS, host name of the server, kernel release version, build time of the kernel, machine architecture, cpu type, and the OS label

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

modprobe

A

used to dynamically load and unload kernel modules at runtime

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

modprobe -r

A

used to remove a kernel module

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

modprobe (name)

A

used to add a kernel module

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

xfs module

A

used by kernel to know how to work with the PC’s file system

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

/udev

A

device manager for the Linux kernel, links information on system.

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

lspci

A
  • displays information on PCI devices attached
  • should the kernel not recognize a device, it will show up here and contain information that can be used to find drivers/modules
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

lsusb

A

displays information on USB devices attached

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

lsblk

A

lists hard disk and partition

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

procfs

A

Information about system hardware and the state of the system is contained in this
‘pseudofilesystem’

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

/proc

A
  • Usually where the procfs filesystem is mounted.
    -Within this directory, you will find directories that correspond in label (number) to the
    associated PID (Process ID) of running processes
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

/proc/mounts

A

file (or link to another file) that contains information on all the
filesystems that are mounted locally

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

/proc/interrupts

A

shows information about the interrupts in use in the system

and what they are associated with (the hardware that is using them)

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

/proc/ioports

A
one or more addresses that identify a device, and the kernel
module associated with them
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

/proc/dma

A
(Direct Memory Access), values used by hardware to access system
memory directly (i.e. without involving the CPU)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

/proc/usb

A

USB device IDs and kernel modules associated with them

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

/proc/pci

A

PCI device IDs and kernel modules associated with them

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

sysfs

A
  • ‘pseudofilesystem’ that can contain information about system hardware (like procfs)
    -designed to address some of the problems with the procfs method (unstructured data and
    the fact that both hardware and process information was consolidated in the structure)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
Q

/sys

A
  • Where the ‘sysfs’ filesystem is mounted
    -Within this directory, you will directories that correspond to system hardware and kernel
    modules associated with the system (physical or virtual)
    -process data (PID) does NOT exist in this method
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
26
Q

/dev

A

-contains device data (using the information from /sys or sysfs)
- Devices added or removed on a live system will engage the udev system which will detect
and configure it and then make it available for use (often called ‘hotplug’ or ‘hotswap’)

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

D-Bus

A

-send data messages between applications
udev utilizes dbus to notify user and the system when new hardware is attached
-Allows desktop applications to send messages to other applications and/or receive
messages from the Linux kernel

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

lsmod

A
  • displays a listing of all currently loaded kernel modules

- Will not load a driver if missing

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

lscpu

A

displays information on processors on a system

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

lscpu -a (–all)

A

will display offline and online CPUs

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

lscpu -b (–online)

A

only online CPU information

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

lscpu -c (–offline)

A

only offline CPU information

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

lscpu -e (–extended)

A

display information in a more readable format

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

lscpu -p (–parse)

A

provides the information displayed in a comma delimited form (that can be
logged and used by other applications for reporting)

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

lsscsi

A
  • displays information on any SCSI devices detected

- some distros will display SATA devices connected

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

lsscsi -c (–classic)

A

output is the same as running cat /proc/scsi/scsi

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

lsscsi -d (–device)

A

provides additional ‘major/minor’ device numbers behind each detected device

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

lsscsi -g (–generic)

A

generic SCSI device file name (sg)

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

lsscsi -l (–long)

A

additional information for each device

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

lsscsi -s (–size)

A

print the disk size in a more readable format

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

lsscsi -v (-vv or -vvv)

A

controls the level of detail (verbosity)

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

lsdev

A

Shows all the devices that are recognized by the running system kernel

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

lsraid

A

• Displays any RAID (Redundant Array of Inexpensive Disks) on your system
• not installed on most systems, unavailable outside of some RAID drivers/configuration
software

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

lsusb -t

A
  • tells you which device is attached to which controller

- displayed in a tree view

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

lsusb -s

A

shows the specified bus and device number information

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

lsusb -d [vendor]

A

show only devices with the indicated vendor and product ID

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

lsusb -v

A

verbose device output

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

lsblk -a (–all)

A

list empty devices as well (off by default)

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

lsblk -d (–nodeps)

A

print only top level device information

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

lsblk -e (–exclude)

A

exclude the indicated devices (one or more, comma separated)

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

lsblk -f (–fs)

A

include information on filesystems

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

lsblk -i (–ascii)

A

use ASCH characters for tree view

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

lsblk -l (–list)

A

output list format

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

Pseudo File System

A
  • Does not exit on a physical hard disk
  • pseudo - “fake” or “not real”
  • only exists in RAM while system is running
  • cleared upon a reboot
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
55
Q

dri

A
  • Direct Rendering Interface

- pertains to the video cards attached to the system

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

lspci -k

A

lists out which components of the hardware are being used with which particular kernel modules

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

lspci -v (or -vv or -vvv)

A

be verbose and list more detailed information about all devices

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

General boot order 1

A

Power on

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

General boot order 2

A

BIOS loads ( modern systems includes EFI)

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

General boot order 3

A

BIOS find and hands off to the primary (or chosen) disks ‘boot sector’

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

General boot order 4

A

Boot sector provides the MBR (Master Boot Record), within the first 512 bytes of the active (or
first, depending on installation) drive (can be any type of hard drive)

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

General boot order 5

A

Boot loader is executed

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

General boot order 13

A

Modules indicated within the init scripts are loaded

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

General boot order 14

A

root filesystem is checked

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

General boot order 15

A

remaining filesystems are mounted

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

General boot order 16

A

network devices are started

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

General boot order 17

A

remote filesystems are mounted (if configured)

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

General boot order 18

A

init process re-reads /etc/inittab and changes to the default runlevel indicated and
executes the appropriate scripts

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

General boot order 19

A

runlevel scripts executed in numeric order (#service for the runlevel indicated in /etc/
inittab)

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

General boot order 20

A

tty sessions are loaded as listed in /etc/inittab

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

General boot order 21

A

Login prompt is displayed, system is ready for login

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

General boot order 12

A

/etc/inittab is read and the appropriate runlevel script(s) are run

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

General boot order 11

A

The init program is loaded (and becomes the first PID - /sbin/init)

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

General boot order 10

A

root filesystem is mounted

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

General boot order 9

A

Device initialization, module loading, and the initial RAM disk (initrd) is loaded

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

General boot order 8

A

linux kernel is read and executed

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

General boot order 7

A

USER INPUT STEP
depending on boot loader configuration, the user may be able to choose
from a menu of potential boot types/kernel versions or allow the default to proceed

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

General boot order 6

A

LILO/GRUB/GRUB2 boot loader begins

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

sysvinit

A
  • older system and service management
  • init script driven
  • written by Miquelvan Smoorenburg
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
80
Q

init (initialization)

A
  • based off of the system V init used in UNIX systems
  • services start one after the other
  • static. does not natively respond to changes on a system
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
81
Q

inittab: wait

A

process specified will be started once when the runlevel is entered, and init will wait for its termination.

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

Red Hat init script

A

/etc/rc.d/

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

Debian init script

A

/etc/init.d

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

/etc/init.d/rc

A

script that orchestrates how the runlevel scripts run and what occurs when a runlevel changes

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

upstart (background)

A
  • first developed for Ubuntu in 2006 by Scott Remnant
  • started in Ubuntu 6.10
  • Eventually used in Red Hat 6, Debian, and Fedora 9
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
86
Q

upstart

A
  • offers asynchronous starting of services - decreasing boot up times
  • works off real-time events
  • stops and starts services, and monitors their availability
  • considered easily extensible
  • not used by most distros
  • dynamic. can respond to changes on the system
  • supports all sysvinit methods but not systemd methods
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
87
Q

init Runlevel 3

A
  • Multi-user mode but with networking.

- most linux servers are set up to run at this level by default.

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

init Runlevel 2

A
  • Multi-user with no networking

- No remote file systems mounted

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

init Runlevel 6

A
  • Reboot

- where init stops services and restarts the system.

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

init Runlevel 5

A

Multi-user but with networking and GUI.

Older Linux webstations set to run on this by default.

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

init Runlevel 4

A

typically not used but available should a system administrator want to set up a custom run level environment.

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

init Runlevel 1

A
  • single user mode
  • only root user allowed to log in.
  • primarily used for maintenance tasks and repair functionality
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
93
Q

init Runlevel 0

A
  • halt or shutdown level

- where init runs scripts that stop services and powers off the system.

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

systemd

A
  • removed the need for shell scripts
  • replaces the functionality of scripts with compiled C code
  • still compatible with older System V scripts
  • default on most modern distros
  • designed to replace sysvinit method
  • fewer dependencies
  • service prioritization and precedence
  • reduces start up time
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
95
Q

Unit File Locations:

/usr/lib/systemd/system

A
  • the ‘units’ installed

- provided by package installations (do not edit these unit files)

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

Unit File Locations:

/etc/systemd/system

A

units that have priority over other units and are controlled by
sysadmin

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

Unit File Locations:

/run/systemd/system

A

units created at runtime and may have priority over non-runtime (or installed) units

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

systemctl

A

primary command for controlling service start/stop/restart/status

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

system-analyze

A

display performance information on system bootup, allows for

trace/debugging information

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

logind

A

replaces consolekit, supports X Windows managers

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

consoled

A

console daemon, replaces virtual terminals

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

journald

A

logging system, uses binary logs (although it can be replaced by other logging
daemons)

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

networkd

A

network support daemon

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

.service

A

system service

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

.swap

A

swap device or file

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

.socket

A

IPC socket

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

.target

A

unit (one or a group of)

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

.snapshot

A

saved state instance of the systemd manager

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

.slice

A

units grouped together in a hierarchy used to manage processes

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

.timer

A

timer

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

.mount

A

mount point on the file system (local or remote)

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

.automount

A

automount point on the filesystem

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

.scope

A

externally created process

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

.path

A

file or directory on file system

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

.device

A

device in use by the system kernel

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

systemd runlevel 0

A
  • poweroff.target

- shutdown the system

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

systemd runlevel 1

A
  • rescue.target

- single user/rescue shell

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

systemd runlevel 2,3 and 4

A
  • multi-user.target

- non-graphical, but full network, multi-user

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

systemd runlevel 5

A
  • graphical.target

- full graphical desktop, multi-user

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

systemd runlevel 6

A
  • reboot.target

- reboot

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

Service target dependencies

A

• Method of indicating dependencies between units or groups of units on the system

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

Service target dependencies - requires

A

• Only after the requirement is met, will any other ‘wanted’ units be started

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

Service target dependencies - wants

A

Only executed upon completion of ‘requires’ units

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

systemd boot process changes

A
  • /etc/inittab is not read (and is no longer in use)
  • ‘default.target’ is started (which is linked to the current ‘default’ target - multiuser, graphical, etc)
  • A tree of ‘requires’ and ‘wants’ is then followed throughout the process
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
125
Q

runlevel (command)

A

displays the current runlevel (and the previous, if available)

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

systemctl get-default

A

displays the current default runlevel target

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

systemctl set-default [new.target]

A
  • Will set the default runlevel target to the indicated value
  • Creates a link from ‘default.target’ to the indicated target
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
128
Q

systemctl list-units –type=target

A

list all the active system targets

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

systemctl isolate [runlevel.target]

A

Allows you to set the runlevel of the system without changing the default

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

Components of the Unit File

A

-unit files follow the INI style format first seen in MS-DOS

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

lspci -m (-mm)

A

displays the PCI device information in a more “easily parseable” format

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

lspci -vm

A

nicely formatted listing of all PCI hardware on the system

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

lspci -t

A

displays a tree view of the PCI devices on the system

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

lspci -tvm

A

associate the device names with the IDs in a tree view

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

PCI

A
  • Peripheral Component Interconnect

- PCI device is any piece of computer hardware that plugs directly into a PCI slot on a computer

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

Commands to view output from kernel ring buffer

A
  • dmesg - legacy command

- journalctl -k viewed within the systemd journal

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

/sbin/init

A

binary used to bring up the rest of the system and start services

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

Boot order overview

A
  • BIOS
  • Boot sector (w/ Boot loader)
  • Kernel
  • Initial RAM disk
  • Device initialization
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
139
Q

upstart: Task

A

will do what is requested and will return to a waiting state once finished

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

upstart: Service

A

Will not stop by itself

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

upstart: Job state

A

condition at one point in time

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

upstart: Waiting

A

initial state of a job

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

upstart: Starting

A

job itself is about to start

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

upstart: Stopping

A

interim state where job has processed a section of it’s configuration known as prestop

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

upstart: Killed

A

where job is actually stopped

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

upstart: Post-stop

A

where job has completely stopped and goes in waiting state

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

upstart: Respawning

A
  • occurs when something goes wrong when job is running and quits unexpectedly
  • upstart will attempt to respawn a job up to 10 times at 5 second intervals
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
148
Q

sysvinit: change runlevel

A
  • telinit or init (followed by runlevel)
  • must be root user
  • telinit is legacy command
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
149
Q

sysvinit: pull default runlevel

A

cat/etc/inittab

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

sysvinit: change runlevel during restart

A
  • press any key during boot process
  • press “a” in GRUB menu
  • type run level number to use
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
151
Q

reboot (command)

A

reboot system

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

shutdown -h

A

halt the system (shut it down)

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

shutdown -r [specifictime]

A

reboot system at the time given

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

shutdown -P

A

power off (if ACPI is available)

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

shutdown -C

A

cancel shutdown

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

shutdown -k [message]

A

broadcasts a ‘wall’ message to logged in users

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

halt -f (–force)

A

does not shutdown, only halts

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

halt -p (–poweroff)

A

power off after shutdown (if ACPI is available)

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

halt -w (–wtmp-only)

A

only LOGS the shutdown but does not perform the shutdown

or reboot

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

halt –verbose

A

displays more information for troubleshooting

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

systemd Target

A
  • target is a unit that syncs up other units when the computer boots or changes states
  • other units associate themselves with a target for an operating environment
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
162
Q

multi-user.target

A
  • multi-user system
  • similar to runlevel 3
  • provides a command line shell with networking and the ability to host multiple user log ins
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
163
Q

graphical.target

A
  • multi-user system with a desktop environment. similar to runlevel 5
  • “picture text”
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
164
Q

rescue.target

A
  • pulls in basic system and file system mounts and provides a rescue shell
  • there to provide an isolated environment for the root user to perform repairs on the system.
  • similar to runlevel 1
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
165
Q

basic.target

A

basic system. used during the boot process before another

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

sysinit.target

A

system initialization

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

systemctl list-unit-files -t target

A

show all unit files for available targets

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

systemctl list-units -t target

A

show all loaded and active unit files

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

systemctl get-default

A

list out the default target

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

systemctl set-default [new.target]

A

change the default target to a different target

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

systemctl isolate [runlevel.target]

A

will change the running state of the system from the current target to a different target

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

systemctl rescue

A
  • almost identical to the System V init single-user mode

- allows the root user to repair the system

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

systemctl reboot

A
  • will run the reboot target

- same thing as just typing reboot at the prompt

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

systemctl poweroff

A
  • isolates the system to poweroff.target

- same as typing poweroff at the prompt

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

systemctl halt

A

halt. do not power off

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

systemctl poweroff

A

halt and power off (if ACPI is available)

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

wall

A
  • allows you to broadcast a message to all logged in users.
  • limited to 20 lines of text
  • will appear on every terminal overwriting or interrupting terminal text
  • terminate with CTRL+D
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
178
Q

reboot commands

A
  • reboot
  • telinit 6
  • shutdown -r now
  • systemctl isolate reboot.target
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
179
Q

Shutdown commands

A
  • poweroff
  • telinit 0
  • shutdown -h+1
  • systemctl isolate poweroff.target
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
180
Q

ACPI

A

-Advanced Configuration and Power Interface
-registers system events
(pressing power button or closing laptop lid)

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

mount (command)

A

list out every partition and every mount point currently in use on the system

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

block device

A

hard disk or anything that takes a large amount of data and writes it and blocks sizes to a location

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

single disk installation

A

linux installed on a single physical disk, consisting of one or more partitions

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

multi-disk installation

A

linux installed on multiple physical disks, each consisting of on or more partitions

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

dev/sda

A

first physical SATA disk on a system

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

dev/sda2

A

first physical disk, second partition

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

dev/hdc2

A

third IDE drive, second partition

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

dev/scd0

A
  • first CDROM drive

- CDROM doesn’t have partitions

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

Linux filesystem layout

A
  • everything is a file
  • any folder (few exceptions) can be mounted on any drive/partition
  • shared development system with constrained disk space
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
190
Q

/

A
  • ‘root’ filesystem is mounted on a device/partition and contains all other folders
  • bottom of the directory tree
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
191
Q

/var

A
  • log files, shared files/directories, runtime information, binary data files
  • generally set up on a separate partition
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
192
Q

/home

A

user’s home directory, where personal files are stored

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

/boot

A

-boot loader configuration and kernel files are contained here

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

/opt

A
  • generally third party applications are installed here

- enterprise environments make use of this location

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

swap

A
  • temporary storage that acts like RAM
  • when a percentage of RAM is full, kernel will move less used data to swap
  • much slower than using a dedicated partition
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
196
Q

Swap size

A

older ‘rules’ ranged from 1.5x to 2x of avail RAM

-today should use no less than 50% of avail

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

LVM (Logical Volume Manager)

A
  • Allows the creation of ‘groups of disks’ or partitions that can be assembled into a filesystem.
  • can be used for nearly any mount point except /boot
  • flexibility - allows for resizing of volumes
  • snapshots- allows for ‘point in time’ copies of your logical volume
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
198
Q

VG (Volume Group)

A
  • combination of one or more PV to create a pool of avail storage
  • Contains all of your physical volumes
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
199
Q

LV (Logical Volumes)

A
  • Volume group is carved into individual components that can be used for specific functions
  • like a partition
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
200
Q

pvs (command)

A

lists out the physical volumes in an LVM group

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

vgs (command)

A

lists out the volume groups within an LVM group

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

lvs (command)

A

lists out the logical volumes within an LVM group

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

PV (Physical Volume)

A
  • basic starting point of storage

- corresponds to a disk or partition

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

Swap - Partition

A

dedicated partition formatted specifically as swap space

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

Swap - files

A

created file that is used on a filesystem as swap space for the system

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

grub-install [device]

A
  • command used to install GRUB to the specified device
  • typically done from a live CD/USB where GRUB is installed on a new disk
  • can be identified by drive path /dev/hda or /dev/hd0
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
207
Q

grub (command)

A

-invokes GRUB shell environment and prompt

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

help (command)

A

print the help listing for GRUB, or get more info on a command

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

GRUB: find (command)

A

search for a file in all partitions and list the devices the file is on

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

GRUB: quit (command)

A

exit grub shell

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

MBR (Master Boot Record)

A
  • traditionally supported only 26 total partitions

- partition size limited to 2TB

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

GPT (GUID Partition Table)

A
  • supports 128 partitions
  • partition size up to ZB range
  • Needs UEFI to boot and asks as BIOS
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
213
Q

UEFI (United Extensible Firmware Interface)

A
  • replacement for traditional BIOS, can act in legacy BIOS mode
  • requires 64bit OS
  • prevents unauthorized
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
214
Q

grub2-editenv list

A

view the default boot entry for the grub configuration file

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

grub2-mkconfig

A
  • creates or updates a /boot/grub2/grub.cfg file based on entries from the /etc/default/grub file
  • used to generate the GRUB configuration file menu
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
216
Q

update-grub

A
  • can be used to update a GRUB2 configuration after changes to /etc/default/grub have been made
  • same results as running grub-mkconfig -o /boot/grub/grub.cfg
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
217
Q

GRUB Legacy: [A] key

A

append options to the kernel boot line

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

GRUB Legacy: [C] key

A

open up the GRUB command lilne

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

GRUB Legacy: [ESC] key

A

escapes out of any GRUB menu

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

GRUB Legacy: Arrow Keys

A

used to highlight an option in the GRUB menu

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

RHGB

A

Red Hat Graphical Boot

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

Setup (command)(hd0)

A

used to reinstall GRUB

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

GRUB2: [E] key

A

used to edit GRUB menu item

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

GRUB2: [Esc] key

A

go to previous menu item

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

GRUB2: Ctrl+x or F10

A

boots a selection or modified line

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

GRUB (legacy) /boot

A
  • ‘boot volume’ for GRUB
  • kernel and related files are stored here
  • kernel config file
  • kernel initrd (ramdisk) file
  • default boot message
  • system map file
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
227
Q

/boot/grub

A

-Legacy GRUB configuration directory

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

menu.lst/grub.conf

A

GRUB options and builds the menu of choices displayed on boot

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

GRUB Legacy menu list:

deftault=[#]

A

determines the menu option that will be started if nothing else is chosen

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

GRUB Legacy menu list:

timeout=[#]

A

the amount of time, in seconds, you have to choose another option

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

GRUB Legacy menu list:

title [description]

A

text based description of the menu entry

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

GRUB Legacy menu list:

root [(hd#,#)]

A

hard drive device number and partition of the root drive (where the kernel is)

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

GRUB Legacy menu list:

initrd [/boot/initrd#.img]

A

path to the initial RAM disk image for the chosen menu entry

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

GRUB2: /boot

A
  • ‘boot’ volume for GRUB2
  • kernel config file
  • kernel initrd (ramdisk) file
  • default boot message
  • system map file
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
235
Q

GRUB2: /boot/grub

A
  • compatibility with GRUB directory

- sometimes will contain splash image for the boot menu

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

/boot/grub2/grub.cfg

A

-combination of a number of files when the grub2-mkconfig utility is used

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

/boot/grub2/fonts

A

default and custom font for the GRUB2 menu

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

/boot/grub2/themes

A

themes for the GRUB2 graphical menu

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

/etc/grub.d

A

-numbered files that, when the grub2-mkconfig utility is run, all are concatenated to make the /boot/grub2/grub.cfg (menu) file

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

/etc/deftault/grub

A

file containing the GRUB2 specific configurations

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

grub2-install

A

installs GRUB2 to the indicated location

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

APT - Advanced Package Tool

A

-installs applications and their dependencies
-remove applications
-updates and upgrades packages
-reads /etc/apt/sources.list
directs installation and uninstallation of packages to dpkg

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

/etc/apt/sources.list

A

configuration file that lists out repository locations for packages

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

apt-get update (command)

A

updates the local apt cache with a listing of packages that can be updated/upgraded and installed

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

apt-get upgrade (command)

A

upgrades the packages that have updates available

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

apt-get install (package name)

A

installs a package from the repositories in the sources.list file

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

apt-get remove (package name)

A

removes package from the system but any config files that came with the package will be left behind

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

apt-get purge (package name)

0r dpkg –purge

A

removes the package from the system and any associated configuration files

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

apt-get dist-upgrade

A

upgrades all packages on the system up to the next release of the distro

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

apt-get download (-d) (package name)

A
  • downloads the package and places in /var/cache/apt/archives
  • does not install it
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
251
Q

Shared Library

A
  • files containing functionality that other applications can use
  • files can end in a ‘.so’ extension - for ‘shared object’
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
252
Q

Shared Libraries are found here

A

-/lib
-/usr/lib (32 bit)
-/usr/lib64 (64 bit)
/usr/local/lib
-/usr/share

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

Two types of library files

A
  • dynamic - ends in.so

- statically linked - ends in .a

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

ldd

A

prints out shared object library dependencies

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

ldconfig

A
  • configures dynamic linker run-time bindings

- creates a cache based on library directories and can show you what is cached

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

/etc/ld.so.conf

A

configuration file that points to directories and other configuration files that hold references to library directory locations

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

LD_LIBRARY_PATH

A

Legacy environment variable that points to a path where library files can be read from

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

Shared Libraries: Soft links

A

where specific library versions are linked to a more generic name

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

Static linking

A
  • application contains a full copy of the library that is used
  • application will have exact library version it expects with known interfaces
  • size is a disadvantage
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
260
Q

Dynamic linking

A
  • application uses the library externally using ‘stubs’, the library is installed on the OS itself but not installed with the app
  • size is an advantage
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
261
Q

ld.so

A

any time an app needs to use a shared library, the ld.so is called
-known as ‘dynamic linker’

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

Repository

A

remote location that you can download and install packages from using any of the package management tools

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

/etc/apt/sources.list.d

A
  • files that define one or more remote repository locations for package download and installation
  • each may contain lines for both packages and another for package resources
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
264
Q

apt-get

A

Package manager that can install, reinstall or remove packages and all their dependencies at the
same time

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

apt-cache

A

allows you to interact with the cache of available packages from all configured repositories

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

apt-cache search [value]

A

search for packages matching the indicated value

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

apt-cache show [packagename]

A

show available information about the indicated package

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

apt-cache showpkg [packagename]

A

additional technical information about the package

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

aptitude and synaptic

A
  • similar to apt and uses it in the background

- has a graphical front end

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

dpkg package

A
  • application or utility
  • default configuration files
  • how and where to install files
  • listing of dependencies the package requires
  • apt handles the dependencies
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
271
Q

dpkg –info [packagename] or

dpkg -I (capital i)

A

displays package contents

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

dpkg –status [packagename]

A

abbreviated display of the –info option

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

dpkg -l [packagename or partial name]

A

lists out package(s) that match the string provided

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

dpkg -i (–install) [packagename]

A
  • will install the indicated package name

- fail if there are missing dependencies

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

dpkg -L (–listfile) [packagename]

A

list all files that were installed with the indicated package

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

dpkg -r (–remove) [packagename]

A

removes the package’s files but any configuration files and directories will be left alone

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

dpkg -P (–purge) [packagename]

A

removes the package’s files AND and configuration files and directories associated with it

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

dpkg -S (–search) [filename]

A

search for the indicated installed file within the package database for all mentions of the file or string

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

dpkg-reconfigure [packagename]

A

allows for modification of a package by re-running the application’s configuration tool

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

dpkg –force-reinstreq [packagename]

A

allows you to force the removal of a package marked as requiring install

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

dpkg –force-depends [packagename]

A

used with -i to force the install of a package with missing dependencies

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

dpkg –force-conflicts [packagename]

A
  • used with -i to force install a package with conflicting dependencies
  • forcing installations may leave system unusable
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
283
Q

yum (Yellowdog Updater, Modified)

A
  • originally used for Yellowdog Linux distro
  • handles RPM package dependencies
  • installs, upgrades, removes packages
  • RHEL, CentOS, Scientific LINUX
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
284
Q

yum setup

A
  • global yum config options are set in /etc/yum.conf

- reads repository information from /etc/yum.repos.d/

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

zypper

A

-RPM package manager for SUSE Linux

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

zypper repos (command)

A

will list out the individual repositories that zypper uses for install and upgrade of packages

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

zypper install vim (command)

A

will install the vim package

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

DNF - Dandified yum

A
  • used in Fedora
  • future replacement for yum in Red Hat
  • uses same command syntax as yum
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
289
Q

yum update/upgrade

A

will read the configured repositories and local cache, and upgrade all installed system apps

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

yum search

A

searches the yum repositories for specified package

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

yum info

A

lists information about a specified package

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

yum clean all

A

cleans up all of yum’s cache information and it’s local database file

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

basurl line within the repo file

A

web address that indicates where packages are downloaded from

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

yum install [packagename]

A
  • installs a specified package and all of its dependencies

- -downloadonly will just download the indicated package

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

yum remove

A

uninstalls a package and leaves dependencies behind

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

yum autoremove

A

-uninstalls a package and its dependencies

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

yum whatprovides

A

find out what package provides a specified file name

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

yum reinstall

A

reinstalls a specified package

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

/etc/yum.conf

A

default yum config file. may contain some repository definitions

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

/etc/yum.repos.d

A

individual ‘*.repo’ files containing the location and options for remote repositories

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

/var/log/yum.log

A

default yum transaction log file

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

yum –enablerepo [reponame]

A

enable a disabled repo for the current transaction only

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

/var/cache/yum/[architecture]/[version]/base/packages

A

directory the package will be downloaded to

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

-y on a yum command

A

will skip affirmation step

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

yumdownloader

A

allows you to download a package only, but provides additional functionality

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

yumdownloader –source

A

download only source RPM

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

yumdownloader –urls

A

display the URL of the files without downloading

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

yumdownloader –destdir

A

allows you to indicate the directory to store the package download

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

yumdownloader –resolve

A

includes any dependencies

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

.rpm package

A
  • application or utility
  • default config files
  • how and where to install the files that come with the package
  • listing of dependencies the package requires
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
311
Q

rpm -qpi

A
  • displays information on a package

- same as yuminfo

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

rpm -qpl

A

list files in a package

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

rpm -qa or yum list installed

A

lists out all installed packages

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

rpm -i

A

installs a specified package

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

rpm -U

A

upgrades an installed package

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

rpm -e

A

uninstalls a package

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

rpm -Va

A

verify all installed package

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

rpm2cpio

A

converts a .rpm file into a cpio archive file

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

/var/lib/rpm

A

RPM database directory

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

rpm –rebuilddb

A
  • rebuilds the local RPM database in the /var/lib/rpm directory
  • only performed by root
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
321
Q

rpm -q [packagename]

A

shows all packages meeting the indicated values that are installed

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

rpm -qi [packagename]

A

-detailed information about an installed package

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

rpm -ql [packagename]

A

listing of all files in the package

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

rpm -qip [package.rpm]

A
  • show the appropriate details about a file NOT installed as named
  • will show information on a package before install
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
325
Q

rpm –changelog [packagename]

A

display the changelog for the indicated package

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

rpm -qc [packagename]

A

display all configuration files for the indicated package

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

rpm -qRp [package.rpm]

A

show the requirements of the indicated rpm file

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

rpm -qf

A

will show the package that the indicated file dependency belongs to

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

rpm -K

A

validate for the indicated package

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

rpm –import

A

import the indicated keyfile from the package maintainer

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

rpm -v

A

print verbose information

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

rpm -h (–hash)

A

during activity, print a ‘status’ bar using hash ‘#’ character

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

rpm –force

A

option added during install or removal to force install/removal

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

rpm –replacefiles

A

option added during install, that replaces duplicate files

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

rpm -V

A

verify the integrity of a package

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

rpm -Va

A

verify ALL installed packages

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

rpm -Vac

A

verify ALL installed package config files on the system

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

rpm -F (–freshen)

A

will ONLY upgrade the indicated package if it’s already installed

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

rpm -e (–erase)

A

erases the indicated package name

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

Virtual Machine

A
  • emulation of a specific OS
  • share same physical hardware
  • isolated from hardware and communicates through Hypervisor
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
341
Q

VM/Hypervisor Examples

A
  • KVM
  • QEMU
  • VMWare
  • Xen
  • VirtualBox
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
342
Q

Full virtualization

A

guest system is not aware that it is a virtual machine

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

paravirtualization

A
  • guest system is aware that it is a virtual machine, uses guest drivers
  • VMs perform better with guest drivers
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
344
Q

dbus-uuidgen or dbus-uuidgen –get

A

ensures that each running kernel interacts with a system that has a unique ID

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

cloud-init (command)

A
  • used to ensure user data is completely new
  • creates new SSH keys
  • sets system’s default locale
  • sets system’s host name
  • sets up mount points
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
346
Q

Cloud Virtual Machines

A
  • AWS
  • Azure
  • Rackspace
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
347
Q

Container

A
  • isolated set of packages, libraries and/or applications that are independent from their surroundings
  • use shared OS
  • more resource efficient
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
348
Q

Machine container

A

shares a kernel and file system with the host computer

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

Application container

A
  • shares everything but the application files and library files the application needs
  • useful on a web server
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
350
Q

Container example

A
  • Docker
  • nspawn (systemd)
  • LXD
  • OpenShift
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
351
Q

Linux Shell

A
  • bash is default
  • csh - C programming style syntax
  • ksh - KornShell includes elements of Bash and C
  • zsh - Z Shell includes elements of Bash and Korn
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
352
Q

Environment Variable

A

settings that dictate common functionality and locations

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

env

A

command that displays environment variables except shell settings

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

echo

A

versatile command that can be used to print the value of a variable

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

set

A

displays shell settings or shell variables for the session

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

unset

A

removes a variable or custom bash function

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

shopt

A

displays shell options and their current settings

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

set -x

A

turns on debugging with the bash shell

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

set +x

A

turns off debugging

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

shopt -s (option)

A

to set or enable option

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

export (command)

A

used to export a variable to the current shell and any new shells started from the current shell

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

which (command)

A

-shows the full path of (shell) commands

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

type (command)

A

determines if something is a function, file, alias, built-in or keyword

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

“weak” quotes

A

double quotes will expand variables, but characters used for path substitutions or pattern matching will not be expanded

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

‘strong quotes’

A

inside strong or single quotes. nothing is interpreted

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

history (command)

A

shows most recently used commands

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

.bash_history

A

file located in user’s home directory that contains the previously run commands

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

HISTFILESIZE

A
  • environment variable that determines how many lines the bash_history file will contain
  • default is 500
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
369
Q

Man page - Section 1

A

executable programs or shell commands

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

Man page - Section 2

A

System calls - functions provided by the kernel

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

Man page - Section 3

A

Library calls - functions within program libraries

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

Man page - Section 4

A

special files - typically found in /dev

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

Man page - Section 5

A

file formats and conventions

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

Man page - Section 6

A

games

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

Man page - Section 7

A

miscellaneous terms and conventions

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

Man page - Section 8

A

system admin commands

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

Man page - Section 9

A

kernel routines

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

man -k or

apropos

A

used to search man pages for a key word

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

man [section number]

A

pulls up a specific section of a man page

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

less

A

read-only text view

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

head

A

bring up first 10 lines of a file

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

tail

A

last 10 lines of a file

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

zcat

A

view gzip compressed text file

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

bzcat

A

view bunzip2 compressed text file

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

xzcat

A

view XZ compressed text file

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

nl (file)

A

prints the number of lines in a file

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

od

A
  • octal dump command

- print out file in octal or other formats

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

md5sum

A

calculates and checks a file’s hash based on MD5

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

sha256sum

A

calculates and checks file’s hash based on SHA-2 hash using 256 bits

390
Q

sha512sum

A

calculates and checks file’s hash based on SHA-2 hash using 512 bits

391
Q

/etc/bashrc

A
  • sourced script and is executed each time user logs in or they execute a non-login session
  • umask set for the whole system within this file
392
Q

~/.bash_profile

A
  • sourced script and is executed each time user logs in but only affects the environment for the user logging in
  • typically used to set environment variable specific to user
393
Q

~/.bashrc

A
  • usually called by the ~/.bash_profile’ script
  • will source /etc/bashrc file
  • used to customize shell prompt, keyboard shortcuts
  • umask set for individual user here
394
Q

~/.bash_logout

A

executed when the logout or exit commands are executed

395
Q

‘non-login’ session

A
  • when the root or other user uses su to become another user

- does not load full environment by default

396
Q

~ (character)

A

user home directory

397
Q

\ (character)

A

escape character

398
Q

Special character: $

A

identifies a variable

399
Q

? (character)

A

single character ‘wildcard’

400
Q
  • (character)
A

0 to n ‘wildcards’

401
Q

& (character)

A

send process to background returning the use of the shell to the user

402
Q

&& (character)

A

execute second command only if first is successful

403
Q

|| (character)

A

execute second command only if first is unsuccessful

404
Q

; (character)

A

execute multiple commands on the same line

405
Q

command exit 0

A

success

406
Q

command exit 1 or higher

A

failure

407
Q

set -o (option)

A

turns option on

408
Q

set +o (option)

A

turns option OFF

409
Q

/etc/profile

A
  • where PATH environment variable is initially set

- source script executed each time a user logs in

410
Q

HISTCMD

A

index of the current command

411
Q

HISTCONTROL set to ignorespace

A

command preceded by a blank space will not be recorded in history file

412
Q

HISTCONTROL set to ignoredups

A

two consecutive lines that are a duplicate will have one ignored

413
Q

sed (command)

A
  • ‘stream editor’ command

- commonly used to alter text in a file or replace words

414
Q

sort (command)

A

used to sort and/or merge lines of a file

415
Q

uniq (command)

A

removes consecutive duplicate lines of a file

416
Q

tr (command)

A

used to translate or swap characters in a file

417
Q

cut (command)

A

extracts columns or fields of data from a file

418
Q

paste (command)

A

merge lines of files

419
Q

split

A
  • command used to split a file into individual pieces

- each piece contains up to 1,000 lines by default

420
Q

sort -k [#] [filename]

A
  • sort at the start of the second delimited field

- delimiter by default is a space or tab

421
Q

sort -n [filename]

A

sort the file numerically

422
Q

nl -ba [filename]

A

will number all lines, even if the line is empty

423
Q

wc -l

A

number of lines

424
Q

wc -w

A

number of words

425
Q

wc -c

A

number of characters in bytes

426
Q

expand

A
  • changes tabs in a file to a specific number of spaces

- default is 8

427
Q

expand -t [#]

A

converts tabs to # of spaces indicated

428
Q

cut -c [#][-#] [filename]

A

will display only the column or range of column from the indicated filename

429
Q

cut -d [delimiter]

A
  • set the delimiter to use when dealing with fields

- default is TAB`

430
Q

cut -f [field] [filename]

A

identify the field numbers identified by delimiter to display from the indicated filename

431
Q

join

A

combines two files together but removes redundant fields

432
Q

join -t [character]

A

use the indicated character as the field separator

433
Q

uniq -u [filename]

A

print ONLY the unique lines in the file

434
Q

uniq -d [filename]

A

print an example of each line that is duplicated in a file

435
Q

uniq -D [filename]

A

print ALL instances of duplicate lines in a file

436
Q

head -n [#][filename]

A

display number of lines, beginning at the top, of the indicated file

437
Q

tail -n [#][filename]

A

display number of lines, beginning at the bottom, of the indicated file

438
Q

tail -f [filename]

A

to follow a file as new entries are created

439
Q

split -a [#]

A

when the split file(s) are created named them ‘x#’

440
Q

split -b [#][b/k/m]

A

new file(s) contain the indicated number of bytes/kilobytes/megabytes

441
Q

split - [#]

A

new file(s) contain the indicated number of lines of bytes

442
Q

split -l [#]

A

new file(s) contain the indicated number of lines

443
Q

cat

A

display a file, top to bottom,

444
Q

tac

A

same as cat, but in reverse by listing file bottom to top

445
Q

od -a

A

display ‘named’ binary file

446
Q

od -d

A

decimal format

447
Q

od -f

A

floating point format

448
Q

od -o

A

octal format

449
Q

od -x

A

hexadecimal format

450
Q

pr (command)

A
  • used to ‘format’ a source file or other text only files to be printed
  • adds a header with the date of the ‘job’, file, and pagination (page number) at the top
451
Q

pr – columns=[#]

A

format text data in the file into the indicated number of columns for printing

452
Q

pr – columns -a[#] (–across)

A

print columns across instead of down

453
Q

pr -d (–double-space)

A

double space the line output

454
Q

pr -h (–header) [text]

A
  • customizes the header text

- replaces the filename with the indicated text

455
Q

pr -t (–omit-header)

A

omits the header from the output

456
Q

fmt

A
  • used to format files for printing
  • limited to wrapping longer lines of output
  • commonly used with pr utility
457
Q

fmt -[#]

A

desired width to break each line at

458
Q

fmt -s

A

split long lines over 50 characters without filling

459
Q

fmt -40 mytext.txt | pr –columns=2

A

-split each line at 40 characters and prepare a printing with header in two neat columns

460
Q

tr ‘A’ ‘a’ < myfile.txt

A

translates all uppercase A to lowercase a

461
Q

[:upper:][:lower:] < [filename]

A

converts all uppercase to lowercase

462
Q

sed s/

A

substitutes what comes next

463
Q

g at the end of sed (command)

A

replaces ALL instances of the first value with the second

464
Q

sed ‘s/a/A/g’ filename.txt

A

replace every instance of lowercase ‘a’ with uppercase ‘A’

465
Q

-e in sed (command)

A

used to chain multiple filters together instead of using ‘;’

466
Q

sed -n (–quiet

A
  • suppresses the printing of ‘pattern space’

- can prevent lines from appearing multiple times

467
Q

more (command)

A

allows paginate paging through text files one screen at a time

468
Q

more -d

A

prompt to ‘space to continue’ or ‘q to quit’ at each screen

469
Q

more -num [#]

A
  • specify the screen size in lines

- default is 50 or the size of the terminal

470
Q

more -p

A

clear the screen before starting the first screen display

471
Q

less (space key)

A

moves to next full screen

472
Q

less (d key[#])

A

scrolls through the next number of lines indicated

473
Q

less (b key[#])

A

scrolls backwards through the next number of lines indiciated

474
Q

touch

A
  • create a file

- modify file’s time stamp

475
Q

file (command)

A

-used to determine file type

476
Q

rmdir

A
  • remove directory command

- will not delete directory with any content

477
Q

dd (command)

A
  • copies and converts files

- used to create files of arbitrary size and to back up disk drives

478
Q

tar

A

-wraps up files and folders into an archive file

479
Q

gzip

A

creates .gz compressed files

480
Q

gunzip

A

extracts .gz compressed files

481
Q

bzip2

A
  • command that creates .bz2 compressed files

- better compression utility in terms of size

482
Q

bunzip2

A

command that extracts .bz2 compressed files

483
Q

xz

A
  • command that creates .xz compressed files

- newer compression utility for files and directories

484
Q

unxz

A

command that extracts .xz compressed files

485
Q

ls -l

A

-long listing containing permissions, owner, size and date

486
Q

ls -a

A

list files including ‘hidden’ files

487
Q

ls -d

A

list just the directory without the files

488
Q

ls -i

A

display the inode numbers for the files or directories

489
Q

ls -h

A

‘human-readable’ format to filesizes and details

490
Q

cd ~

cd

A

home directory

491
Q

cd .

A

current directory

492
Q

cd ..

A

moves up one directory

493
Q

makedir -p

A

make all directories in the indicated path if they do not already exist

494
Q

globbing

A

wildcard or list character that makes one or more files based on an indicated pattern

495
Q

touch -t [date][filename]

A

sets the date/time as indicated for the file

496
Q

touch -r [referencefile][filename]

A

applies the indicated date/time in the ‘reference’file to the ‘filename’

497
Q

stat (command)

A

displays a file or file system status

498
Q

stat -f (–file-system)

A

display the file system status instead of file status

499
Q

stat -t (–terse)

A

display the information in terse short form

500
Q

cp -d

A
  • do not follow symbolic links

- just copy the link

501
Q

cp -f

A

-force overwrite if the file already exists

502
Q

cp -i

A

ask before overwriting an existing file

503
Q

cp -l

A

create a hard link to the original

504
Q

cp -s

A

create a symbolic link to the original

505
Q

cp -r (or -R)

A

recursively apply any options to other directories or subdirectories

506
Q

cp -x

A

do not include any files/directories from other filesystems

507
Q

mv -i

A
  • check to see whether the destination already exists

- will prompt to overwrite

508
Q

mv -u

A

do not overwrite the destination file or directory if it is newer than the original

509
Q

mv -f

A
  • do not prompt for directory entry changes

- often the default

510
Q

rmdir -p

A

removes all directories in a path as long as they are all empty

511
Q

rmdir –ignore-fail-on-non-empty

A

allows the removal of directories that do have files

512
Q

rm -r

A

recursively remove files and subdirectories

513
Q

rm -f

A

do not prompt for confirmation on deletion

514
Q

rm -i

A

prompt for every file/directory to be removed

515
Q

dd: if

A

image file or device used as input

516
Q

dd: of

A

image file or device used as output

517
Q

dd if=/dev/sda of =/dev/sdb

A

will back up the full /dev/sda disk to /dev/sdb

518
Q

find (command)

A
  • method for ‘finding files’ based on name or type

- can be costly of CPU and IO performance

519
Q

find [starting path]

A

where to begin the search

520
Q

find -[options]

A

what type of ‘thing’ to find

521
Q

tar -c

A

create the archive

522
Q

tar -t

A

displays the contents of the archive

523
Q

tar -x

A

extract the content of the archive

524
Q

tar -f

A

name of the file to create

525
Q

tar -j

A
  • compress/uncompress with bzip2

- best compression method

526
Q

tar -z

A
  • compress/uncompress with gzip

- most commonly used method

527
Q

tar -v

A

verbose messages

528
Q

tar -cvjf mybackup.tar.bz2 /home/user

A
  • creates a file called mybackup.tar.bz2 in current directory containing files from /home/user
  • compressed with bzip2
529
Q

cpio (command)

A

used by receiving input from a file or another command and sends the files to either standard output or a file

530
Q

cpio -o (–create)

A

runs in copy-out mode

531
Q

cpio -0 [archivefile]

A

creates the indicated file instead of using standard output

532
Q

cpio -d (–make-directories)

A

make leading directories if needed

533
Q

cpio -i (–extract)

A

extracts the content in copy-in mode

534
Q

cpio -I [archivefile]

A

use the archive file indicated rather than standard input from a command or file

535
Q

cpio -v

A

verbose messages

536
Q

gzip and gzip2 -r

A

recursive, include all files and directories

537
Q

gzip /home/user/myfile.txt

A

-would compress the /home/user/myfile.txt file, leaving /home/user/myfile.txt.gz in its place

538
Q

xz -z (–compress)

A

compress the file indicated

539
Q

xz -d

A

decompress the file indicated

540
Q

find (directory) -name

A

find files based on their name

541
Q

find (directory) -ctime

A
  • find files based on the time they were last changed

- default is by day

542
Q

find . -ctime -1

A

locate files that have been changed within current directory from the last 24 hours

543
Q

find (directory) -newer (file)

A

locate files whose timestamp is newer than the selected file

544
Q

file (directory) -empty -type f

A

locate empty files

545
Q

file (directory) -atime (file)

A

locate files based on their access time

546
Q

find (directory) -empty -type f -exec rm -f {} \;

A

find and remove empty files within current directory without prompting

547
Q

file (directory) -exec [command] {} \;

A

will act on the results of the find command

548
Q

[abc]

A
  • matches any one of the characters in the list

- case sensitive

549
Q

[^abc]

A
  • matches any one character except those in the list

- case sensitive

550
Q

[0-9]

A

matches a range of numbers

551
Q

Standard Output

A
  • bucket where all the output goes
  • > ,&raquo_space;
  • stdout
  • 1
552
Q

Standard Input

A
  • usually comes from keyboard entries
  • files and standard output from other commands can provide input to another command
  • stdin
  • 0
553
Q

Standard Error

A
  • usually written to the screen
  • stderr
  • 2
554
Q

Find option: group

A

files/directories belonging to the specified group

555
Q

Find option: user

A

files/directories belonging to the specified user

556
Q

Find option: iname

A

files/directories whose names match the indicated name

557
Q

Find option: mtime

A

files/directories matching the indicated modification time

558
Q

/dev/null

A
  • stderr is commonly redirected to a logging file or special device here
  • allows you to clean up errors from the normal standard output
559
Q

Redirecting Standard Error: find / -iname “*.sh” 2> /dev/null

A

-will display the results of the found matches without displaying error messages related to permissions

560
Q

Chaining Redirects:

sort < listfile | nl

A

redirect the ‘listfile’ as an input stream to the sort command, piping that output to the nl command to add line numbers

561
Q

Special combination:

find / -iname “*.sh” > /dev/null 2>&1

A

redirects standard error to standard output and the whole output stream is redirected to /dev/null

562
Q

tee (command)

A
  • accepts a standard input stream and sends one identical output stream to an indicated file
  • used to capture the output of an app but to also show the results on the screen
563
Q

find / -name “*.sh” | tee visibleresults.txt

A
  • find all files ending in .sh from root partition, piping those results as an input stream to tee
  • output sent to screen and visibleresults.txt file
564
Q

xargs (command)

A

takes an input stream of another command and feeds to another command as indicated

565
Q

find / -name “*.sh” | xargs ls -al > myresults.txt

A
  • find all files ending in .sh and xargs will take the output and feed to the ls -al command.
  • will then display the details of each file and redirect to myresults.txt
566
Q

ps (command)

A

lists process status of each running process on the system

567
Q

process

A

set of instructions loaded into memory

568
Q

ps -u (user name)

A

pull up processes running under a specific user

569
Q

ps -e

A

pull up every process running on the system for all users

570
Q

ps -eH

A

pull up running processes in a hierarchy view

571
Q

ps -e –forest

A

provides a full format listing which includes showing all arguments that a command is using while it is running

572
Q

Kill process from top command

A

Press (k) key, type in PID and hit enter

573
Q

top (command)

A

real-time monitoring of processes running on a system

574
Q

man signal

A

man pages for various signal states of running processes

575
Q

uptime (command)

A

view how long system has been up, how many users logged in, and CPU load average by last minute, last 5 minute, and last 15 minutes

576
Q

Load Average

A

average number of process that are either in a runnable or uninterruptable state

577
Q

free (command)

A

view used and available memory and swap space

578
Q

pgrep (command)

A

find process information based on process name

579
Q

kill (command)

A

send a signal to a process based on PID

580
Q

pkill (command)

A

send a signal to a process based on process name

581
Q

pkill -x (name of process)

A

used to only kill the exact name of a process given

582
Q

ps -a

A

display all running processes

583
Q

ps -x

A

display processes without an associated tty (terminal)

584
Q

ps aux

A
  • show all processes by any user, displaying the process owner and processes not tied to a terminal
  • same as ps -ef
585
Q

pstree (command)

A

show a tree view hierarchical ASCII display of running processes

586
Q

pstree -A

A

display the tree using ASCII characters

587
Q

pstree -a

A

display the processes including any parameters used

588
Q

pstree -p

A

show PIDs

589
Q

free -b

A

displays the memory in bytes

590
Q

free -k

A

displays the memory in kilobytes

591
Q

free -m

A

displays the memory in megabytes

592
Q

free -g

A

displays the memory in gigabytes

593
Q

free -h

A

displays in ‘human-readable’ format

594
Q

free -c (#) -s (#)

A

number of times to display the output and how many seconds between each output

595
Q

free -t

A

display a line showing each column totals

596
Q

free -l

A

display low and high memory statistics

597
Q

kill -1 (PID)

A

shutdown and restart the process

598
Q

kill -15 (PID)

A

terminate process

599
Q

kill -9(PID)

A

kill/stop/end/dump right now

600
Q

killall (command)

A

kills all instances of the named process

601
Q

pkill -signal (#)

A

send the signal number to the matched process

602
Q

pkill -t

A

match the indicated terminal/tty

603
Q

pkill -U

A

match the user ID

604
Q

pgrep -u root, apache httpd

A

will display any httpd process owned by root OR apache

605
Q

pgrep -u root apache

A

will display only processes owned by root AND apache

606
Q

watch (command)

A
  • runs a command at specified intervals

- used to monitor a command’s output

607
Q

screen (command)

A
  • terminal window manager that allows you to run commands in an isolated session
  • processes can run after logging out
608
Q

tmux (command)

A
  • terminal window manager similar to screen with extra features
  • -processes can run after logging out
609
Q

watch date

A

-displays current date and refreshes every 2 seconds by default

610
Q

watch date -n 5

A

changes refresh period to every 5 seconds

611
Q

screen: ctrl+a d

A

detach from screen session

612
Q

screen -r (session number)

A

attach to specific screen session

613
Q

screen -r

A

reattach to current screen session

614
Q

screen -ls

A

view active screen sessions

615
Q

End screen and tmux sessions

A

type “exit”

616
Q

tmux: ctrl+b d

A

detach from tmux session

617
Q

tmux ls

A

view active tmux sessions

618
Q

tmux attach-session -t(session number)

A

reattach to selected tmux session

619
Q

nohup (command)

A

command preceded by nohup receives signal 1 so that should a terminal window close, the process will still run as long as the login session is not terminated

620
Q

bg (command)

A

sends a job to the background while it keeps running

621
Q

fg (command)

A

brings a job that is in the background to the foreground

622
Q

jobs (command)

A

displays a listing of jobs that are in the background

623
Q

jobs display: [#]-

A

indicates the previous job or next to last job to be operated on

624
Q

jobs display: [#]+

A

indicates the current job

625
Q

priority

A

scheduling and priorities are what Linux uses to run multiple things on a single machine in a ‘multi-tasking like’ manner

626
Q

priority range

A
  • default is 0
  • any user can start processes with priorities 0 to 19
  • only root can start priorities from 0 to -20
  • only root can bring a priority number lower
627
Q

screen: ctrl+a c

A

open a new session

628
Q

screen: ctrl+a p

A

move back to previous session

629
Q

screen: ctrl+a n

A

move to next session

630
Q

screen: ctrl+a “

A

display a list of available sessions

631
Q

screen: ctrl+a x

A
  • lock the screen

- password prompt twice to unlock

632
Q

nice (command)

A

used to define a new nice level before an application is started

633
Q

watch -n 3 date &

A

-generate date every 3 seconds and place in the background

634
Q

nice -n 5 watch -n 3 date &

A
  • generate date every 3 seconds and place in the background

- priority level 5

635
Q

renice -n -1 (PID)

A

changes current priority to -1

636
Q

renice a process within top

A

hit “r” key then type PID and number to change to

637
Q

renice (command)

A

used to change the nice level of an application that is already running

638
Q

top d [#]]

A

run and update the processes display every ‘#’ of seconds

639
Q

top i

A

show only active processes

640
Q

top -b

A

run in batch mode

641
Q

top -c [#]

A

run ‘#’ of updates and exit

642
Q

top -b -n 5 > output.txt

A

will run top in batch mode and update 5 times, then write results to output.txt

643
Q

top: spacebar

A

immediate update

644
Q

top: h key

A

displays help screen

645
Q

top: i key

A

display or ignore inactive processes

646
Q

top: R key

A

sort process IDs from high to low

647
Q

grep (command)

A

used to find strings and phrases in files, streams and directories

648
Q

grep -c

A

count of matches found only

649
Q

grep -C [#]

A

encloses the string match with ‘#’ of lines of context

650
Q

grep -E [ext. regex]

A

use the indicated extended regular expression for finding a match

651
Q

grep -F [fixed regex]

A

use the indicated fixed regular expression for finding a match

652
Q

grep -H

A

displays the filename of each matching string or phrase

653
Q

grep -h

A

prevents the filename from being displayed

654
Q

grep -i

A

ignore case

655
Q

grep -l

A

show only the filename, not the matched string/phrase

656
Q

grep -L

A

show only filenames that do NOT contain a match

657
Q

grep -w

A

match only lines containing the whole string or phrase

658
Q

grep -x

A

show only exact whole line matches to the entire string or phrase

659
Q

grep -v

A

show only those lines in a file that do NOT match the string or phrase

660
Q

find / -name “*.sh” -exec grep -iH “modprobe” {} \;

A

find any file, recursively, starting in root and ending in .sh. grep would ignore case and display the file name matching content from files containing the word ‘modprobe’

661
Q

egrep (command)

A

-grep command without having to specify -E

662
Q

egrep ‘(bin|bash)’ /etc/passwd

A

would display any lines containing either ‘bin’ or ‘bash

663
Q

fgrep (command)

A
  • grep command without having to specify the -F

- allows for use of a file that contains one or more items to search for

664
Q

fgrep -f [itemfile]

A

use the indicated file as a list of items to search for in the file

665
Q

fgrep -f itemfile.txt searchfile.txt

A

will use the items in itemfile.txt as search parameters for all lines in the searchfile.txt and display the matches

666
Q

regex: .

A

match any single character

667
Q

regex: ?

A

match an optional item, but only once

668
Q

regex: *

A

match from ‘0 to n’ characters in a string

669
Q

regex: +

A

item MUST be matched at least once but can be matched more

670
Q

regex: {#}

A

match ‘#’ of times

671
Q

regex: {#,}

A

match ‘#’ of times, or more

672
Q

regex: {#,#}

A

-match between the first and second number

{3,10} would match between 3 and 10 times

673
Q

regex: < and ^

A

words that start with what comes after

674
Q

regex: > and $

A

words that end with what comes after

675
Q

regex: [aA]

A

words that contain either ‘a’ or ‘A’

676
Q

grep “d[iou]g textfile.txt

A

return words that start with ‘d’ and end with ‘g’ and have i, o, or u

677
Q

regex: [^o]

A

words that do NOT contain the letter

678
Q

grep “d[^o]g” textfile.txt

A

return words that start with ‘d and end ‘g’ and have any letter except ‘o’

679
Q

sed (command)

A

stream editor command can operate on files using regular expressions

680
Q

vimtutor

A

tutorial system for vim

681
Q

vi/vim

A
  • text editor available in Linux

- navigated by command mode, insert mode, ex mode (used for search/replace)

682
Q

/etc/vimrc

A

global vim configuration file

683
Q

/home/user/.vimrc

A

-user specific configuration for vim

684
Q

Vim Command Mode:
:number/nonumber
:nu/no nu

A

turn line numbers on the display on/off

685
Q

Vim: bottom of screen

A

-contains the full path to the file, number of lines, size of the file, current line and column and current cursor position

686
Q

Vim: i

A

invokes insert mode

687
Q

Vim: I

A

move to the beginning of the current line and invoke ‘insert mode’

688
Q

Vim: a

A

place cursor one character to the right of the current position and invoke ‘insert mode’

689
Q

Vim: A

A

move cursor to the end of the current line and invoke ‘insert mode’

690
Q

Vim: o

A

insert a new line under the current line, place the cursor in the first position on the new line in ‘insert mode’

691
Q

Vim: O

A

insert a new line above the current line, place the cursor in the first position of the new line in ‘insert mode’

692
Q

Vim: cw

A

change the word at the current position

693
Q

Vim: cc

A

change the line at the current position

694
Q

Vim: c$

A

change from the current position at the end of the line

695
Q

Vim: r

A

replace the character at the current position

696
Q

Vim: R

A

replace text on the same line until you escape the ‘insert mode’ or until you reach end of line

697
Q

Vim: x

A

delete the character after the cursor

698
Q

Vim: X

A

delete the character before the cursor

699
Q

Vim: dw

A

delete the word after the cursor

700
Q

Vim: dd

A

delete the entire line the cursor is on

701
Q

Vim: D

A

delete the text from the current cursor to the end of the line

702
Q

Vim: dL

A

delete the text from the current cursor to the end of the current screen

703
Q

Vim: dG

A

delete the text from the current cursor to the end of the file

704
Q

Vim: d^

A

delete all text from the beginning of line to the current cursor

705
Q

Vim: u

A

undo the last operation/change

706
Q

Vim: yy

A
  • copy the current line to the buffer

- also called yank

707
Q

Vim: yw

A

copy the current cursor to end of current word

708
Q

Vim: p

A

paste the contents of the buffer after the cursor

709
Q

Vim: P

A

paste the contents of the buffer before the cursor

710
Q

Vim :e!

A

undo ALL changes since the last time the file was saved

711
Q

Vim :w

A

write/save the file

712
Q

Vim :q

A

quit the editor

713
Q

Vim :q!

A

quit without saving

714
Q

Vim :x

A

shortcut for save and exit

715
Q

Vim: ZZ

A

shortcut for save and exit

716
Q

Vim navigation: h

A

one character left

717
Q

Vim navigation: j

A

one line down

718
Q

Vim navigation: k

A

one line up

719
Q

Vim navigation: l

A

one character right

720
Q

Vim: ctl-u

A

move back one half page

721
Q

Vim: ctl-b

A

move back one page

722
Q

Vim: ctl-d

A

move forward one half page

723
Q

Vim: ctl-f

A

move forward one page

724
Q

Vim: ctl-G

A

show the name of the file, lines and position in % of the total file length

725
Q

Vim - Searching

A
  • must be in command mode
  • ”/” search from cursor forward
  • ”?” search from cursor back
  • “N” to move forward
726
Q

Vim - Replacing

A
  • must be in command mode
  • sed-like syntax
  • ”s” substitute in current line
  • “%s” substitute in entire file
  • “g” will replace all occurrences
727
Q

:s/Mar/Apr/g

A

will replace Mar with Apr for all occurrences in the file

728
Q

Vim - :![cmd]

A

run the indicated command on the command line

729
Q

General order of preparing hard drive for use

A
  • Physical install or allocation for VM
  • partition the device
  • format the partition created with the chosen filesystem type
  • create a system mount point
  • mount the device/partition
  • add /etc/fstab if intended to be persistent
730
Q

IDE devices

A

/dev/hda then partition like /dev/hda1

731
Q

SATA/SCSI devices

A

/dev/sda then partition like /dev/sda1

732
Q

fdisk (command)

A
  • legacy command used to create partitions of the MBR (DOS) type
  • 2TB partition size limit
  • no ability to edit GUID drives
733
Q

parted (command)

A
  • modern command used to create partitions of MBR or GPT types
  • default unit is MB
734
Q

Partition ID 83(00)

A

standard Linux filesystems

735
Q

Partition ID 82(00)

A

Linux swap partitions

736
Q

Partition ID 8e(00)

A

Linux LVM Volumes

737
Q

gdisk (command)

A
  • command in the style of ‘fdisk’ that can be used to create GPT partitions on disks
  • capable of creating/modifying GUID tables
738
Q

/etc/fstab

A
  • Filesystem table file
  • single line mount config for local filesystems that are to be mounted on boot
  • what computer uses upon boot to locate where filesystems are
739
Q

tools used to create swap partitions

A
  • fdisk
  • gdisk
  • parted
740
Q

mkswap (command)

A

used to format partition to be used as swap space

741
Q

swapon (command)

A

enables swap partition or file

742
Q

swapoff (command)

A

disables swap partition or file

743
Q

2 ways to set up swap

A
  • swap file: impacts performance

- swap partition: less performance hit

744
Q

Primary partition

A
  • partition that is independent of any extended and logical partition
  • Numbered 1 through 4
745
Q

Extended partition

A
  • only one of these per drive

- like a ‘container’ for logical partitions

746
Q

Logical partition

A
  • partition within an extended partition
  • usually needed when there is a need for more than four partitions
  • Numbered 5 through n
747
Q

Swap partition

A

partition that is specifically formatted an dedicated to virtual memory in support of system memory exhaustion

748
Q

fdisk and gdisk Interactive options: p

A

display disk/partition summary

749
Q

fdisk and gdisk Interactive options: n

A
  • create a new partition
  • p to make primary partition
  • l to make logical partition
  • each partition defaulted as 83(00) type
750
Q

fdisk and gdisk Interactive options: t

A

change partition type

751
Q

fdisk Interactive options: w

A

write partition to disk

752
Q

Partition ID 85(00)

A

Linux extended

753
Q

Partition ID fd(00)

A

Linux RAID

754
Q

parted -l [device]

A

list A LOT of information about the indicated device and partitions

755
Q

parted interactive option: help

A

list commands available

756
Q

parted interactive option: mkpart [volume name] [begin] [end]

A

-create partition with the indicated volume name at the beginning value and ending at the end value

757
Q

Superblock

A
  • portion of the disk that can be read and contain filesystem information
  • typically stored on disk in first sector
  • first backup block for ‘ext’ filesystems
758
Q

Inode

A
  • associated with every file and directory
  • contains info about the file except the filename
  • includes a list of blocks that make up the file
  • number of inodes cannot be changed after filesystem creation
759
Q

ls -i /var/log/messages

A

will display the inode of the /var/log/messages file

760
Q

df -i

A

show the inodes that are available, used and free on the mounted filesystems

761
Q

filesystem type: ext2

A

Linux extended filesystem (legacy)

762
Q

filesystem type: ext3

A

Linux extended filesystem with journaling

763
Q

filesystem type: ext4

A
  • Linux extended filesystem with journaling

- performance enhancements over ext3

764
Q

filesystem type: ReiserFS

A

one of the first filesystems to introduce journaling and offer dynamic resizing capabilities

765
Q

filesystem type: btrfs

A

builds on ReiserFS features while adding additional admin features while increasing performance

766
Q

filesystem type: iso9660

A

filesystem specific to CD-ROM

767
Q

filesystem type: udf

A

filesystem specific to DVD

768
Q

filesystem type: vfat

A

older DOS partition type

769
Q

Formatting a drive

A

process of preparing the size and structures on a partition and applying the filesystem type indicated

770
Q

mkfs (command)

A

-creates a new file system on a partition

771
Q

mkfs -t [fstype] [device/partition]

A

creates the indicated filesystem type on the chosen disk partition

772
Q

mkfs -b [#]

A
  • creates the filesystem with the indicated block size

- default - 4096

773
Q

mkfs -m {#]

A

percentage of space reserved for ‘root’ user

774
Q

mkfs -L [label]

A

set the partition volume label

775
Q

mkfs -O

A

additional options

776
Q

mkfs -t ext4 -b 8192 -m 10 -L LargeData -O sparse_super /dev/sde4

A

create an ‘ext4’ partition, with a block size of ‘8192’, reserving 10% for root use and using the ‘sparse_super’ option

777
Q

mkfs. [fstype]

A

equivalent command for each filesystem type to format the indicated partition

778
Q

mkfs.ext3 /dev/sda3

A

will create the ext3 filesystem on the /dev/sda3 partition

779
Q

mke2fs

A

equivalent command for making an ext2/3/4 filesystem

780
Q

mkraid

A

creates a RAID array set from the indicated disks

781
Q

mknod

A

create ‘special’ files

782
Q

mkisofs

A

create ISO filesystem for burning CD-ROM

783
Q

File Allocation Table

A
  • Linux can use Virtual File Allocation Table which allows for long file names
  • EFI boot partitions need to use a FAT partition
784
Q

exFAT - Extended File System

A
  • allows for files larger than 2GB in size

- primarily used for external disk drives, thumb drives

785
Q

ls -la /dev/(disk)/by-uuid/

A

displays the partition’s universally unique identifier (UUID)

786
Q

df (command)

A

disk free command that shows the available disk space on a file system

787
Q

df -h

A

human readable format of disk free space

788
Q

du (command)

A

command that displays the amount of disk space in use

789
Q

du -a

A

write counts for all files and not just directories

790
Q

du -c

A

produce a grand total

791
Q

du -h

A

print sizes in a readable format (K/M/G/TB)

792
Q

du -s

A

display only a summary for any argument

793
Q

du -sh /home/user/.bash*

A

provides a human readable summary of each file matching .bash* within the /home/user directory

794
Q

df -a

A

include all filesystems including ‘dummy’ filesystems

795
Q

df –direct

A

show stats for a file instead of a mount

796
Q

df –total

A

print a grand total

797
Q

df -l

A

include only local file systems

798
Q

df -t

A

limit listing to the indicated type

799
Q

df -lh –total

A

shows a human readable listing of all local filesystems including a total line at
the bottom

800
Q

debugfs

A
  • filesystem debugger

- can show a vast amount of information about the indicated partition

801
Q

debugfs /dev/sdb1

A

will show a lot of information about any selected file or folder on the indicated drive

802
Q

debugs: ?

A

show available commands

803
Q

debugs: cd [path]

A

change to the indicated path

804
Q

debugs: features

A

display the filesystem features

805
Q

debugs: logdump

A

display journal contents

806
Q

debugs: ls

A

shows contents of current directory

807
Q

debugs: pwd

A

shows working directory

808
Q

debugs: open

A

open a filesystem for debugging

809
Q

debugs: stats

A

show stats for the filesystem

810
Q

debugs: undelete

A
  • undeletes a file

- MUST be used immediately after deleting a file

811
Q

debugs: quit

A

exit

812
Q

fsck (command)

A
  • file system check
  • invoked in command line
  • configured in /etc/fstab
  • devices must be unmounted before running check
813
Q

e2fsck (command)

A
  • file system check utility for ext2, ext3, and ext4 file systems
  • can be used to replay the file system’s journal
814
Q

e2fsck -f

A

force a check to rerun even if report comes back clean

815
Q

e2fsck -p

A

automatically repair anything it finds without prompting

816
Q

reiserfsck (command)

A

check ‘ReiserFS’ filesystem types

817
Q

dosfsck (command)

A

check DOS filesystem types

818
Q

fsck -A

A

fsck will iterate through the /etc/fstab file and check all filesystems

819
Q

fsck -C

A

display hash/mark progress bar

820
Q

fsck -N

A

dry run, makes no changes but displays what would have been done

821
Q

fsck -V

A

verbose output

822
Q

fsck -a

A

-does not prompt for confirmation

823
Q

fsck order of events

A
  • check inodes, blocks, sizes
  • check directory structure
  • check directory connectivity
  • check file/directory reference counts
  • check group summary info
824
Q

tune2fs (command)

A

-utility used to adjust parameters on an ext2, ext3, and ext4 file system

825
Q

tune2fs -c [#]

A

set the maximum number of times a filesystem can be mounted for an fsck to happen automatically

826
Q

tune2fs -e [option]

A

modifies the behavior of the filesystem with the indicated option

827
Q

tune2fs -g [groupname]

A

add the indicated group as potential users of the reserved space on a filesystem

828
Q

xfsprogs

A

tools and utilities for XFS filesystems

829
Q

xfs_check

A

XFS filesystem equivalent to fsck for checking filesystem

830
Q

xfs_repair

A

XFS filesystem equivalent to fsck for repairing filesystem

831
Q

xfs_metadump

A

creates debugging information that can be used by a third party to aid in recover of an XFS filesystem when the repair has failed

832
Q

xfs_growfs

A

used to grow an XFS filesystem

833
Q

xfs_fsr

A
  • reorganizes data stored in blocks in an XFS file system.

- similar to running a defrag utility on a Windows file system

834
Q

xfs_db

A

utility used to debug an XFS file system

835
Q

/media

A

‘parent’ directory that is often used for ‘removable’ filesystems (CDs/DVDs)

836
Q

/mnt

A

‘parent’ directory that is often used for mounting disk/partitions that are NOT part of the filesystem install

837
Q

blkid (command)

A
  • used to obtain the UUID for the local disk partitions

- will also display disk labels

838
Q

mount -a

A

mount all filesystems in /etc/fstab

839
Q

mount -f

A

fake mount all filesystems in /etc/fstab

840
Q

mount -r

A

mount the indicated filesystem in read only mode

841
Q

mount -o [option]

A

specify one or more options that are outside the defaults

842
Q

mount -w

A

mounts in writeable mode

843
Q

unmount (command)

A
  • unmounts the indicated filesystem

- filesystem can only be unmounted if not in use

844
Q

unmount /mnt/data

A

unmounts the /mnt/data directory from whatever device was mounted there

845
Q

unmount -f

A

-attempt to forcibly unmount the filesystem even if in use

846
Q

fuser (command)

A

if unmount indicates a filesystem is in use, this will tell which user is using it

847
Q

fuser -m [mount]

A

determine who is using the indicated mount

848
Q

Contents of /etc/fstab columns

A
  • device
  • mount point
  • filesystem
  • options
  • dump
  • fsck
849
Q

Octal Permission: 4

A

Read

850
Q

Octal Permission: 2

A

Write

851
Q

Octal Permission: 1

A

Execute

852
Q

Octal Permission: 0

A

No permission

853
Q

UUID

A

User ID for each user

854
Q

GID

A

Group ID for each user group

855
Q

symbolic permissions

A

permissions outlined as rwx

856
Q

numeric permissions

A

permissions outlined numerically

857
Q

Character before permissions: –

A

normal file

858
Q

Character before permissions: l

A

symlink

859
Q

Character before permissions: b

A

block device, hard drive, disk drive

860
Q

Character before permissions: c

A

character device- monitor, keyboards, mice

861
Q

Character before permissions: d

A

directory

862
Q

chmod

A

used to change permissions for files and directories

863
Q

ex: chmod 755 myscript.sh

A

set the permissions as ‘user read/write/execute’, ‘group read/execute’ and ‘other
read/execute’

864
Q

ex: chmod g=rx myscript.sh

or g+r-w+x

A

set permissions as group read/execute

865
Q

chmod -r

A

allows you to apply permissions to an entire directory structure

866
Q

ex: chmod 744 -R /home/user/data/*

A

Sets permissions for the all the files and directories within /home/user/data but
does NOT change the permissions of the /home/user/data directory itself

867
Q

chmod -c

A

report which files were changed

868
Q

chmod -v

A

show all files

869
Q

chmod -h

A

change only symbolic links, not the original

870
Q

chmod -f

A

ignore/don’t display error messages

871
Q

chown

A
  • change ownership of a file or directory

- . and : are symbolically equivalent

872
Q

chgrp

A

change the group ownership of a file or folder

873
Q

SUID

A
  • Set User ID
  • permits a user to access/run a program as if they were the OWNER
  • 4 value
  • u+s symbolic notation
  • files with an ‘s’ in the place of ‘x’ within user column
874
Q

Sticky Bit

A
  • permission has a ‘t’ in place of an ‘x’ in the other’s column
  • only allows the creator of a file to remove the file
  • g+s symbolic notation
875
Q

SGID

A
  • Set group id bit
  • files and folder’s with the s in place of the ‘x’ within the group column have this set
  • assigns group ownership to files
  • a+t symbolic notation
876
Q

umask (command)

A
  • shows the current umask settings and default value for the user
  • can be used to set a new umask value for the current shell session
877
Q

umask value

A

subtract the umask value from the default permission to get the current permission value

878
Q

Default (no umask) permissions: files

A

rw-rw-rw (666)

879
Q

Default (no umask) permissions: directories

A

rwxrwxrwx(777)

880
Q

dpkg-reconfigure tzdata

A

command used to reconfigure time zone data on an Ubuntu system

881
Q

symbolic link

A
  • shortcut from one file to another
  • small file containing its own inode and path to the original file
  • permissions cannot be modified
882
Q

ln (command)

A

used to create hard or symbolic link

883
Q

ln -s

A

creates symbolic link

884
Q

ex: ln -s myscript.sh yourscript.sh

A

creates a symbolic lnk called yourscript.sh pointing to myscript.sh

885
Q

ex: ln myscript.sh yourscript.sh

A

Creates a hard link (default) called ‘yourscript.sh’ point to the data in the inode pointed
to by ‘myscript.sh’

886
Q

ls -i [filename]

A

can be used to find all inodes/links for a file

887
Q

Filesystem Hierarchy Standard (FHS)

A
  • Defines the directory structure and contents in Unix-like operating systems
  • data integrity is preserved
  • standard is maintained by the Linux foundation
888
Q

Linux Directory structure

A

-all files and directories appear under ‘root’ directory

889
Q

/bin

A
  • contains executable programs that the user can run

- LS, CD, PWD commands reside here

890
Q

/etc

A

host-specific configuration files, no binaries

891
Q

/etc/opt

A

config files for packages stored in /opt

892
Q

/etc/sgml

A

config files for software that processes SGML

893
Q

/etc/X11

A

config files for X Windows

894
Q

/etc/XML

A

config files for software that processes XML

895
Q

/run

A

run-time variable data, information about the running system since last boot

896
Q

/sbin

A

essential system binaries

897
Q

/srv

A

reserved for server applications

898
Q

/tmp

A
  • temp files

- not preserved between reboots

899
Q

/usr

A

contains its own set of the directory tree that closely mirrors root

900
Q

/usr/bin

A

non-essential command binary for all users

901
Q

/usr/include

A

standard include files

902
Q

/usr/local

A

tertiary hierarchy for local data, specific to host

903
Q

/usr/sbin

A

non-essential system binaries

904
Q

/usr/share

A

architecture independent shared data

905
Q

/usr/src

A

source code

906
Q

/usr/X11R6

A

older X Windows configuration

907
Q

/var/lib

A

state information

908
Q

/var/lock

A

lock files that keep track of resources in use

909
Q

/var/log

A

log files

910
Q

/var/mail

A

mailbox files

911
Q

/var/opt

A

variable data from add-on packages stored in /opt

912
Q

/var/run

A

run-time variable data

913
Q

/var/spool

A

spool for tasks waiting to be processed

914
Q

/var/tmp

A

Temporary files to be preserved between restarts

915
Q

SIGHUP signal

A

1

916
Q

/etc/default/grub

A

where you can make manual changes to GRUB2

917
Q

du -sh

A

human readable summary of space being used in current directory

918
Q

du -h –max-depth=[#] [directory]

A

-provides a summary of usage by the specified number of files/folders within the directory

919
Q

du –inode

A

list inode usage information instead of block usage

920
Q

top: ‘u’ key

A

pulls up processes for a user after typing in the user name

921
Q

Commands that will show you full path to an application

A
  • type -P

- which

922
Q

/dev/sdd3

A

third partition on the fourth SATA disk

923
Q

less: to scroll down

A
  • Down arrow
  • Page Dn key
  • ‘j’ key
924
Q

less: to scroll up

A
  • Up arrow
  • Page Up
  • ‘k’ key
925
Q

less: to search

A

type in desired text

926
Q

/var/log/secure

A
  • will create a new entry when someone logs into the system

- only readable by root

927
Q

Parse a file containing regular expressions

A

grep -E -f [filename]

egrep -f [filename]

928
Q

pgrep -a

A

list the full command line as well as the process ID

929
Q

tmux (command)

A
  • modern terminal window manager like ‘screen’ with extra features
  • process will stay running after logging out
930
Q

apt autoremove

A

-used to remove packages that were auto installed for packages no longer needed

931
Q

locate (command)

A
  • searches local database of files and folders looking for items that match
  • database needs to be updated to keep track of changes
932
Q

updatedb (command)

A

updates the database that the locate command uses

933
Q

whereis (command)

A

command locates binary, source, and/or manual pages for a command

934
Q

locate -i

A

ignore case on the file being searched for

935
Q

/etc/updatedb.conf

A
  • configuration file for the updatedb command

- contains full or partial filenames to ignore or ‘prune’ from database updates

936
Q

which -a [command]

A

display all matches in the PATH, in the order they would run/appear

937
Q

whereis -b

A

searches for binaries

938
Q

whereis -m

A

searches for manual entries/man pages

939
Q

whereis -s

A

locates the source of a specified command name

940
Q

whereis -u

A

unusual or undocumented entries

941
Q

type -a

A

lists all variants of the indicated command

942
Q

find -perm -[####]

A

find matching files by indicated permission

943
Q

uniqu -c

A

will list the amount of times a line appears consecutively in a file

944
Q

uniq –group

A

show all items, separating groups with an empty line

945
Q

sort -u

A

will remove any duplicate lines in a file

946
Q

`example:

cat list.csv | tr ‘,’ ‘:’

A

-Print out the file with colons replacing commas

947
Q

example:

cat list.csv | tr -d ‘,’

A

Print out the file without showing the commas

948
Q

/etc/mke2fs.conf

A

configuration file used by mke2fs command when creating ext file systems

949
Q

xfs_db: frag

A

will check on the filesystem’s fragmentation

950
Q

xfs_db: freesp

A

will show how much free space is on the particular device

951
Q

find . -atime -2

A

-pulls list of files accessed in the last 48 hours

952
Q

touch -m [filename]

A

change modification time

953
Q

locate -A [option1] [option2]

A

used to locate patterns that match all options

954
Q

locate -c

A

count the number of files that match the given pattern

955
Q

dpkg –get-selections

A

to list out every package installed on a Debian system

956
Q

dpkg-query -S [pathname]

A

to find out which package owns a specific file

957
Q

apt-file

A

utility used for searching for searching for files inside packages

958
Q

fdisk -l /dev/sda

A

command used to locate the boot partition

959
Q

ssh-keygen

A

used to generate a public and private SSH key pair when accessing remote, cloud-based systems

960
Q

ssh-copy-id

A

used to copy a system’s public SSH key to a remote system to facilitate remote authentication

961
Q

ldconfig -v

A

display the library version numbers, name of each directory and the links that are created

962
Q

ldd -u (–unused)

A

prints the unused dependencies if they exist

963
Q

Location of menu entries for GRUB

A

GRUB: /boot/grub/grub.cfg

GRUB Legacy: /boot/grub/menu.lst

964
Q

locate -e

A

print only entries that pull existing files at the time the command is run

965
Q

/var/lib/dbus/machine-id

A
  • location of dbus id

- symbolically linked to /etc/machine-id

966
Q

unset -f (name of function)

A

used to remove a function

967
Q

shopt -u (option)

A

to disable an option

968
Q

Non-Special Characters in Basic Regular Expressions

A
  • ?
  • +
  • { }
  • |
  • ()
  • Must be escaped with \
969
Q

Reach runlevel 1 (SysV)

A

telinit 1, s, or S

970
Q
  • kill -l

- man 7 signal

A

method of pulling up kill signals

971
Q

Most common kill signals

A
  • 1 Sighup
  • 9 Sigkill
  • 15 Sigterm