Thursday, March 8, 2012

A look around

Today I thought I would just have a little fun and give a look around my working area.

First off, my main machine, running Trisquel 5 GNU/Linux.

As Han Solo would say,"She may not look like much, but she's got it where it counts, kid. I've made a lot of special modifications myself."

And here is my server.

Yes, that's a crt monitor. Only gets used when I have to do maintainence.

Some of my geek toys:

And finally, a selection from my library:

Friday, April 15, 2011

The four freedoms of Free Software.

This post is all about explaining what the four freedoms are, as given by Richard Stallman and the Free Software Foundation. I think this is another area that sometimes gets glossed over or ignored altogether, so I thought I would sum them up here.

Part of the problem is that so many people hear the free, and equate it with price. And it is true that Free and Open Source software is often available at little or no cost, so that's not a bad thing, but it's not the primary point either. Free Software is software that respects the user's right to do what they want and need with their computer.

Briefly, the four freedoms are:

0. The right to use the software in any manner you wish, without restrictions.

1. The right to distribute the software to as many others as you wish, without penalty.

2. The right to modify the source code, or have the source code modified, to make the program function as you need it to.

3. The right to distribute your modified copies of the program so that everyone benefits from the improvements.

I realize I started counting at zero. That is a common programming convention in numbering things and is also the way the four freedoms are most often represented, so I stuck with it.

Any software that is distributed under a GNU or GNU compatible license gives you these freedoms, as well as the source code of the program in question, or access to the source code if you want it.

Now I realize that freedoms 2 and 3 don't mean as much to end-users as to programmers, but it can be good for businesses, who can hire programmers to modify almost suitable software to be just right. It's also great for hobby programmers like myself who can study and learn and play with real world code, and not just examples from books.

Freedoms 0 and 1, however, are much more applicable to end users. What they mean is that you can be free of the licensing restrictions that govern use and installation of proprietary software. It also means that you can LEGALLY copy and share your copies of Free Software with however many people you wish. Not only can you, but you are encouraged to do so.

So, in a nutshell, that's it. Freedom that isn't just about price, but actual freedom.

Tuesday, April 12, 2011

Understanding partitions and mount points.

Partitions and mount points are fairly easy to understand under Linux once you know how it handles them.

Unlike Windows, which uses drive letters, Linux using a partition numbering scheme and mount points to represent the file system.

ATA IDE drives, whether hard drives or cd/dvd drives, are shown as hd*, where * is a letter, starting at a. Thus, the primary IDE hard drive on a Linux machine would be labeled as hda. A second IDE device on that channel, such as a cd-rom or dvd drive would be hdb.

SCSI and SATA hard drives are labeled in a similar manner, but with an s rather than an h. Therefore, a primary SATA or SCSI drive would be sda, and similarly the first partition of that drive would be sda1 and so forth.

Primary and extended partitions are numbered 1-4, and numbers can be skipped, so it is possible to have hda1/sda1 and hda3/sda3 without having hda2/sda2. Logical partitions start at 5, and numbers are never skipped, so if hda7/sda7 exist hda5/sda5 and hda6/sda6 must exist as well.

Mount points are directories/directory structures which are mapped to the hard disk partitions Linux is installed on. For a simple install, generally the root file system, denoted by a simple forward slash (/), is the mount point under which all other directories in the file system are installed. On an install where only one partition is used for the whole system, that whole partition is used as the root filesystem, so that the partition used also becomes the primary mount point for the whole directory structure. This is generally what is done with many simple automatic installers, which will also create a partition for swap space(essentially virtual memory).

Some examples:

1. A computer already installed with Windows on a SATA drive has some unallocated space and the user decides to install Ubuntu Linux, while preserving Windows. The installer will see the Windows partition as sda1 and would leave it alone, instead creating sda3 for Ubuntu itself and sda4 or sda5 for a swap partition. The boot loader would install in such a way that one operating system or the other could be chosen at boot time, creating a dual boot system.

2. The user decides to add a second drive, just for Ubuntu Linux, but still keep Windows, as before. In this case, the installer can be told to use the second drive. Thus it will ignore the first drive, create sdb1 for Linux and likely sdb2 for swap, and then install the boot loader as above, creating a dual boot system with each OS on its own drive.

These examples do perhaps oversimplify things somewhat, since most Linux installers have multiple options and ways of doing things, but I hope it gives you an idea how Linux works in this area, and an understanding of the terminology behind it.

Monday, April 11, 2011

Command line basics.

Now that I've talked a bit about not shying away from the command line, I'd like to actually give a basic command line tutorial.

If you have Linux installed, but have never used the command line, or you are trying it out from a live CD, the first thing to do is open a terminal. How you do this depends on which Desktop you are using.

On Gnome, go to the applications menu in the upper left corner scrren and open it up. Go to Accessories, and when that menu opens, move down and click on Terminal.

KDE is similar, but the menu is in the bottom left corner. Open up the menu and go to the System category. Then select Terminal from that menu.

You will get an open window with a text string and blinking cursor in the upper left corner. This is your command line.

To see which directory you are currently in, type pwd and press enter.
The terminal will display the current directory path, which is generally /home/"username", but this may differ if running from a live cd, but in either case, it will tell you which directory you are currently in.

Typing ls and pressing enter will show you the files and sub-directories in the current directory.

To change directories, use the cd command along with the directory you want to change to.
As an example, to change to the root directory, type cd /.

If you enter an ls command here, you will see the basic directory structure of the whole filesystem.

To get back to your home directory. type cd ~.

By now you probably have alot of text in your terminal, so to get rid of it type clear and press enter. All the text will disappear and the prompt will be placed back in the upper left corner.

To exit the terminal, either close the window or enter the word exit and hit enter. In either case, the terminal window will close.

Those are very simple and harmless commands that will get you used to using the command line and getting around a Linux system a little.

There is alot more to the command line, but that should give you a feel for it. Later lessons will likely involve more interaction with the command line.

Saturday, April 9, 2011

Fear not the command line!

With most modern Desktop based distributions of Linux, there is little need to use the command line for most day to day tasks.

However,there are reasons why the command line continues to be popular in Linux, and therefore I feel it is worth learning to use it, at least at a basic level.

The command line is one thing all distributions have in common, and it tends to work the same, regardless of what Desktop environment is running on top of it. Therefore, it is considered a universal solution when most users give advice about getting something done in a way that should work for all distributions. GUI configuration tools can vary from one distro to another, but the command line stays the same.

Also, a person who knows Linux commands and knows exactly what they need to do can often get it done faster by using the command line rather than sorting through GUI menus and dialog boxes.

Lastly, if your interest is in using Linux as a server of some type, many distributions that are installed with the server option install with only a command line interface, or with a minimal GUI, and therefore, learning the command line is essential to being able to properly administer such a system.

Learning the command line well does take some patience, but it is another one of those aspects of Linux where I really do feel it pays off in the end. However, if you really have no interest in a text based approach, the Desktop GUI tools are generally sufficient for most desktop users.

Thursday, April 7, 2011

Linux and GNU

Linux and the GNU Project.

When discussing the history of Linux, it is often attributed to Linus Torvalds, the Finnish student who began writing the Linux kernel in 1991. Certainly, the kernel is a key component, without which the operating system would be useless. However, there is more to the story than Linus alone.

Back in the early days of computing, most programmers wrote,shared, and improved each others programs for the benefit of all.

Richard Stallman, who was a programmer at MIT from 1971 to 1983 worked extensively in this environment and continued to believe software should be shared, not closed off and made proprietary. When he left MIT, he started the GNU Project to develop a free clone of the Unix operating system. Freedom, in this case, refers not to price, but to what you are allowed to do with your computer and its software.

In 1991, Linux Torvalds began working on the kernel which came to be known as Linux. He also wanted to produce a Unix like operating system.

At the time when Linus began the his kernel, the GNU Project had most of the other components which would make up a working Unix-like system, but they lacked a suitable kernel. Linus and the people working with him had that kernel.

By putting the Linux kernel together with the GNU libraries and utilities, a working Unix-like system came to be.

Members of the GNU Project and the Free Software Foundation prefer that Linux be referred to as GNU/Linux. Others simply call it Linux, after the kernel.

While I don't intend to go into that debate, I do feel it is important to understand the proper history of Linux and the contributions of both Linus Torvalds and the GNU Project. Take away the contributions of either, and there would be no Linux as an operating system.

More information on the GNU Project can be found at The GNU Project for those interested.

Monday, April 4, 2011

Choosing a Distribution

Today's topic is choosing a distribution.

If you are new to Linux, the choice of distributions can seem overwhelming, but there are only a handful which are widely popular, and only a few of those that are geared towards new users. Many of the rest are special purpose or more suitable for advanced users.

Here is a brief list of the most popular new user distributions:

1. Ubuntu: Ubuntu has been designed with new users and Desktop use in mind. It is an easy to understand and use distribution.

2. Linux Mint: Mint is currently based on Ubuntu and it has been created to be even more user friendly and ready to go after the initial install. An excellent choice for those new to Linux.

3. Mandriva: Mandriva is a popular and good distribution also aimed at Desktop user. I used its predecessor, Mandrake Linux for several years.

4. Fedora: Fedora is the community version of Red Hat Linux. It is a good Desktop choice, but may not be as user friendly out of the box as the others, although it really doesn't take much to learn it.

Once you have decided on a distribution, the only other big choice is which Desktop environment to use. The two most widely used are Gnome and KDE.

Gnome is more similar to a Mac interface and is generally simple, but it is somewhat different from the standard Windows look and feel.

KDE is usually the Desktop chosen by those who favor a more Windows like system, as it places things more as Windows does.

Most distributions come with options for obtaining either a Gnome or KDE version of that distribution, plus either can be added to a system with the other if desired.

Keep in mind that each distribution has its own package management system for updates and software installations, and it is generally wise to stay within using that system, at least until you are more experienced in using and managing Linux.