Intro to Linux Admin – an aside

Simon,

I realise you were probably joking but I wouldn’t show some, possibly reluctant, linux learners a terminal that is green text on a black background.

From my experience these are some of the typical fears the non-Unix people have when first approaching Linux;

  • It will be complicated and hazadous to install dual boot with their windows system
  • It will be like their stereotype of a Unix system – often this conjours up pictures of green on black terminals, cryptic commands, and lots of frustration
  • Confusion about where they are in the system – they don’ t have a clear picture of the architecture of the system. Things like Bash, X, and Gnome are all weird (because on the systems they come from these things are all mushed together in one, so you don’t have to think about them).

To that end I use a (Ubuntu) live CD to start the course – this demos a safe, if slow, way to play with Linux without messing with your existing system. I leave the terminal with the default black text on white background – I noticed years ago people just seemed less fearful of it, perhaps unconciously fed by Hollywood (think Hackers, Matrix, etc), compared to the green on black / transparent that I used to use.

I also start with non-admin type things like, browse the web, browse file system, create a document. This shows that on a simple usage level this isn’t some cryptic ‘only the wizards can use it’ system; for example I had one person on the course who thought that the only way to create a simple doc was to use LaTeX or Troff, because they last time he’d looked at Unix, 10 years ago that’s all there was.

Finally I have my own architecture diagram which I’ve been using for years

linux architecture

At the bottom is the hardware, drawn as spikey and irregular, since all hardware is different; different CPU, different GPU, different network cards, etc. The job of the kernel is to smooth out this irregularity and provide a unified interface to the rest of the system (as far as I think about it, that is the job of a kernel on any operating system).

Above that is the command line or shell – now I’m slightly fudging things here but to help people understand I’d say that is what makes up a simple console based system. On top of that the layers of X, and a windows manager was all we had in Linux / Unix world until KDE and Gnome arrived. Of course these days the top layer (desktop) subsumes the window manager layer.

The key thing to point out is that the architecture is such is that each layer has multiple implementations (a blessing and a curse) – the kernel could be Linux, FreeBSD, Solaris, etc, the shell could be Bash, Zsh, tcsh, etc, X Windows, could be Xorg, or one of the proprietary X servers, an the the final two layers have a huge diversity.

On our two day FastTrack, at the end of the second day, once I’ve people a little comfortable, I build up the GUI layer for them. So I start a new bare instance of X (Ctrl-Alt-F1 and login to a VT);


X :1

then Ctrl-Alt-F2 login and then start Firefox or Gedit


export DISPLAY=:1
firefox &
gedit &

Then Ctrl-Alt-F8 to the new X – this shows just a bare X with no window management. No window resize, minimize, or layering. Then I Ctrl-Alt-F2 and start a window manager


icewm

Ctrl-Alt-F8 and now shows what a simple window manager does. You can then Ctrl-Alt-F2 again, and then Ctrl-C the window manager, and then either start another wm (e.g. windowmaker) to show how different it could be (i.e. how all policy is in the window manager not X) or start a desktop session, e.g.


gnome-session

and then can see the full desktop (just don’t be logged in at VT7, as Gnome doesn’t like being logged in twice). People’s eyes really start to light up during this – either thinking of the possibilites, or just a whole new level of fear.

Feel free to re-use any of this (it’s all Attribution-NonCommercial-ShareAlike) or push back if you think there’s a better way.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s