Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
root directory.
Contains server specific services related data. Content of the files that are expected to grow
16. /srv Service Data
can be found under this directory.
For example, /srv/cvs contains CVS related
data. 7. /var Variable Files This includes system log files (/var/log);
packages and database files (/var/lib); emails
(/var/mail); print queues (/var/spool); lock files
(/var/lock); temp files needed across reboots
(/var/tmp);
CentOS Is non-volatile firmware used to perform hardware initialization during the booting process (power-on startup).
RedHat
Fedora Loads a boot loader of an operating system from a mass memory device
Ubuntu A master boot record (MBR) is a special type of boot sector at the
Debian very beginning of partitioned computer mass storage devices like
Mint
fixed disks or removable drives.
Popular
SuSE
The MBR holds the information on how the logical partitions,
Gentoo containing file systems, are organized on that medium.
Slackware
Creating single logical volumes of multiple physical volumes or In Unix-based computer operating systems, init (short for initialization) is the first process started
entire hard disks (somewhat similar to RAID 0, but more similar to during booting of the computer system. Init is a daemon process that continues running until the
JBOD), allowing for dynamic volume resizing. system is shut down. It is the direct or indirect ancestor of all other processes and automatically
adopts all orphaned processes. Init is started by the kernel using a hard-coded filename; a kernel
Is a device mapper target that provides
Managing large hard disk farms by allowing disks to be added and panic will occur if the kernel is unable to start it. Init is typically assigned process identifier 1.
logical volume management for the
replaced without downtime or service disruption, in combination with Linux kernel. Most modern Linux
hot swapping. Logical Volume Manager (LVM) At boot time, the boot loader loads the kernel and the initramfs image into memory and starts the
distributions are LVM-aware to the point kernel. The kernel checks for the presence of the initramfs and, if found, mounts it as / and runs /init.
On small systems (like a desktop), instead of having to estimate at of being able to have their root file The init program is typically a shell script. Note that the boot process takes longer, possibly
installation time how big a partition might need to be, LVM allows systems on a logical volume. Linux significantly longer, if an initramfs is used.
filesystems to be easily resized as needed.
The /sbin/init program (also called init) coordinates the rest of the boot process and configures the
Performing consistent backups by taking snapshots of the logical volumes. environment for the user. When the init command starts, it becomes the parent or grandparent of all
of the processes that start up automatically on the system.
Is a device manager for the Linux kernel. It handles all user
space events raised when hardware devices are added into Is a suite of basic building blocks for a Linux system. It provides a system
the system or removed from it, including firmware loading and service manager that runs as PID 1 and starts the rest of the system.
as required by certain devices. systemd provides aggressive parallelization capabilities, uses socket and
D-Bus activation for starting services, oers on-demand starting of
On some Linux distributions (e.g. Debian, udev daemons, keeps track of processes using Linux control groups, maintains
Mounted to /tmp
Ubuntu), /tmp is a normal directory Provided by temporary filesystem tmpfs mount and automount points, and implements an elaborate transactional
Device Managers dependency-based service control logic. systemd supports SysV and LSB
/dev/shm uses tmpfs. init scripts and works as a replacement for sysvinit.
Mounted to /dev on startup Is an init system used in Linux distributions to bootstrap the user space.
Subsequently to booting, it is used to manage system processes.
devfsd
It is a replacement for the UNIX System V and Berkeley Software
hotplug
Distribution (BSD) init systems
qmail
consoled
postfix An MTA is an application that routes and
transmits email from one node on a network journald
sendmail to another. MTA - Mail Transfer Agents logind
exim Init
networkd
It uses a protocol known as SMTP (Simple Components
systemd timedated
Mail Transfer Protocol) to perform its task.
udevd
libudev
Systems
systemd-boot
Run Targets
BSD
Mounted to /proc
You have seen that while you are editing, your last deletion (d
or x) or yank (y) is saved in a buer (a place in stored
memory). You can access the contents of that buer and put
the saved text back in your file with the put command (p or
P).
Buers The vi editor has a total of 27 buers: 26
named buers (az) and 1 unnamed buer
that is overwritten by each new operation.
Delete character to the right of cursor x
Named buers
Delete character to the left of cursor X
The Unnamed buer
Delete to the end of the line D Deleting
Just about any keystroke or action can be
Delete current line dd done X number of times by prefixing it with a
number.
Delete current line :d Force Multipliers
For example, to move the cursor to line 5, you
Yank the current line yy would press 5G. Moving 12 words to the right
Yanking is accomplished with 12W.
Yank the current line :y
vi filename
"/home/rbrunson/file1" 57L, 1756C 18,1 Top
vi +/string filename open a file with a search string
The numbers 18,1 on the right side of the message line are the current Opening
line and column numbers, and the Top text is the current position of the Message line edit a file and have the cursor jump to a
cursor. This changes to be Bot if you entered the last half of the file. The vi +18 /etc/inittab
particular line
other value possible is All, which simply means that all the contents of
the file are currently on the screen. Vi has two modes insertion mode and command mode. The editor
begins in command mode, where the cursor movement and text
Exit, saving changes :x deletion and pasting occur. Insertion mode begins upon entering
Modes an insertion or change command. [ESC] returns the editor to
Exit as long as there have been no changes :q command mode (where you can quit, for example by typing :q!).
Quitting
Exit and save changes if any have been made ZZ Most commands execute as soon as you type them except for
"colon" commands which execute when you press the ruturn key.
Exit and ignore any changes :q!
You can only get to last line mode from
Move left h command mode, and you get into last line
mode by pressing the colon key
Move down j
You can do simple things, like quitting your vi
Move up k LastLine mode
session
Move right l You can also perform some amazing vi search
commands or vim search and replace
Move to next word w commands
Move to next blank delimited word W vi
i Insert before cursor
Move to the beginning of the word b I Insert before line
Move to the beginning of blank delimted word B a Append after cursor
Move to the end of the word e A Append after line
Inserting Text
Move to the end of Blank delimited word E o Open a new line after current line
Move a sentence back ( O Open a new line before current line
Move a sentence forward ) r Replace one character
Move a paragraph back { R Replace many characters
Motion
Move a paragraph forward } You press U in Command mode to undo a
single operation or the latest in a series of
Move to the begining of the line 0
changes. If you opened a file, made 30
Undo Operations
Move to the end of the line $ changes, and then pressed the U key 30
times, you'd end up with the exact same file
Move to the first line of the file 1G you had opened.
Move to the last line of the file G /string Search forward for string
Move to nth line of the file nG ?string Search back for string
Search
Move to nth line of the file :n n Search for next instance of string
:n Go to next file
Files
:p Go to previos file