Datasheet

Finding a Terminal
Linux systems, like other UNIX systems, are built upon many different tools and utilities that work
together to get the job done. Although graphical desktop environments have become very popular over
the last few years, it’s still commonplace to perform everyday software source file editing and to drive
software build processes entirely from within a system terminal. You can use a graphical development
environment such as Eclipse, but it’s a good idea to know how to work at the command line.
As you work through this book, most of the example code will include simple commands that you can
use at the command line in order to build the software. You will usually find that a terminal is available
to you via the system menus, or in some cases by right-clicking on your desktop and selecting Open
Terminal from the menu. On Fedora systems, you’ll need to install an extra system package (use the
Software Updater tool in the System Tools menu, under the Applications menu) to have the terminal
option readily available in your desktop menuit’s there by default on OpenSUSE and Ubuntu.
Editing Source Files
Throughout this book, you will find example source code that you can try out and modify for your own
purposes. You’ll find out more about how to build software on Linux systems in subsequent chapters.
You’ll also find many examples that are available from the website accompanying this book, which you
can download in order to avoid typing them in each time. Despite this, you will clearly want to produce
your own programs early on. It is, therefore, recommended that you find a text editor that you feel com-
fortable working with as you develop your Linux software.
Most Linux developers choose to use popular editors such as vim (derived from the ancient UNIX vi
editor) or GNU emacs (Richard Stallman’s original GNU project editor). These work both from the com-
mand line and as graphical applications, depending upon the precise version you have installed. Each
comes with a rich set of features that will enhance your productivity, as well as a set of documentation
and tutorials to help you get up to speed quickly. For those who prefer a graphical editor, the GNOME
and KDE desktops are supplied with several powerful alternatives.
It’s worth noting the tradition of vi and emacs rivalry. Historically, vi and emacs users were mutually
exclusive. Those who use one typically dislike the other with a passion (and other users of the other).
There are few sources of contention more pointless than the editor flame wars started from time to time
by people on mailing lists, but the sheer range of vi vs. emacs T-shirts and other merchandise available
on the Internet should demonstrate the seriousness with which some people take these editor wars. It’s
never a good idea to try to understand precisely why people care so much about this just live with it.
Whatever text editor you choose, don’t try using a word processor such as Open Office writer or abi-
word to edit program source code. While it is technically possible to do so, these tools usually mangle
source and even when editing text files will attempt to embed various rich text formatting that will con-
fuse the build tools you later use to build the software.
11
Chapter 1: Working with Linux
04_776130 ch01.qxp 2/2/07 10:11 PM Page 11