Levinux – A Tiny Version of Linux for Education
This is the fastest way to start getting hands-on experience with Linux Server. Start your life-long love affair with the “short stack” (V2.4).
Levinux (download ~20 MB) is a tiny virtual Linux server that runs from USB or Dropbox with a double-click (no install or admin rights required) on Macs, Windows or Linux PCs—making it the perfect learning environment, and way to run & keep your code safe for life! Think of it as an introduction to old-skool “short stack” development—more relevant now then ever as Linux/Unix gets embedded into everything.
Levin-whuh? What’s this guy trying trying to accomplish?
What I propose…
Even if you never programmed before, I propose starting teaching you how to do it “old skool” within minutes of reading this. Download and double-click the Levinux file, and follow the instructions. It could expand your abilities and alter your life. After this virtual machine, I propose putting real hardware like the Raspberry Pi into your hands at the whopping expense of $35 so you can continue on a better-than-virtual system. The “short stack” will still apply — as it will to every other computing situation you ever encounter, with the exception of those designed to entangle you in vendor dependency.
My approach is at odds with today’s paralyzing array of tool-choice — and that is precisely why it will give you an edge over the competition. In short, I propose you take up the “core technologies” that lurk underneath everything, instead of the more heavyweight modern software fads. This will let you achieve greater mastery over a smaller set of timeless and infinitely useful tools. They will serve you for the rest of your life, and even if they don’t become your main thing, it will always be like always having the Swiss Army Knife of information tech in your pocket… though there is also no reason you couldn’t build an empire on it.
And I’ll admit it right here. I view Levinux and Linux just as a means to get a consistent Python code execution environment available. All Python tutorials I make in the future will be identical to your environment. Imagine that? Perfectly reproducible results, because it lives in a virtual box that instantiates identically under 3 different host OSes. All you Reddit’ers who can even grok such notions, consider. This is the pre-Raspberry Pi Pi. It’s the kicking the tires of text-based Linux with no graphics beyond talking to a browser—probably through a Web server, which is like project #1 of what I’ll be presenting here. And all knowledge almost 100% transferrable to other similar things. See the dots getting connected?
DEVELOPER HELP REQUESTED: Do you know how to compile QEMU binaries for Windows, Mac and Linux with configuration files custom tailored to your needs? I could use your help! Everyone else who just wants to learn Linux, keep reading down this page.
What does Levinux look like?
When you double-click the launch script, a black window that looks much like this will pop up. The first time you run Levinux, it will “inflate” by hitting a software repository to pull down a webserver and an SSH server. You need an Internet connection and not-too-restrictive firewall for this to work correctly.
A journey of a thousand miles begins with a single step
The videos below will give you a little more idea what to expect. The first goal here is to make an easily reproducible positive old-school Linux Server experience for you, no matter what platform you’re starting out on. There is great reward in this (for reasons described elsewhere), and it is my heartfelt belief many more people can do it than give themselves credit. This stuff just LOOKS intimidating if you don’t have the right introduction (what I’m trying to do here). But just like anything else, once you get through the difficult initial first tries and stick with it, everything starts to make sense, and come naturally to you. So, have no fear. There is nothing you can screw up. You can just unzip Levinux again and try over. Easier still, you can double-click the Reset icon to set it back to its initial state. Work your way through these same experiences these videos describe, and you’ll start getting the foundation for a timeless, valuable, and nearly platform independent approach to programming. So welcome on board, and there’s a few places you can reach out to the burgeoning Levinux community.
- NEW: Now on github! miklevin / levinux
- The Levinux Fanpage on Facebook
- The Google Plus Levinux Community
- The YouTube Levinux playlist (post in the video comments)
- And the one-page forum embedded right at the bottom of this page!
Here’s what Levinux looks like booting the 1st time
And here’s why it works great with Dropbox
Learn how to program Python, a Hello World example
And here’s an introduction to the git distributed version control system
Here’s resetting the server and some file layout explanation
This is an introduction to Python Web development work with bottle.py
How to use pip, the Python software repository, and make installs permanent.
Only for Advanced Linux folks, modifying Levinux Recipes
Okay, what is the ultimate goal here?
There are tons of approaches to learning to program, and reasons for doing so. You might want to build an empire, or just have a few extra skills in your back pocket. Levinux supports your pursuit either goal and everything in-between. It does this by focusing on one particular “short stack” approach: learning the least-possible software possible of the most timeless nature to enable you to do interesting things. It can be your primary programming environment, or just sort of a safety-net as you pursue other more sexy platforms like mobile app development. Programming is just automating machines to do your bidding, with a just little more control than The Sorcerer’s Apprentice. But still that provides a pretty good model for the broad, important concepts you’ll be mastering if you stick with me:
Under The Hood
Note: this will read like blah, blah, blah to newbies who can focus on the videos. But here’s the it is for all you Reddit and HackerNews folks…
Levinux is based on Tiny Core Linux and QEMU. Tiny Core is an extremely minimal distribution of Linux created by Robert Shingledecker, the guy who “matured” Damn Small Linux (DSL) into such a creative and popular distro and was responsible for the United States’ first large-scale municipal government Linux install. Tiny Core’s philosophy comes from the world of “embedded systems” where operating systems aren’t generally installed across hard drives and allowed to go corrupt over time. Instead, it’s a perfect state on every boot-up. Tiny Core is in-turn based on BusyBox, which is a tiny program used in many embedded systems that replaces what is called the GNU commands—or really, the OS proper, which is what gets Tiny Core down to ~20MB.
Levinux is also based on QEMU, which is a computer emulator used in Android development, Oracle VirutalBox and the Linux kernel virtual machine. I am currently using the most popular mainstream binaries pointed-to by the QEMU website after a long adventure of trying to compile my own, and am in the process of recruiting QEMU and Linux kernel gurus to help with this project. Yes, there’s nothing wrong with starting out with Debian, Arch, Fedora, CentOS or any of the other fine GNU-based Linux distros, but I propose to get you on your way within seconds of a tiny 20MB download.
If it makes you feel better, consider Levinux a stepping stone for newbs, because it gives you a taste of Linux Server and sets you on your way to being able to do SOMETHING within minutes, instead of fiddling around with LiveCDs or hard drive partitioning. And the work you accomplish here is as valid as the work you accomplish anywhere else. Python is still Python. vim is still vim. git is still git. Push your code up from Levinux and pull it down from whatever other system you end up using in the future. You might even learn something more than starting with Debian or such, because a true short stack only has what you intentionally put there and plan on using—which is also a better security model, scales better, and installs on a wider variety of hardware than kitchen-sink distros.
Pretty much any modern Mac, Windows or desktop Linux system with about 60MB free on the hard drive will do. I’m still working out problems from 64Bit Linux desktops, and will put the full list of tested OSes and versions here at some point in the future. But since it’s only a ~18MB download that inflates fully out to only about 60MB after the Python, vim and git server build, and no install is required on your host system, why not just download it and give it a try?
- A lot of firewalls break Levinux’s initial run and server-build. If you get a login and not a menu, it’s likely a firewall issue. Stop trying! Run Levinux somewhere else, if you’re determined.
- Many things like Google AppEngine host conflicting websites on port 8888.
- It’s tricky to zip the file so it decompresses with proper permissions for all OS host platforms.
- Some Linux distros refuse to run .sh files with a double-click regardless of permissions.
Frequently Asked Questions (FAQ)
Revision History (View files)
Current version: Beta 2.4
- Attempted to make the Mac binary more broadly compatible. Tested on 10.8.5
- Mac QEMU compiled in Homebrew again. QEMU version 2.0.0.
- Removed 64 Bit Linux files for simplification of testing. 32 Bit runs on 64 Bit systems.
- Mac QEMU (version 1.6.1) now being compiled from source via Homebrew
- A lot of .dylib files added for new Mac dependencies (until I solve Homebrew static linking issues)
- Radical altering of start script for Mac version to use text-only curses mode and eliminate pointer grabbing
- 64 Bit Linux QEMU now being compiled from source (now in parity with 32 bit version)
- Moved keymap files out of subfolder so Mac qemu binary could find them.
- Added efi-1100.rom for Mac qemu binary dependency.
- Changes in this version will only be visible to 32-bit Linux users
- Ubuntu users MUST now click “Run in Terminal” after double-clicking Levinux.
- Big step towards using updated qemu binaries, but only on 32-bit Linux
- Replaced qemu-system-i386 with a static compiled curses enabled version
- This should eliminate pointer-grabbing on 32-bit Linux
- This is a prelude to doing it across all platforms: Windows, Mac and 64-Bit Linux
- This is also a prelude to formal GPL compliance
- Broke Webapp2 out into optional Libraries menu
- Added color coding to Libraries menu to show what’s been installed
- Added support for OpenSUSE 12.3 64-bit
- Added the requests object for Python, because it is the right thing to do.
- Added webapp2 framework to make it similar webdev to Google App Engine.
- Made entire /usr/local/lib/python2.7/site-packages directory persistent after every time “filetool.sh” -b is run. This makes pip package installation and persistence MUCH easier under Levinux.
- Added libSDL-1.2.so.0 for Ubuntu 13.04 64 bit compatibility
- Added a menu for easily adding common client libraries, starting with Google core APIs
- Made pip persistent.
- Added missing libraries for some 32-bit Linux systems.
- Updated the README.txt based on user feedback.
- Using an appended path for LD_LIBRARY_PATH for 64-bit Linux.
- Corrected issues with Ubuntu 64-bit Linux
- Replaced qemu Linux binary with qemu-system-i386 and qemu-system-x86_64
- Changed Linux launch script to auto-sense 32 or 64 bit and use correct binary.
- Added tce-load -wi python-distribute to Python.sh
- Added sudo easy_install pip to Python.sh
- Added entries to .filetool.lst to make pip persistent
- Added pxe-rtl8139.bin and vapic.bin to MacOS folder per net feedback
- Set the stage for a git video tutorial
- Added curl and expat2 requirements for git when Python server builds
- Added “export GIT_SSL_NO_VERIFY=true” to .ashrc for git pushing
- Greatly enhanced tutorials at localhost:8080
- Added bottle.py Python Web framework
- Opened port 8888 for Python web development work
- Added menu option #4 for installing Python, vim & git
- Expanded Reset scripts to clean up Dropbox collision files
Planned longer term improvements
- Eliminate use of SDL library. Replace with ncurses and pdcurses.
- Get rid of “flashing” problem in Linux
- Get rid of pointer-grabbing
- Find or compile the “perfect” binary for each platform (older qemu’s?)
- Find or compile the “perfect” Linux kernel (less hardware support)
- Compile & submit my own optimized Tiny Core Linux extensions
- Get rid of XLibs and other graphics related overhead
Call For Help: QEMU & Linux Kernel Gurus
I need QEMU compiled with barebones hardware support and ncurses/pdcurses support. The binaries should be as small as possible, with as few dependencies as possible—which means probably not the latest version of QEMU. So, I need to choose the ideal QEMU version, and strip out as many of the hardware support options as possible, for Linux, Mac and Windows platforms. I also need a similarly minimal Linux kernel. If you’re a QEMU or Linux kernel guru interested in helping with the Levinux project, I want to hear from you (use the contact form on the side).
Minimal Linux Distro Considerations
I chose Tiny Core Linux due its all-in-RAM embedded Linux philosophy along with its decent software repository system, but I am always keeping my options open, looking for better cloud compatibility. Here are some versions I’m keeping tabs on:
- Tiny Core Linux – Chosen due to nearly incorruptible all-in-RAM embedded OS philosophy.
- TTYLinux – Installs on Amazon EC2 and uses the more standard pacman package manager. Very strong contender.
- Slitaz – Seems more popular and “user friendly” than Tiny Core.
- Aboriginal Linux – Aboriginal Linux is a shell script that builds the smallest/simplest linux system capable of rebuilding itself from source code.
This forum contains 64 topics and 184 replies, and was last updated by Dave Amata 3 months, 2 weeks ago.