Learn to program in the Linux shell from August 19!


bash_classes_gif

Linux scripting and programming courses @091labs.
Four weeks, four classes, beginning August 19, 7pm.

Subjects include:

  • The fundamentals of computer programming.
  • Installation and maintenance of a Linux system.
  • Bash shell syntax, structures, and pipelines.
  • Practical tasks for shell scripts.
  • Passing data to and from binary programs.
  • Binary shell programming with C#/Mono.

Requirements:

  • Laptop computer.
  • Installation media (USB key, CD-R or DVD-R).

Cost:

  • €40 general rate for the full workshop.
  • €20 reduced rate for hackerspace members and students.

For more information, contact or visit:

Bare blurbs aside, I plan to use Ubuntu for this, and start off by showing people how to install Linux on their laptop. If they survive that (and the scary liability release for my assistance), delve into Boolean logic, basic structures, and hopefully devote most of my time to doing cool and practical things with the Bash shell.

I don’t intend to handhold through the Linux installation: If you want to program or script with Linux, I expect that you at least be comfortable enough to partition your laptop and install it. I really recommend that you come into this workshop with either a function Linux installation, OS X installation, or a Cygwin installation so you can begin working immediately – example code I use will be usable in both environments (except for the respective path differences).

The Big Topics of the shell workshop include:

  • Refreshment on elementary subjects: Boolean logic, Linux and its shell.
  • Input and output (STDIN, STDOUT, STDERR), and redirection.
  • Pipelines, and using them to build workflows.
  • Parsing, searching, and appending to files.
  • Coding standards and best practices.
  • Everyday uses and examples of shell scripts.
  • Including your own binary programs (C#/Mono) in your workflow. I will cover basics of this.

Come one, come all, and geek out to your heart’s content. :)

*POSTPONED* The Linux Workshop of Stupendous Splendour


Unfortunately, this workshop has had to be postponed as Mark isn’t feeling well and isn’t up to the trip down to Galway for the class. We’ll announce here when we know more about when it’s being rescheduled, sorry.

Why yes, a Linux workshop!

Friday January 20, from about 7pm onward. You want to learn Linux? Great! What you need is:

  1. A laptop computer with enough hard disk space to install Linux.
  2. A sense of self-worth and a desire to learn.
  3. The fortitude to repartition your machine in order to install Linux.

We will be working with Ubuntu Linux 11.101.

Order of operations:

  1. Get everyone settled and liability releases signed2.
  2. Introduce myself and introduce Linux. I have a swish presentation.
  3. Hand out installation media to anyone who hasn’t been frightened away3.
  4. Branch out into Q&A and get everyone working on a goal. I don’t have an overall plan in mind, save that I do better in this kind of format.

Scary footnotes aside, it should be a great evening for anyone who wants to come in and try Linux out and enjoy our friendly user-friendly hackerspace.

Admission is €10 per person, with proceeds going to the hackerspace.


1The hackerspace has Ubuntu 11.10 installation media, I have Ubuntu 11.10 installation media and it is honestly the only distro I have used for any great length of time in the past decade.
2I want you to understand that complete data loss on your hard disk is a tangible risk if you mess up with partitioning. You will be supervised and the risk of data loss will be explicitly spelled out on the night.
3Depending on both the size of the crowd and my own infamously mercurial temperament, I may not be able to micromanage partitioning and installation. I will certainly supervise, but the burden of responsibility is on you, O Participant!

Introduction to Linux class this Tuesday


Want to try Linux? There’s a class for that!

Back by popular demand, 091 Labs’ Introduction to Linux class will be covering the installation and setup of Ubuntu 10.10, including configuring it to work seamlessly with your Windows files. We’ll even show you how to setup all the cool goodies!

The class will cost just €5, which will go towards rent and equipment for 091 Labs. The class will be about 2 hours long and printed notes will be provided afterwards. No prior knowledge of Linux is necessary as this is starting from the very basics!

What to bring:

  • A laptop

By installing Linux you can KEEP Windows installed, you’ll just have the option of booting either Windows or Ubuntu when you switch your computer on. As a precaution, please backup all your important files anyway.

If you do not have a laptop, we will be able to offer a limited amount of old laptops which you can install Ubuntu on, just to get a feel for the installation. Please request these in advance. We have a Tuck Shop in 091 Labs selling drinks and snacks for low prices, which also goes towards our rent :)

Workshop: Protect your (Ubuntu) laptop in one hour


This post started off in my head as a guide to firewalling your home server, but it gradually evolved, mentally, into a workshop for securing the information on your Linux laptop with GRUB, KeePass and Truecrypt. Click the (awesome Hackers) image below to RSVP your place for this once-off workshop!

Build a(n Ubuntu) home server in one hour…


Tux!

…and secure it too.

When Aaron, Matthew and I incepted our Linux classes, we did so with a nebulous aim of offering a course of comprehensive beginner material, with our ultimate, nebulous goal being to offer “more advanced stuff”. Well, here we are. I dove into the basics of manipulating the Bash shell, simple scripting, SSH, and confidently administering a headless system as root. In the midst of my preparations for these classes, I had a theatric lightbulb-over-head moment: How hard would it be, really, to turn a desktop into a basic home server? Set aside performance and security concerns for a moment and just consider accessibility and turnaround time to live access on the Internet.

As it turns out, this takes about one hour. Maybe two if you are installing Linux from scratch. All you need to begin is a method to connect your dynamic home IP to a static domain and then a method to remotely access your home server:


apt-get update
apt-get upgrade
apt-get install openssh-server openssh-client

Sign up for a free DynDNS account and domain (remember to complete checkout!).


apt-get install ddclient

Populate three lines in /etc/ddclient/ddclient.conf with:

  1. Your DynDNS user name.
  2. Your DynDNS password.
  3. Your DynDNS domain.


/etc/init.d/ddclient restart
/etc/init.d/ssh start

Now give DynDNS and ddclient about five minutes (on the safe side) to update. Congratulations, you have a live Internet server for your file-access, media streaming, jerking-around-while-at-work, and general geek needs.

Now, we have a server. Locking down its Internet connection? Mmm, ten minutes. It was actually over an hour for me because I was engrossed in crash-learning netfilter/iptables syntax from scratch.


#/bin/sh

# Clear all existing iptable rules.
iptables -F
iptables -X

# Drop all incoming, outgoing and forwarded packets.
iptables -P INPUT DROP
iptables -P OUTPUT DROP
iptables -P FORWARD DROP

# Permit loopback activity (client and server programs on this machine).
iptables -A INPUT -i lo -j ACCEPT
iptables -A OUTPUT -o lo -j ACCEPT

# Permit TCP connections to and from this machine on port 22 (SSH).
iptables -A INPUT -p tcp -dport 22 -j ACCEPT
iptables -A OUTPUT -p tcp -sport 22 -j ACCEPT

You’ll eventually need to open up ports for NTP, mail, DNS and others, but really: This is all there is to it. And because I am awesome, I wrote all of this up on Google Docs and made it freely available for download. Any notes suggesting alterations, additions or deletions can be made directly on the document, or by email to me directly.

Your Home Server and You