Unix & Git for Everyone

Goals:

  • Comfort and agility at the command line
  • Mastery of basic versioning workflow with git

Today's Agenda

  • Find/Install your command line
  • Get accustomed to finding your way around
  • Create a journal to record what you learn
  • Put your journal into version control with basic git workflow
  • Learn some more advanced shell commands
  • Learn some more advanced git commands

Along the way, you'll get a chance to learn more about the history of unix.

And you'll gain a deeper understanding of what exactly git does when you use it.

By The End Of Today

Using only your browser, your text editor and your command line, you'll be able to

  • move around and manipulate files with confidence
  • learn about common unix commands
  • run programs from your command line
  • control access to your filesystem
  • create a git repository from scratch
  • add, edit and remove items from a repository
  • connect a repository to the larger world with GitHub

Unix Commands

A bit of history and context

What is Unix?

  • Multiuser Multitasking Operating System
  • Unix can be a lot of things
    • A desktop
    • A server
    • A super computer
    • A phone
    • An embedded system

History

  • Created at AT&T's Bell labs by Ken Thompson and Dennis Ritchie
  • In 1983 Richard Stallman began the creation of GNU Project (Gnu's not Unix) with the intention of creating an open source version of Unix
  • In 1991, a student at Helsinki name Linus Torvalds created a small unix kernel for his 80386 PC

Announcing Linux

Hello everybody out there using minix -

I'm doing a (free) operating system (just a hobby, won't be big and professional like gnu) for 386(486) AT clones. This has been brewing since april, and is starting to get ready. I'd like any feedback on things people like/dislike in minix, as my OS resembles it somewhat (same physical layout of the file-system (due to practical reasons) among other things).

I've currently ported bash(1.08) and gcc(1.40), and things seem to work. This implies that I'll get something practical within a few months, and I'd like to know what features most people would want. Any suggestions are welcome, but I won't promise I'll implement them :-)

Linus (torvalds@kruuna.helsinki.fi)

PS. Yes it's free of any minix code, and it has a multi-threaded fs. It is NOT portable (uses 386 task switching etc), and it probably never will support anything other than AT-harddisks, as that's all I have :-(.

Linus Torvalds

History

Linux is now the largest software project that has ever existed in the history of computing,

Why?

  • open source
  • anyone can work on it.

Current State of Unix on the Desktop

  • Linux
  • BSD (Berkeley Software Distribution)
  • Mac OSX (Darwin)

Philosophy

  • Everything is a file
    • Including pieces of the Kernel and hardware
    • Linux exposes these interfaces in /proc and /sys
    • OSX does not directly expose these interfaces to the user, instead use sysctl
  • "Do one thing and do it well"
  • "Every output can become the input of another program"

Two Major Unix Components

  • Kernel
    • Is the absolute core of the OS
    • Determines what runs on the CPU
    • Interacts directly with the hardware
  • The shell
    • How the user interacts with the operating system
  • Represent two different execution environments on a Unix
    • Kernel space
    • User space

Kernel Space

  • Represents the "admin" user space
  • Directly affects the hardware, filesystem and how the system itself runs
  • You need elevated access in order to manipulate anything here
  • At the same time, users need to be able to access things like hardware and the filesystem
  • The kernel provides "system calls" that check permissions and allow or disallow certain actions

User Space

  • All the actions that aren't in Kernel Space
  • Has to use system calls in order access the hardware
  • Manifests as a "shell" run in a terminal program

This is where we will spend our time today

(and for the for the forseeable future)

Next Up

<Thank You!>