Novell Home

Linux Newbie HowTos: Learning to use Linux at Home and Work

Novell Cool Solutions: Feature
By Stomfi

Digg This - Slashdot This

Posted: 1 Oct 2004
 

StomfiPlease welcome our new Cool Solutions columnist, Tom Russell (aka Stomfi). A Linux trainer/educator in Australia, Stomfi will be producing a series of articles exclusively for Cool Solutions aimed at showing Linux newbies how to use the Linux shell tools (sometimes with an easy windowing interface builder from Runtime Revolution) to perform various office, factory and home tasks, to use some of the "other" applications, and to utilise hardware for function-specific computing tasks.

The articles will explain clearly and simply how to perform all the steps to achieve the tasks at hand, including working examples of scripts, required mouse activity, text inserts and deletions, explanatory material, and where to discover further documentation.

About the Author

Stomfi has been associated with computing and electronics for quite a few years. A keen interest in robotics and electronics saw him involved in kinetic sculpture and early micro computing which culminated his first real computer which ran UNIX in a terminal. He was fortunate to use a Sun 3 technical workstation, which had a full windowing system just like today's offerings.

Stomfi has spent many years developing shell applications and teaching computer end users how to use the shell and computing for their own benefit. He doesn't think much of Microsoft Windows as he finds it boring and unfriendly, preferring the humour, ease of use and friendship of the GNU/Linux environment. Lately Stomfi runs the educational arm of ComputerBank Queensland, a not-for-profit organization which refurbishes used PCs with Linux and donates them to the digital divide. www.cbq.org.au

Learning Linux

Linux is all powerful but not at all difficult to learn and use. It is based on UNIX from Bell Laboratories, where clerical staff used a non windowing interface using simple UNIX shell tools to write and print reports and save office information and data, amongst other clerical functions, and where science staff used shell mathematical and charting tools to manipulate and present information about the performance of the telephone network as well as basic research into things like transistors.

So if office clerks in the early 70s could learn and use it, there is nothing to prevent us better educated 21st century home, factory and office workers using Linux to implement, perform and even automate our own functions and tasks.

Learning your own way

Learn your own way of doing things by looking up the manuals and documentation that come with Linux.

Anytime you see something like:

"Type"
"$ mkdir bin"

$ is the end character of a Linux terminal shell prompt and mkdir is a Linux shell command.

You can find the manual page like this:

Type after the $ prompt
$ man mkdir
and exit the page by pressing the "q" key.

or the info page like this:

Type
$ info mkdir
and exit the page by pressing the "q" key.

(Tip: Info is a bit more complex to use than man but is often more up to date.)

Series Prerequisites, Conventions, Aims and Purposes

This is the stuff Stomfi will assume you know when you read his articles. So don't skip it or you'll be lost from the beginning.

Writing shell programs or scripts as they are called involves the use of a text editor.

Using a text editor is a different experience for many Microsoft Windows users, but if you use a word processor it can include hidden control characters which will prevent the file working as a shell script. For the same reason cutting and pasting from this document may not work.

Many of us pre-Windows users actually had to use a text editor and a text interface (called a command line interface or CLI). My favourite editor is vi, a very powerful editor with a cognitive interaction invented at Berkeley University to make it easy for students to use the computer. There are others which you can use in your Windows screen, like gedit, kedit and kate.

At some stage you will have to make your shell scripts executable. You can do this in a shell terminal with the "chmod +x filename" command or from your file manager in the file properties window. A shell terminal, sometimes called a console, can usually be found in the "system" sub menu or on the "panel".

If you have to type in a command in a shell terminal, the command is shown on a new line directly after the end of the user shell prompt "$ ". All commands are on a continuous line and end with the Enter key, which tells the shell to run or execute what you have just typed. For example:

$ chmod +x myscript.sh

When you type in a long command at the shell terminal it may drop down or wrap to the next line but it will be treated as one line by the shell.

REMEMBER
Each command must be all on one line and will not run until you press the Enter key.

REMEMBER
Linux shell commands are lower case.

Two important things to remember:

  • Each command must be all on one line and will not run until you press the Enter key.
  • Linux shell commands are lower case.

When instructions are given for typing text or a script into a text file or RunRev properties window, the text will usually begin with the word "Type". Begin typing after this word. Text to be typed is usually shown in Bold. Instructions like these or other material that is informative are usually "in bold and sometimes also enclosed in quotes".

Runtime Revolution is used in these HowTos as an easy end-user windowing interface builder that doesn't require any programming knowledge. It is used in these articles to make shell scripts into windowing applications that can be operated using the mouse and normal GUI methods. You can obtain the program from www.runrev.com as an evaluation or purchase.

Three Aims and Purposes of these HowTos

Since the main purpose of these HowTos is to give you confidence in using the shell and Linux, instructions will focus on these aspects.

The second purpose of these HowTos is to show you how to do things in the simplest easiest way, so we are not going to aim for scripts that conform to good programming style, but ones that work in an way understandable to newbies who know nothing about programming. Also for this reason I am going to explain things as they come up in our scripting.

The third purpose is to let you learn your own way of doing things by looking up the manuals and documentation that come with Linux.

For more information about Runtime Revolution visit http://www.novell.com/coolsolutions/feature/1863.html


Novell Cool Solutions (corporate web communities) are produced by WebWise Solutions. www.webwiseone.com

© 2014 Novell