forked from opsschool/curriculum
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
225 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,25 @@ | ||
The boot process | ||
**************** | ||
|
||
The boot processes involves many components: | ||
|
||
* List them all - BIOS, POST tests, reading the MBR/GUID, Loading the boot | ||
loader (grub), the kernel, init, init scripts, getty | ||
|
||
The BIOS | ||
======== | ||
|
||
How an operating system is started | ||
================================== | ||
MBR / GUID partition tables | ||
Maybe a brief mention of ``INT 13H``? A side note about how this used to be a | ||
popular hook for boot loader viruses might be interesting for readers :) | ||
|
||
GRUB bootloader | ||
=============== | ||
|
||
/bin/init | ||
========= | ||
|
||
Run levels and Single User Mode | ||
=============================== |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
Crontab | ||
******* | ||
|
||
It's a task scheduler! Explain this more. | ||
|
||
The ``crontab`` command | ||
======================= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,84 @@ | ||
File systems | ||
************ | ||
|
||
Background | ||
========== | ||
|
||
A filesystem is the street grid of your hard drive. It’s a map of addresses to | ||
where data is located on your drive. Your operating system uses the filesystem | ||
to store data on the drive. | ||
|
||
There are a number of different types of filesystems. Some are better at | ||
handling many small files (ReiserFS), some are much better at large files and | ||
deleting files quickly (XFS, EXT4). | ||
|
||
The version of Unix you use will have picked a filesystem which is used by | ||
default, on Linux, this is often EXT3. | ||
|
||
Understanding the way filesystems work is important when you have to fix issues | ||
related to disk space, performance issues with reading and writing to disk, and | ||
a host of other issues. | ||
|
||
In this section we will discuss creating partitions, file systems on those | ||
partitions, and then mounting those file systems so your operating system can | ||
use them. | ||
|
||
Working with disks in Linux | ||
=========================== | ||
|
||
Disks in Linux are normally named /dev/sda, /dev/sdb, etc. | ||
If you are in a VM, they may be called /dev/xvda, /dev/xvdb, etc. | ||
The last letter (“a”, “b”, “c”..) relates to the physical hard drive in your | ||
computer. “a” is the first drive, “b” is the second. | ||
|
||
If you have an already configured system, you will likely see entries like | ||
this:: | ||
|
||
-bash-4.1$ ls -la /dev/sd* | ||
brw-rw---- 1 root disk 8, 0 Jul 6 16:51 /dev/sda | ||
brw-rw---- 1 root disk 8, 1 Sep 18 2011 /dev/sda1 | ||
brw-rw---- 1 root disk 8, 2 Sep 18 2011 /dev/sda2 | ||
brw-rw---- 1 root disk 8, 3 Sep 18 2011 /dev/sda3 | ||
|
||
The number at the end of each drive maps to the partition on the drive. | ||
A partition refers to a fixed amount of space on the physical drive. Drives must | ||
have at least one partition. Depending on your specific needs, you might want | ||
more than one partition, but to start with, we’ll assume you just need one big | ||
partition. | ||
|
||
Configuring your drive with partitions | ||
====================================== | ||
man parted | ||
|
||
Formatting partitions with new file systems | ||
=========================================== | ||
man mkfs | ||
|
||
How filesystems work | ||
==================== | ||
Files, directories, inodes | ||
|
||
Navigating the filesystem | ||
========================= | ||
``cd``, ``ls``, ``rm``, ``find`` | ||
|
||
Inodes | ||
====== | ||
What the contain, how they work | ||
|
||
File system layout | ||
================== | ||
File system heirarchy standard | ||
|
||
Filesystem options | ||
================== | ||
noatime | ||
nobarriers | ||
|
||
Fragmentation in unix filesystems | ||
================================= | ||
|
||
Filesystem objects | ||
================== | ||
Filesystem contain more than just files and directories. | ||
Talk about devices (mknod), pipes (mkfifo), sockets, etc. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,31 @@ | ||
Package management | ||
****************** | ||
|
||
What is a pacakge manager? | ||
========================== | ||
High level overview. | ||
Mention that most flavours of unix have their own way of managing packages, but | ||
at their core they all follow the similar principles (install/uninstall | ||
packages, keep track of what is installed, etc). | ||
|
||
RPM and YUM (RedHat, CentOS, Fedora, Scientific Linux) | ||
=========================================================== | ||
Some text about what RPM is, what YUM is, and how they both provide two halfs of | ||
the same function. | ||
|
||
Installing packages | ||
------------------- | ||
|
||
Upgrading packages | ||
------------------ | ||
|
||
Uninstalling packages | ||
--------------------- | ||
|
||
Querying the RPM database | ||
------------------------- | ||
|
||
Creating packages | ||
----------------- | ||
Mention spec files and roughly how RPMs are put together. | ||
Then introduce FPM and tell them not to bother with spec files yet. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,61 @@ | ||
Useful shell tools | ||
****************** | ||
|
||
When you work in a unix environment, you will need to make frequent use of the | ||
command line tools available to you in order to complete the tasks you have. | ||
|
||
Mention that the philosophy here is to have many tools which perform a few | ||
discrete tasks, and run them together to get what you want. | ||
|
||
Working with your system | ||
======================== | ||
|
||
ps | ||
-- | ||
|
||
top | ||
--- | ||
|
||
kill | ||
---- | ||
|
||
mount | ||
----- | ||
|
||
stat | ||
---- | ||
|
||
vmstat | ||
------ | ||
|
||
lsof | ||
---- | ||
|
||
strace | ||
------ | ||
|
||
ulimit | ||
------ | ||
|
||
Estracting and manipulating data | ||
================================ | ||
|
||
A very common pattern in unix is to take some data (a text file, a directory | ||
listing, the output from a command) and either extract specific data from it, | ||
change some of the data, or both. These tools help you when you do this. | ||
|
||
cat | ||
--- | ||
|
||
grep | ||
---- | ||
|
||
awk | ||
--- | ||
Only talk about column extraction for now? It's the most common / needed piece | ||
of awk at this level. | ||
|
||
sed | ||
--- | ||
Only talk about replacing text for now? It's the most common / needed piece of | ||
sed at this level. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,27 @@ | ||
Shells | ||
****** | ||
|
||
What is a shell? | ||
================ | ||
|
||
Introduction to Bash | ||
==================== | ||
|
||
Shell fundamentals | ||
================== | ||
|
||
Environment variables | ||
--------------------- | ||
``$PATH``, ``$HOME``, ``$USER``, etc | ||
|
||
Special environment variables | ||
----------------------------- | ||
``$$``, ``$!``, ``$?``, etc | ||
|
||
History | ||
------- | ||
``.bash_history``, ``!!``, etc | ||
|
||
Job control | ||
----------- | ||
``^Z``, ``bg``, ``fg``, ``%1/2/3..``, ``jobs`` |