Feb 17 2011

A Beginner’s Guide to Learning Linux Part I: What is The Shell?

What is the shell, anyway?  Wikipedia has this to say:   A Unix shell is a command-line interpreter or shell that provides a traditional user interface for the Unix operating system and for Unix-like systems.

Ok, so what’s that mean again?  Well, like any operating system, the “shell” refers to the interface with which the user can interact with the system.  On Windows, it’s known as “Explorer” and don’t we all love the chaos that ensues when it crashes, right?  The beauty of the Unix shell is that it is a user program over top the OS, like any other program.  This allows you spawn any number of instances of the shell, allows you to end/restart it and such with little impact on your running system.   The beauty of this form is that it allows anyone to program their own shell – and many have.  There have been numerous variants over the years, with different people choosing their preferred shell.  It’s a little too soon to get into that, so lets just stick with generic stuff for now.

As a user, the Unix shell is your doorway into the system.  You use it to help maintain it, obviously, but you also use it to navigate your way around the system, as well as to start other programs.  The better word for the shell is that it is an interpreter.  It is your interpreter.  The essentials of the shell are pretty basic.  It is a running process in the user space, and so it is not part of the kernel, but it is what allows you to work in the kernel, whether accessing the disk and creating/editing files, or other tasks that require interaction with the kernel.  Whether you are accessing the system directly, via the local console/terminal, or remotely, once authenticated, the first order of business is to start your choice of shell.

The main thing to know about the shell is that it allows you to execute programs, and also pipe programs back to back, which gives you immense flexibility.  You can execute a program then suspend it, or have it run in the background, and you can then keep working in the same shell and continue to do other things.  It is able to multi-task, and has been since the late 60’s.  Dos couldn’t do that… in the 90’s.  Yet, it’s so simple.  All it is, is a simple text terminal with nothing but a prompt – yet, as you’ll learn, it can do so much.

Now that we’ve gone through a quick primer, let’s go to Part II – Getting Help.

Jan 23 2011

Tomboy Notes – a Real Digital Replacement for Notepad and Pencil

I want to just throw out a quick word on Tomboy.  Tomboy notes has evolved nicely over the last couple of years, and is probably the first tool I use after setting up a fresh Ubuntu system.  It’s an essential part of my PIM system, as well as crucial to my implementation of GTD.

Read the rest of this entry »

Jan 23 2011

How to setup SSH key authentication (passwordless auth)

Hi folks,

This is a quick post to show you the commands you need for setting up SSH keys for easy-peasy, yet very secure authentication between yourself and a Linux/Unix server.  This is fairly straightforward and should be doable by anyone.  Once done, you get added security (provided you turn off password auth on the sshd), and convenience.  It also lets you worry tons less about those pesky script monkies with their ssh dictionary attack botnets.

We’ll start with what you need to do on the client.  You simply need to run ssh-keygen -t rsa.  This creates an id_rsa and id_rsa.pub file in your /$HOME/.ssh folder.   Then you copy the id_rsa.pub to your server, or paste it’s contents into /$HOME/.ssh/authorized_keys.  Then make sure you give that file restrictive permissions, and that’s it, you’re done.

On my ubuntu desktop, it has a key/password management utility built into it such that I enter my password once, and the n move on. until I log out.  Otherwise, you still need to enter the password each time you login using this key.  Granted that password is optional, but I think if you’re looking for ultimate convenience, you’re best off using the utility I mentioned within Ubuntu (or some equivalent) or you can lookinto ssh-agent.

Jan 22 2011

Using the Linux/Unix shell more Effectively (Part III)

I mentioned in Part II that I was going to dive into a few more useful CLI commands.  Here now are some more useful tools that can enable you to do more with the shell.  I use these less often, however they are extremely helpful when manipulating text files, particularly those with any form of field (or column) concept in them.  Obvious examples are .csv files, where columns are delimited by commas, or mysql query output redirected to a file, where depending on how it was sent to file, the delimiter is whitespace, or whitespace and |’s.  Less obvious examples are log files (columns for parts of date, service or pid etc…) and config files. Read the rest of this entry »

Jan 14 2011

Using the Linux/Unix shell more Effectively (Part II)

In Part I, I covered some basics that help with working on the CLI and enabling you to keep things going after you close the shell.  Now let’s move on to some other useful tidbits that i’ve found immensely helpful when troubleshooting and manipulating text files (like logs) to find relevant information for whatever I was trying to solve.

Read the rest of this entry »

Jan 09 2011

Using the Linux/Unix shell more effectively (part I)

I notice that alot of casual unix/linux users simply underestimate the power of the command line for getting things done.  Depending on the disto of linux, or BSD you’re using, you may or may not have these already, but you’ll almost certainly be able to install them.

First some context now, to explain why I started doing this.  I’m an avid shell user.  I think that it has powerful tools that allow you to bring a measure of efficiency to your work that you simply can’t match with other tools.   One of my colleagues at Coradiant isn’t a linux user… yet. He’s stuck working next to me though, and that’s slowly changing. He’s got a ton of knowledge on internet technologies, he just was comfortable working with GUI environments, and never had a need to go to linux until recently, when he started experimenting with virtualization.

Read the rest of this entry »

Jan 02 2011

My mother has her own blog too now!

quick note to point out that I’ve setup wordpress 3.0.4 in a seperate instance for my mom!  Yes, my mother, whom i’ve converted to ubuntu from winxp, and who liked it so much that she wanted it installed on her new dell laptop last summer (which had win7) now has her own blogsite.  She plans on retiring in the coming year and working from home.   The company name is the current blog, but I’ll need to come up with something more convincing.

Oct 16 2010

Post number one!

Yay. Finally started blogging. Mostly to prove that I’m a competent IT professional. I’ll also make an ass of myself now and then.