1 of 21

Intro to Linux

and OSS

Lecture 1

laksith, trinityc

2 of 21

Topics today

  • Course logistics
  • Intro to the shell
  • What is UNIX?
  • Free and Open Source Software

3 of 21

Logistics

  • Lecture @ 9-10pm, VLSB 2060 / ocf.io/decalzoom
    • Recordings released Tuesday
  • Labs released before lecture and due the following Saturday by 11:59pm
  • Live sessions for Labs @ 8-9pm, OCF
  • Lab01 due 02/04 11:59PM

4 of 21

Course resources

  • Your facilitators!
  • Ed
  • OCF Slack (ocf.io/slack) or Discord (ocf.io/discord) #decal-general
  • All materials available at decal.ocf.io
  • Ask questions / work on lab with us during live sessions!
  • Gradescope

5 of 21

Engaging with this lecture

  • Connect to the shell (follow along!)
    • ssh $OCF_USERNAME@ssh.ocf.berkeley.edu
    • I’ll do a demo in a minute!
  • Ask questions!
    • During live sessions
    • On #decal-general

6 of 21

Shell

  • What is the shell? A command line-interface (CLI) to interact with the computer.�
  • Common shells: bash, zsh, fish
    • They’re mostly the same, (bash will be supported by almost all UNIX systems though).

7 of 21

Shell Commands

  • Basic structure of a command is `[command] [flags] [arguments]`
  • RTFM! `man (command)`
  • Google is also your best friend.

8 of 21

Common Shell Commands

  • `cd` - change directory
  • `ls` - list directory
  • `cat` - concatenate and print files
  • `head` - read the first 10 lines
  • `less` - read larger files
  • `mv` - move
  • `cp` - copy
  • `rm` - delete a file

9 of 21

Editors

  • Nano
  • Vim (`vimtutor`)
  • Emacs (Emacs Tutorial)
  • (NotePad)
  • Try running `(editor of choice) (file)` {not notepad}
  • Try searching “vi” or “emacs” on google

10 of 21

Demo

11 of 21

Evolution of UNIX

12 of 21

Open Source Software (OSS)

Free and Open Source Software (FOSS) or Free/Libre Open Source Software (F/LOSS)

“Free as in beer, and free as in freedom”

Open source software - term used by some software and technology companies. You may not have the right to use, modify, or redistribute the software or source code.

13 of 21

GNU and the Free Software Movement

“So that I can continue to use computers without violating my principles, I have decided to put together a sufficient body of free software so that I will be able to get along without any software that is not free.”

Richard Stallman (1983)

https://groups.google.com/forum/#!msg/net.unix-wizards/8twfRPM79u0/1xlglzrWrU0J

14 of 21

The Four Freedoms

  1. The freedom to run the program as you wish, for any purpose.
  2. The freedom to study how the program works, and change it so it does your computing as you wish. Access to the source code is a precondition for this.
  3. The freedom to redistribute copies so you can help others.
  4. The freedom to distribute copies of your modified versions to others. By doing this you can give the whole community a chance to benefit from your changes. Access to the source code is a precondition for this.

What is free software? by the Free Software Foundation

15 of 21

Berkeley Standard Distribution

  • A UNIX derivative (BSD) was created at UC Berkeley
  • Popular and reliable, a lot of things from BSD are used today
    • vi and Berkeley sockets
  • Stuck in legal limbo w/ AT&T
  • BSD derivatives still remain popular (MacOS, FreeBSD, OpenBSD)

16 of 21

Unix’s advantages over non-Unix systems

  • UNIX philosophy: simple, short, clear, and modular code
  • UNIX idea: “everything is a file”
  • Worse is better.
  • Sockets for networking, now copied beyond Unix systems
  • “It’s very simple — you read the protocol and write the code.” - Bill Joy on implementing TCP/IP

17 of 21

Why FOSS?

  • Security
  • Cost
  • Privacy
  • Control
  • Collaboration

18 of 21

OSS Licenses: Legal Jiggery-Pokery

  • Copyleft (GPL)
    • “I want to make sure that all versions of GNU remain free.” - Stallman (GNU Manifesto)
    • “a cancer that attaches itself in an intellectual property sense to everything it touches” - Steve Ballmer
  • Permissive (MIT, BSD, Apache, WTFPL)
    • Do whatever you want (basically)
  • choosealicense.com/licenses

19 of 21

(even more) Demo

20 of 21

Additional Resources

Resources on learning:

Technical resources:

Fun reads about UNIX history and culture:

GOOGLE.COM

21 of 21

(even more)*2 Demo