GNU/Linux Commands

These days, with a GNU/Linux distribution like Ubuntu, you can do almost everything without ever needing to use a command line interface.

However, if you really want a fast way to work on your computer to change configurations, install software, or work remotely on another computer, then  the command line is the most efficient way to do it. Many people get scared of the command line interface (CLI) as they are used to using graphical user interfaces (GUI). If you haven't used a CLI before it can be a bit daunting but actually, with practice you may very well find it easier and come to prefer it over using a GUI.

The only key really is to take it slowly, and practice what you have learnt. Don't try and remember everything, just use it what you know and extend it as necessary. It will all come with time.

GNU/Linux Commands

The command line is the most powerful method of interacting with GNU/Linux, however if you are not used to it the learning path can be steep. The best strategy is just to start using some basic commands. Don't attempt to do all your work from the command line straight away. Learn a few commands, use them and add to your understanding of what they can do over time. Then you can slowly extend your vocabulary of commands as you need to. Below are some basic commands that you could try starting with.

Don't try and learn all of them at once. Just choose a few and practice them.

  • man
  • ls
  • cd
  • mkdir
  • mv
  • rm
  • locate / slocate
  • ping
  • cp
  • pwd
  • tab

And some others that would be good to know:

  • ldconfig
  • updatedb
  • ./configure
  • make
  • make install
  • tar
  • more
  • whereis

So, lets have a look at each. Feel free to experiment with these commands. Be a little careful as it is possible to do some damage to your files, folder,s and even the operating system if you are too casual. If there is a possibility one of the commands can accidentally create havoc then I will make a note to warn you. So try some of these out in a terminal:

man

By entering man into the command line, you will execute the man program. This program allows you to read the manual or help page for a given program or command. To use it, you generally type man followed by a space, and then the name of another command or program. For example, typing:
man ls
The above will give you a terminal window filled with information about the ls command. At first the format of manuals might be a little confusing, however, once you get the hang of it, you can expect to find similar format or layout for almost all GNU/Linux manuals. The part you need to be interested in most is the description of the command (i.e., what it does). To scroll down the manual page press your space bar, and to quit the man page press the q key. 

Try some man commands and then read about the other commands I have listed above. There is also another help system that works the same way, but instead of typing man you type info and the command like so:

info ls
Almost all of the GNU programs and utilities have longer and more in-depth info pages than they do man pages.

ls

the ls command is the 'list' command. You can use this to list the contents of any directory you are in. Try typing this command in a terminal window and see what you get. Now, one feature of GNU/Linux commands is that you can add various parameters to them. This is quite a simple thing to do, and refines the way you use the command. Usually these parameters are added to the command by typing a ' - ' directly after the command and then the parameter names or abbreviations. For example if I type the following:
ls -l

Then I am passing the l parameter to the ls command. The l parameter is short for 'long list' and refers to a type of format that the ls information should be displayed in. This format gives more information than just typing the ls command by itself... Try the two out and compare the difference.

You might well ask 'how do I know what the parameters are for each command?' This information can be found in the man pages for each command and accessing these is easy (see above).

For the ls command I suggest you get familiar with the formats using ls by itself, as well as ls -al, and ls -l

cd

cd is the most common command used to navigate the file-system on your computer. cd stands for Change Directory. Try it out by typing ls to get a list of all the files and folders in the directory you are currently in. Now try typing ls followed by the name of one of the files in the list, for example if there was a file called 'me.txt' I could type:

cd me.txt
This will give an error! Why? Because you can't change to a directory if it is a file. It's good to try this so that you understand that you can't do any damage by making a mistake with cd. To change to a directory you type cd followed by the name of a directory you want to navigate to. If there was a directory called src listed when we tried the ls command, we would type:
cd src

If that was successful then the terminal won't throw up an error. Try it with a real directory on your computer. If you fail it will be because either you don't have permissions to enter the directory, you misspelled the directory name, or the directory simply doesn't exist.

Now, a word about GNU/Linux file-systems. Generally, if the system has been set up nicely for you, you will be working in your home directory. This is normally located in a set place in GNU/Linux. To find your home directory first type the following:

cd /
This will place you in the top directory on your computer's file-system.

If you now type ls this will show the list of directories on your computer at the top-most level of the file structure.

There are some important directories here, but you need to be most concerned with the one named home. To change to this directory we can use the cd command we learned earlier:

cd home

Now if you type ls you will be shown a list of more directories, and hopefully one that is the same as your username. This is your home directory. Now, we have been navigating to this using relative positioning, that is -- if I am in the top directory and I type cd home then I will be placed in the home directory where all the user's individual home directories are kept.

If I was somewhere else on the file system and I typed cd home I would get an error. If you need to, you can use absolute paths to the directory you wish to get to. As an example if I was in some dark corner of my file-system and I need to get quickly to the home directory I would type:

cd /home
If I needed to get to a directory under the home directory (let's say I have a directory in there called adam), I would type:
cd /home/adam

mkdir

This is the command you used to create a directory and is short for Make Directory. To use this, simply type the name of the directory you want to create after the mkdir command as so:
mkdir bleep
The above command will create a directory in the current directory I am in called bleep. If a directory with this name already existed, I will get an error and the computer won't overwrite the existing directory. Try creating some directories.

pwd

If you get lost and don't know where you are in the file-system you can always type pwd and it will tell you where you are. This command gives you the location path or absolute path to where you are. For example, if I am in my adam home directory, the output of the pwd command will be:
/home/adam
Experiment with changing directories with cd then typing pwd to see where you are.

mv

This command is short for Move. It is as it sounds in that mv allows you to move files around on the file-system. This command is like the 'cut' and 'paste' actions from Mac and Windows rolled into one. To use mv you must first type the command, followed by the file you want to move (in absolute paths or relative paths including the filename) and then the place where you want to move the file to (in absolute or relative paths). For example, if I wanted to move a file "me.txt" from my current directory to the "/usr/bin" directory I would type the following:

mv me.txt /usr/bin
Note: I don't have to type the filename in the path name where I want to move the file unless I also wish to change the name of the file. If for example while I was moving 'me.txt' I wanted to change the filename to "you.txt" I would type:

mv me.txt /usr/bin/you.txt
If I just wanted to rename the file and not move it I could use mv to rename the file without moving it by typing this:
mv me.txt you.txt
Note that when you use mv you are moving the file not copying it, so the original will be moved and won't exist in the same place you moved it from. Now, also be a bit careful because you can overwrite files accidentally, if for example I moved one file to a directory with a file of the same name, then the file I am moving will overwrite that file. Then you could be in trouble... so just be a wee bit careful.

rm

On the other hand, here is a command you should be very careful about using. rm is short for Remove, and is the command you use if you wish to delete a file or directory (and its contents). To use this command type rm followed by the name of the file you wish to destroy for good. To remove a directory you can use the same command with the parameter -R like so:
rm -R directoryname

Where directoryname is of course the name of the directory you wish to remove. You can also use rmdir for this which (you guessed it) is short for remove directory. Be EXTREMELY careful when using these commands, if used unwisely it could be the end of your operating system.

locate / slocate

These commands help you find files on your file-system. The location of all files on your system are stored in a database which is updated periodically by using the updatedb command. To find a file simply type either locate or slocate (depending which is installed on your computer), followed by part of the name of the file or directory you are looking for. For example if I am looking for the file "icecast.conf" I would type:
slocate icecast.conf
If I don't get any reply from typing this it means that either the file doesn't exist on my system or it exists but my database doesn't know where it is. In this later scenario I would type updatedb and try again.

With locate and slocate you can't destroy anything so experiment as much as you like. Sometimes updatedb might take a while to run if you haven't run the command recently or if you have a slow machine, it can also use a lot of CPU power on slow machines so never use it while you are doing something else 'mission critical' on your machine.

You might also like to experiment with whereis and find to look for files on your system.

cp

This is short for copy. Use it like mv , the only difference is that it leaves the original file where it was while also creating a copy.

ping

Not usually included in the top 10 commands you need to know but its handy if you need to know if you are online. ping sends a request to any computer on the net, if that computer gets the request it will respond. Type ping followed by a URL that you know, for example it might be a good idea to try the following:

ping www.cnn.com

If that computer gets the request you will get some information coming back through the terminal... this will keep scrolling so to stop it type ctrl and c and it will halt the ping process.

If you get no response from ping then you are probably offline. However, some machines online don't answer ping requests for security and other reasons, so make sure you really know that the machine you are pinging does reply to ping requests.

Also, some internet connections won't allow ping traffic, for example, while I am writing this I am in an internet cafe in Riga--its a fast connection but I can't ping, this is perhaps because they think only evil hackers use ping so they have some paranoid network security disallowing all sorts of useful things. 

tab

tab is not so much a command as a keystroke--very keyboard has a tab key, and its a very useful thing to have in GNU/Linux. You might have used this keystroke before to indent words in a word processor. You can still do this in GNU/Linux word processors, but when you use tab in the GNU/Linux terminal it becomes such a time saver that when you master it you will be using it all the time.

Essentially the tab keystroke is like an auto-complete. If, for example, I want to move the file 'dsjkdshdsdsjhds_ddsjw22.txt' somewhere with the mv command I can either type out every letter of the stupid filename, or I can type mv (for 'move') followed by the first few letters of the filename and press tab. The rest of the filename will be automagically filled in. If the filename is not filled in it means that there are several files (or directories) that start with those first few letters I typed. To remedy this I could type a few more letters of the filename and press tab again, or to help me out I could press tab twice and it will give me a list of files that start with those letters.

tab is your friend, use it a lot.

Other Commands

At the beginning of this section I said there where a few 'other' commands that might also be good to know, they were:

  • ldconfig
  • updatedb
  • ./configure
  • make
  • make install
  • tar
  • more
  • whereis

I have already talked about some of them, namely whereis and updatedb. The others might be useful if you are installing software.

more

more is use if you want to control the overly verbose output of any command to the terminal. If for example, I am in a directory which contains 1000 files and I type ls the output of the command won't fit nicely into my little terminal window so it will go scrolling past faster than is useful. To slow it down so I can read the output we follow the command with more like so:
ls | more

If I used this in my 1000 file directory I get one page at a time of output and pressing the space-bar shows the next page. Pressing q quits more. Ok, so you might be wondering what the funny straight line is in the above command... well, this is known as the pipe command.

Pipe allows you to combine commands together to control the kind of output you get, usually its used to refine a command (which is what the command parameters also do). So, when you get really fluent with these commands you can write things that look more like equations but are really efficient ways of using standard commands... pipe will be central to enhancing your efficiency.

GNU/Linux File Structure

If you open your terminal and type the following (followed by pressing the 'return' button):
cd /
You will be placed in the top directory of the GNU/Linux file system. If you then type:
ls -al
You will see something similar to this:
sh-2.05b$ ls -al
total 80
drwxr-xr-x  19 root root  4096 Oct  9 13:57 .
drwxr-xr-x  19 root root  4096 Oct  9 13:57 ..
drwxr-xr-x   2 root root  4096 Oct  5 09:31 bin
drwxr-xr-x   3 root root  4096 Oct  9 21:47 boot
drwxr-xr-x   1 root root     0 Jan  1  1970 dev
drwxr-xr-x  71 root root  4096 Oct 15 11:35 etc
drwxr-xr-x   4 root root  4096 Oct  9 19:21 home
drwxr-xr-x   8 root root  4096 Sep 18 23:29 lib
drwx------   2 root root 16384 Sep 18 20:06 lost+found
drwxr-xr-x   9 root root  4096 Oct  9 16:36 mnt
drwxr-xr-x   9 root root  4096 Oct  8 23:20 opt
dr-xr-xr-x  64 root root     0 Oct 15 11:35 proc
drwx------  75 root root  8192 Oct 15 12:35 root
drwxr-xr-x   2 root root  4096 Sep 23 18:58 sbin
drwxr-xr-x   9 root root     0 Oct 15 11:35 sys
drwxrwxrwt  60 root root  4096 Oct 15 12:36 tmp
drwxr-xr-x  17 root root  4096 Oct  5 09:31 usr
drwxr-xr-x  15 root root  4096 Oct  9 13:57 var

The above listing is a fairly standard directory structure for GNU/Linux. Each name on the far right represents a directory, and each directory contains files and directories that are specific to that directory. the lib directory, for example contains code libraries that the software on your system uses. For now you only need to be concerned with one directory: the home directory. This directory contains folders that have names corresponding to each user of the machine. If you log in as "adam" for example then you will be logged into a directory in the "home" directory with the same name as your username (i.e., "adam" in this example).

The important thing to be aware of right now is this GNU/Linux directory structure. The other important thing is that GNU/Linux is mostly comprised of text files, so you can change almost every part of GNU/Linux - how it looks and works - by just editing the appropriate text file. In Windows and Macintosh environments you would usually do these kind of changes through small applications with a graphic user interface (GUI). In Windows, for example, if you want to change the resolution of your display you use the 'display' control panel located in the 'control panels' directory. In GNU/Linux you can do this by editing a text file.

This has some advantages - one is that it gives you a lot more control. But it also has some disadvantages - it can be difficult to learn which files to edit and what to change. Sometimes, to ease the transition to GNU/Linux from other operating systems, you will find there are configuration softwares for GNU/Linux installed on your system that use a GUI (Graphical User Interface) similar to Macintosh and Windows. This is not always the case however, and so eventually you will find yourself doing this manually with a text editor.

Text Editors

If you don't know how to use a text editor in GNU/Linux then you can't really get too far. Reading "README" files and "INSTALL" files will be a necessity quite early on when learning GNU/Linux on the command line. 

Text editors is a topic that many books have been written about. So, how do we cover it here and do it justice... well its tricky. We can at best get a superficial glimpse. We will arbitrarily choose a couple: nano and vim. We will also look at less which is not an editor but is a command that allows you to read files on your system.

less

Lets start with less. This is a command that opens text files for reading only. If, for example, the directory you are currently working in has a file called "README", then try this command:
less README

and you should see something like this in the terminal:


less.jpg

To scroll use the up and down arrows, and to quit just type q

Obviously less is the easiest way to read files but unfortunately its not always installed on GNU/Linux systems, so try less first and if it fails try on of the others below. Remember that less will only allow you to read files. To edit files you will need a text editor or word processor (Sometimes there isn't much difference between the two). nano and vim are text editors which are commonly used by programmers for working on code.

So, first check if these are installed on your system by typing each name in the terminal. I would say you will probably have vim installed, and don't have nano installed (which is a shame because it is a very simple text editor and works well for many basic tasks). If you don't have any of these installed you can try installing them by downloading the source packages, or you can try installing with the package management system that your version of GNU/Linux uses.

If you don't wish to install anything new then maybe try typing the names of some of the other text editors available, but if these are installed you will have to go online and have to research how to use them yourself. Try these in the terminal:

  • vi
  • gvim
  • emacs
  • pico
  • soffice
  • fte
  • vfte
  • gedit
  • glimmer

From the above list the easiest to use if you are familiar with word processors are soffice also known as "Open Office", and gedit

vim

So... lets have a quick look at vim, assuming it is installed when you type vim in the terminal you will see something like this:

vim.jpg 

Incidentally if you have vi installed you will see pretty much the same thing.

To open a file with vim it is best if you type the name of the file you wish to open after the vim command, so that vim opens with the file already loaded. For example if we wanted to read a "README" file in the same directory we are currently working in then just type:

vim README

This will open vim with the README file loaded as so:

vim_muse.jpg 

Now to scroll up and down the file use the up and down arrows on your keyboard. To quit vim type:

:q

There is really a lot to vi or vim, and I don't want to get into it here, but you should really know how to open a file (as above) and then edit a file. To edit a file in vim you need to first open the file, and then type :

i

Now, I am imagining vim is quite a bit different to any text editor you have used before, so perhaps some explanation is needed. vim opens a file initially as a read only file. This means that when you first open the file with vim you are not allowed to change the file. vim has then a whole world of commands you can use to work on the file and most of the commands are executed by just typing a single letter, or they are in the format:

: command

Where 'command' is the name of the command you wish to use. The commands are all designated by shortcuts. An 'i' , for example, is short for 'insert'. The following is a table of vim commands you should know:

command action
i (only used in read-only mode) insert text
:w (only used in read-only mode) write changes to file
u (only used in read-only mode) undo changes
:q (only used in read-only mode) quit vim

In addition, by pressing the "esc'"(escape) key, you will tell vim to return to the original mode (read only). You must actually press escape before you execute any of the commands in vim. For example if I wanted to open the file "README" and then alter some text, I would do the following, starting with typing:

vim README

in the terminal. This will open the "README" file as explained above. Then if I wish to edit the file, I use my arrow keys to navigate to where I want to insert or delete some text. I then press:

i

This will put me in the insertion mode and now anything I type will appear in the document itself. When I have finished making the changes I will then press the "esc" key, and finally to save the changes I press:

:w

This will write the file with the new changes. I then need to quit from vim so I press the escape key followed by :

:q

Now find a file and experiment. If you haven't used something like vim before then it might take some getting used to, so spend some time working out for yourself how vim works before you really need to use it.

nano

nano is a really lightweight handy editor, and its a shame its not used more often. Try typing nano in the terminal followed by the filename of the file you want to open, in this case "README", like so:

nano README

Again, the application opens in the terminal.

nano.jpg

Good if you need to edit material on a remote server. So to scroll you use the up and down arrows, and to quit you use ctrl and x pressed simultaneously. With nano if you need to edit a file then just start typing directly into the terminal window. If you want to save the changes press ctrl and o simultaneously and the file will be saved. Also if you quit nano and changes haven't been saved then nano politely asks you if you would like to save the changes, if you do press y

Installing Software from Source

Well, installing software on GNU/Linux is a broad subject because each version of GNU/Linux has its own package management system. However all types of GNU/Linux allow the user to install software using the source code. However you probably don't want to tackle this process unless you know a little bit about how to use GNU/Linux commands and a little about the GNU/Linux file system. If you don't know about these two then its better to read up on them first and then return here.

tar command

Installing from source works on any GNU/Linux system, so its a good process to know, and it more or less follows this route once you have a source package:

tar zxvf packagename.tar.gz

Where 'packagename' in the example above is the actual name of your package that you wish to install. The tar command followed by the parameters zxvf uncompresses a tar.gz file and creates a new directory with all the extracted sources. Now you must change your working directory to this new directory using the cd command. usually the new directory name is the name of the compressed source package minus the ".tar.gz" suffix. For example, if my package really was called "packagename.tar.gz" then after running the tar zxvf command on it I would be left with a new directory called "packagename" and then I would type cd packagename to enter this new directory. If you are not sure of the name of the newly created package type ls

./configure

Alright... once inside the new directory, we want to start the actual installation process. To do this 99% of the time you will need to type the following:

./configure

Ok, so this isn't really a command. Each installation package usually has a script called "configure". By putting a dot and then a slash before the name of the script (i.e.. "./configure") you are telling GNU/Linux to execute (run) that script. The configure script then does its stuff, checking what kind of machine you have, what you already have installed, what kind of GNU/Linux you are running etc etc etc.

The most common problem that will occur at this stage is that the configure script will halt and tell you that software library that the new software depends on is missing. This can be a pain which is why people invented package management systems. However if you do experience this error then you need to use a search engine to find out what software the error message is talking about and where to get it, then start the installation process again with this new package. I am not kidding when I say that this can sometimes mean an installation can take days while you search and download all the packages you need. 

make

So, lets assume you don't get any errors created by running the configure script... in which case you are lucky and you should thank whatever angel is looking over you...Now... the next command to type in the install process is make like so:

make

This command actually makes ('compiles') the software for you. You will then end up with a whole lot of compiled files which in total makes up your software. The make process can take a while depending on the speed of your machine and the size of the package sources you are installing. Running other applications will also slow down the process.

When make has stopped, type the following:

make install

this will install the newly created software in the correct places in your system. So now you just need to type the name of the application in your terminal window and it should run. If it doesn't run and throws an error, a common remedy is to type ldconfig and then try again. ldconfig updates the system so that your operating system knows there are new library files etc.

Dependencies

Another much loved sub-topic, is dependencies. GNU/Linux developers often don't write an application from zero, they rely heavily on work that has been done previously by other programmers. This is a smart way to go of course because it saves time, and to aid this process many kind hearted individuals have made libraries of code that other programmers can easily access and use within their own programs. These libraries are stored in fixed places in the GNU/Linux file system, usually in the "/lib" directory.

Now, if you install an application that requires certain libraries so it can run, then as long as you have those libraries already installed on your system then no problem... but on the other hand if you don't have the required libraries then you need to find them and install them. This can be easy, if the programmer is nice they will have included information about dependencies in either the "README" or "INSTALL" files that you will find in the source directory of their application. Some extremely nice programmers give you both the name and the URL where you can get the necessary bits.

Usually lazy GNU/Linux users don't bother to read these files so they just go through the standard process and they probably find that the "./configure" script will give an error telling them what libraries are missing. These lazy types (myself included) then find the required bits and pieces online and install them.

However, if you are new to GNU/Linux I suggest that you read the "README" and "INSTALL" files before starting any installation process. It will save you time and heartache.

Just remember that although a dependency list might be long, you simply get all the necessary packages and install them one by one, following the same process as described above, until finally you have everything you need for the program of your dreams to install and run.

Connecting to the Internet

If you start your GNU/Linux computer and perhaps you have opened a browser  and you can't get online then you might have a problem. The easiest way to resolve this is to ask the nearest GNU/Linux guru you know to help you out because there are many things that could be causing the problem. However, before asking the GNU/Linux guru you might want to try this command:
dhcpcd eth0

or alternatively try this:

dhclient eth0

These commands try to make a connection with the internet using your ethernet card. Your ethernet card is usually referenced with an alias, in this case the alias (and this is quite often the alias used) is eth0. If you have more than one device for connecting to the internet then these will be numbered sequentially. For example my wireless connector is identified as eth1. The command requests an IP address (a number unique to your computer that helps you access the internet) for your computer. Using either of the above commands have one of three possible outcomes:

  • it hangs the terminal for a long time without giving a response
For some reason you are not going to be given an IP address, so you should contact your system administrator and ask for help. The most common reason for this error is that you need a dedicated IP address.

  • it returns an error saying the command isn't known
You don't have the command dhcpcd or dhclient installed or you don't have privileges to use that command. In this case you should talk to the GNU/Linux guru or your system administrator.

  • you are successfully given an IP address (unfortunately you won't be given any feedback to say this so you just have to try your browser again to check).

If you get really ambitious, try learning about the command ifconfig. This is also important to GNU/Linux networking but you may wish until you learn a little more about GNU/Linux before reading about this. There is a handy help file on this command, which you can access by typing:

man ifconfig

in the terminal. You may also just try typing

ifconfig

or

ifconfig -a

to get some information on how your machine is presently configured. Be aware that getting online can be complicated, so you may need to ask someone for help, or alternatively try getting online from another machine and using search engines to find a little bit more out about getting GNU/Linux online. 

Cheat Sheet

Sometimes there are just handy things you need to know without understanding the whole world of GNU/Linux:

What version of the linux kernel am I using? (Note: this is specifically the kernel version, not the version of your distribution or any of the other programs you are running). 
type this in the terminal:

dmesg | grep Linux

How do I set a static IP address for my ethernet card?
The best way to learn how to do such things is to read the manual for ifconfig (man ifconfig), but the short answer is something like this:

ifconfig eth0 IP1 netmask IP2
route add default gw IP3

Where you replace the values IP1, IP2, and IP3 above, where IP1 is the static IP address, IP2 is the netmask (usually 255.255.255.0), and IP3 is the gateway IP address

What version of this software am I using?
sometime you can type a -v or --version after the application name in the terminal. For example if you want to know what version of MuSE you have installed, type:

muse -v

What username am I logged in as?
So, you want to know who you are, merely type:

whoami

What command do I use to change file permissions?

This is some serious business. You'll want to read the manual for the programm called chmod that controls file permissions. Run man chmod. 

what command do I use to mount external drives

External drives, USB keys, network filesystems, and other devices and drives will usually be recognized by your computer when you plug them in. However, if for some reason they do not, or you want to take matters into your own hand, you can use the mount command.  We suggest reading carefully the manual for mount (type 'man mount'). 

How do I shutdown my computer
Try either of these two options:

halt

shutdown now

my computer has started in GNU/Linux but I just see a big terminal window and its kinda scary looking
you haven't logged in... log in with your username and password, if you log in and don't see some fancy GUI then type :

startx

or

gdm

What do I do if I have accidentally deleted an important file using 'rm'
Promise yourself you will never ever do that again, back everything up and never logon as root.

If I have logged in under a username but i want to do something as the root user, how can I do that?
Use the commands su or sudo. Check the manual pages.

What time is it?
Try typing date in the command line

What month is it?
Try typing cal into the terminal

What modules are loaded?
Try typing lsmod

What system processes, software, etc., is running on my computer.
Try the ps command

I think someone knows my login password, how do I change it?
Try this command (or looking this command up in the man pages):

passwd

License

All chapters copyright of the authors (see below). Unless otherwise stated all chapters in this manual licensed with GNU General Public License version 2

This documentation is free documentation; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This documentation is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this documentation; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

Authors

CHEAT SHEET
© adam hyde 2006, 2007, 2008
Modifications:
Joshua Gay 2008
Rolf Kleef 2007
Thomas Middleton 2008

BASIC COMMANDS
© adam hyde 2006, 2007, 2008
Modifications:
Joshua Gay 2008
Thomas Middleton 2008

CONNECTING
© adam hyde 2006, 2007, 2008
Modifications:
Joshua Gay 2008
Thomas Middleton 2008

FILE STRUCTURE
© adam hyde 2006, 2007, 2008
Modifications:
Joshua Gay 2008
Thomas Middleton 2008

INSTALLING SOFTWARE
© adam hyde 2006, 2007, 2008
Modifications:
Joshua Gay 2008
Thomas Middleton 2008

TEXT EDITING
© adam hyde 2006, 2007, 2008
Modifications:
Joshua Gay 2008
Thomas Middleton 2008

CREDITS
© adam hyde 2007, 2008
INTRODUCTION
© adam hyde 2007, 2008
Modifications:
Flosstest Two 2007
Joshua Gay 2008
Thomas Middleton 2008

 

100.gif

Free manuals for free software

 

 

General Public License

Version 2, June 1991

Copyright (C) 1989, 1991 Free Software Foundation, Inc.
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA

Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.

Preamble

The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Lesser General Public License instead.) You can apply it to your programs, too.

When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things.

To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it.

For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights.

We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software.

Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations.

Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all.

The precise terms and conditions for copying, distribution and modification follow.

TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION

0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you".

Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does.

1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program.

You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee.

2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions:


a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change.


b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License.

c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.)

These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it.

Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program.

In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License.

3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following:


a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or,


b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or,

c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.)

The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable.

If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code.

4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance.

5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it.

6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License.

7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program.

If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances.

It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice.

This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License.

8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License.

9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.

Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation.

10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally.

NO WARRANTY

11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.

12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

END OF TERMS AND CONDITIONS