Professor Norm Matloff's Beginner's Guide To Installing and Using Linux
Professor Norm Matloff's Beginner's Guide To Installing and Using Linux
Linux
Norm Matloff
Department of Computer Science
University of California at Davis
[email protected]
c 1999-2013
January 4, 2013
Contents
1 Background Needed 4
2 Install to Where? 4
3 Which Linux Distribution Is Best? 4
4 Installation 4
4.1 The Short Answer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
4.2 Installing Linux to a USB Key or External Hard Drive . . . . . . . . . . . . . . . . . . . . . 5
4.2.1 Installation Method I (for Slax Linux) . . . . . . . . . . . . . . . . . . . . . . . . . 6
4.2.2 Other Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
5 Post-Installation Conguration 6
5.1 Conguring Your Search Path (Why cant I run my a.out?) . . . . . . . . . . . . . . . . . 6
5.2 Conguring a Printer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
5.3 Switching from GNOME/Ubuntu Unity . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
5.4 Conguring KDE/GNOME for Convenient Window Operations . . . . . . . . . . . . . . . 7
6 Some Points on Linux Usage 7
The information contained here is accurate, to the authors knowledge. However, no guarantee is made in this regard.
1
6.0.1 Ubuntu Root Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
6.1 More on Shells/Terminal Windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
6.2 Cut-and-Paste Window Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
6.3 Mounting Other Peripheral Devices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
6.3.1 Mount Points . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
6.3.2 Using USB Devices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
7 Linux Applications Software 9
7.1 GUI Vs. Text-Based . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
7.2 My Favorite Unix/Linux Apps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
7.2.1 Text Editing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
7.2.2 Web Browsing and Java . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
7.2.3 HTML Editing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
7.2.4 Compilers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
7.2.5 Integrated Software Development (IDE) . . . . . . . . . . . . . . . . . . . . . . . . 11
7.2.6 Word Processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
7.2.7 Playing Movies, Music, Etc. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
7.2.8 Video Editing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
7.2.9 Image Viewing, Manipulation and Drawing . . . . . . . . . . . . . . . . . . . . . . 13
7.2.10 FTP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
7.2.11 Statistical Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
7.2.12 Video Chat . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
7.2.13 Runing Windows Applications from Within Linux . . . . . . . . . . . . . . . . . . 14
7.3 Downloading New Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
7.3.1 How to Find It . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
7.3.2 Automatic Download/Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
7.3.3 Debian/Ubuntu .deb Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
7.3.4 Using RPMs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
8 Learning More About Linux 16
9 Advanced Linux Usage 17
9.1 Dual-Boot Issues . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
2
9.2 Live CDs or USB-Key Based Linux As Rescue Tools . . . . . . . . . . . . . . . . . . . . . 17
9.3 Troubleshooting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
9.3.1 Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
9.3.2 WiFi Networking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
9.3.3 General Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
9.3.4 Network Management Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
9.3.5 Individual Linux Network Commands . . . . . . . . . . . . . . . . . . . . . . . . . 20
9.3.6 If You Have a Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
9.3.7 A Program Freezes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
9.3.8 Screen Freezes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
9.4 Accessing Your Windows Files from Linux . . . . . . . . . . . . . . . . . . . . . . . . . . 22
A What Is Linux? 22
B What Is Partitioning? 23
B.1 Partitioning Using GParted . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
3
1 Background Needed
I have tailored the material here to beginners. No special sophistication in computers is needed. Any typical
Microsoft Windows user should be able to understand the instructions here and install Linux in less than an
hours time. (Do not be intimidated by the length of this document; you probably will not have to use most
of it.)
Dont worry about the length of this document. Youll probably only need a small part of it.
For some background on the history and signicance of the Linux operating system, go to Appendix A
2 Install to Where?
I recommend that you install Linux on your hard drive, so that you will dual-boot either your old OS (Ill
assume Windows from now on) or Linux. After installation, each time you boot up, you will be given a
choice of whether to boot Windows or Linux.
Another alternative is to install Linux on a USB key (memory stick) or external hard drive.
Still another choice is to run Linux as a virtual machine. This is not covered in this document, but if you are a
UCDstudent, see http://csifdocs.cs.ucdavis.edu/documentation/archives/csif-fedora-on-a-virtual-machine
for the easy steps.
By the way, if you have a Mac, you may have the capabilities you need without Linux, since both the Mac
OS and Linux are Unix systems.
3 Which Linux Distribution Is Best?
Linux comes in various distributions, called distros by Linux afcionadosbut they are all Linux in terms
of functionality. Some of the most popular are Ubuntu, Red Hat, Fedora, Linux Mint, SuSE, MEPIS,
PCLinuxOS and so on.
Remember, there are tons of good distros out there. Any of the above would be ne, as would many others,
but here is my short answer: Use Ubuntu (or one of the many Ubuntu derivatives, such as Linux Mint). It
is arguably one of the most user-friendly of the distros, and it has a large user community you can access in
the Ubuntu forum on the Web, probably the most active one out there.
I now use Ubuntu myself on my home computers, as well as on my ofce computer, after years of using
various other distros.
If you have an old machine, especially one with limited memory (i.e. RAM), you may wish to give Puppy
Linux or Damn Small Linux a try. I installed them (one at a time) on an old 1998 laptop with only 64M of
memory! And they take as little as 50M of disk space.
4 Installation
Here is the short way to install Linux on your hard drive, dual-booting with Windows.
4
4.1 The Short Answer
Here you will install the Ubuntu distro, using UNetbootin as your installation tool.
1
For simplicity, Ill assume you wish to install Linux to your laptop.
Download UNetbootin fromits home page http://unetbootin.sourceforge.net/ to your
hard drive. (For further informat on UNetbootin, see http://sourceforge.net/apps/trac/
unetbootin/wiki/guide.
Insert a USB key (memory stick). It needs to have FAT32 format. It probably came that way, but if
not then check the Web for how to x that using your OS.
Run UNetbootin.
Click Select Distribution, and choose Ubuntu. Then choose the latest Live version in the window to
the right.
For Type, choose USB Drive, and for Drive, choose the drive in which your USB key is inserted.
Click OK.
After the installation to your USB key nishes, choose Exit.
Leaving your key in the drive, restart your laptop.
Select the choice labeled something like Try Ubuntu.
Once Ubuntu boots up, try to use the WiFi: Click on the proper icon at the top right of the screen,
and select your wireless network. If none appears, then for now, connect your machine to an Ethernet
jack, say at a public library or copy shop.
Follow directions. If asked whether you want third-party software to be installed, say yes.
Reboot (remove the USB key when the screen goes dark).
If WiFi didnt work above, it should work now. You may have to click a pop-up window that asks if
you want to use the proprietary drivers.
During the installation process, there may be some mention of disk partitions. You should not have to take
action, but if you wish to know about partitions (very useful!), see Appendix B.
4.2 Installing Linux to a USB Key or External Hard Drive
You can install Linux to a USB key or external hard drive, and boot up Linux from there whenever you want
to use Linux. (This is not the same as the USB key created from UNetbootin, which is only temporary.)
1
Unfortunately, UNetbootin does not produce Mac-bootable USB keys.
5
4.2.1 Installation Method I (for Slax Linux)
Slax is a nice, colorful and small version of Linux, at http://www.slax.org. Click on Get Slax
to download, and on Read Manuals to see how to install onto a USB key or external hard drive. It is
extremely easy!
In short:
Download the Slax .tar package.
Go to the directory (or folder, in Windows) for your USB key.
Unpack the .tar le from that directory.
Go to the boot subdirectory, and run either bootinst.sh (from Linux) or bootinst.bat (from Windows).
In the Linux case, you may need to precede your command by sudo.
4.2.2 Other Methods
You can use UNetbootin (Section 4.1), but youll need to make your USB installation persistent; see http:
//sourceforge.net/apps/trac/unetbootin/wiki/guide.
There are methods to construct your USB installation by hand from an ISO le. This is complicated, and
will not be pursued here.
5 Post-Installation Conguration
This section describes some further steps I recommend taking after your installation is nished.
5.1 Conguring Your Search Path (Why cant I run my a.out?)
Most Linux distros do not include your current directory, ., in the PATH variable. Thus if for example you
compile a program and then type
a.out
the shell may tell you that a.out is not found. You are expected to explicitly specify the current directory:
./a.out
If you consider this a problem, as I do, to remedy it in the case of the BASH shell (the default shell for most
distros), edit the le /.bash prole In the line which sets PATH, append :. (a colon and a dot) at the end
of the line, with no intervening spaces. Then log out and log in again, or do
source /.bash_profile
6
5.2 Conguring a Printer
Your Linux distribution should have some program to help you congure your printer if something went
wrong during installation. For example, if you are running the GNOME GUI, select System | Administration
| Printing.
Its now easy to connect to a remote printer elsewhere on your network (even if it is on a Windows machine),
using Samba.
5.3 Switching from GNOME/Ubuntu Unity
I personally dont like the Unity window manager in GNOME. Many others feel the same way. So, Ubuntu
gives us other choices. To set them up, do
sudo apt-get install gnome-shell
At your next start, the login screen will show a symbol next to choices of login names; choose Gnome
Classic (No Effects) or whatever you like; experiment to nd one that suits you.
5.4 Conguring KDE/GNOME for Convenient Window Operations
5.4.1 Autoraise Etc.
You should nd that windowing operations are generally easier in Linux systems than in Windows, in the
sense of requiring fewer mouse clicks, if you set things up that way. Personally, I nd it annoying in
Windows that, when I switch from one window to another, I need to click on that second window. In most
Linux windowing systems, I can arrange things so that all I have to do is simply move the mouse to the
second window, without clicking on it. The term for this is focus follows mouse, and we can congure most
Linux windowing systems to do this.
Also when I move from one window to another, I want the second one to come out of hiding and be fully
exposed on the screen. This is called autoraise, and can be congured too.
You can arrange this conguration in less than one minutes time. Again, the exact conguration steps will
vary from GNOME to KDE, and from one version to another within those systems, so I cant give you the
general steps here but here is how it works on GNOME in Ubuntu 12.10 or later:
Open a terminal window (ctrl-alt-t), and type
sudo gsettings set org.gnome.desktop.wm.preferences auto-raise true
sudo gsettings set org.gnome.desktop.wm.preferences focus-mode mouse
Then log out and back in. You only need do this once.
You get check these settings using get instead of set, or use reset to revert to the original values (false and
click), e.g.
sudo gsettings resset org.gnome.desktop.wm.preferences auto-raise
7
6 Some Points on Linux Usage
6.0.2 Ubuntu Root Operations
Ubuntu works like any other Linux distro, except for one important point: Ubuntu does not have a root user
account in the classic Unix sense. Instead, whenever executing a command which requires root privileges,
one precedes the command by the term sudo (superuser do). One is then prompted for a password, which
is the password for the rst user account created at the time of installation.
If you have a lot of root-type work to do in a session, type
$ sudo -s
to create a new superuser shell, and do your work there.
6.1 More on Shells/Terminal Windows
In Microsoft Windows, most work done by most users is through a Graphical User Interface (GUI), rather
than in a command window (Start | Run | cmd). In Linux, a lot of work is done via GUIs but also it is
frequently handier to use a command window, called a terminal window. You should always keep two or
three terminal windows on your screen for various tasks that might arise.
You can start a terminal window in GNOME by typing ctrl-alt-t.
When you type commands in a terminal window, the program which reads and acts on those commands is
called a shell. (Thus a terminal window is sometimes called a shell window.)
I have an introduction to Unix shells, at http://heather.cs.ucdavis.edu/
matloff/UnixAndC/
Unix/ShellIntro.html and http://heather.cs.ucdavis.edu/
matloff/UnixAndC/
Unix/CShellII.html. These are based on the T C-shell, tcsh, but at least in the case of the rst
tutorials, most of the material also applies to the more popular bash shell.
On the other hand, bash is more popular, so you
6.2 Cut-and-Paste Window Operations
To do a cut-and-paste operations, hold down the left mouse button and drag it to highlight the text you wish
to copy. Then go to the place you wish to copy that text, and simultaneously push both the left and right
buttons. Generally, more things are cut-and-pastable in Linux than Windows, so this is a big convenience.
6.3 Mounting Other Peripheral Devices
This section explains how to use DVDs, USB devices and so on under Linux. You may wish to review
Section B before continuing.
8
6.3.1 Mount Points
Each I/O device that contains a le system must be mounted, i.e. associated with some directory. That
directory is called a mount point. The les then appear in that directory.
These days most Linux distributions have a designated directory for mount points for DVD/CD-ROMs, USB
devices, oppy disks, etc. This will vary from one distribution to another, but typical directory names are
/mnt, /media etc.
You can check what is currently mounted by running the df command from a shell window (another good
Linux learning experience). The mount points are listed along with the /dev les. Also, to list the /dev les
for all your operating drives including USB ash drives and including drives not mounted, type sudo fdisk
-l.
2
For more detailed information, such as le system types, just run mount without any arguments.
Your machines internal hard drives, and possibly other devices, will be mounted automatically at boot time.
This is controlled by the entries in the le /etc/fstab. The details are an advanced topic, but even without
understanding everything, you might nd it worthwhile to take a quick look at that le. Here is a line from
the le on my ofce machine,
/dev/sda3 /usr/home ext3 defaults 0 2
Here /dev/sda3 is the third partition (3) on my rst SATA hard drive (a). The entry says that this partition
has an ext3 type lesystem in it, and is to be mounted at the directory /usr/home. The remaining entries
concern things such as backup and le system checks.
When you attach a device to your machine after bootup, your system will probably recognize it immediately,
and maybe pop up a windowshowing the devices contents. If you have trouble, you can use the Unix mount
command. This is an advanced command, but just to give you an idea, a typical usage would be
mount -t iso9660 /dev/hdc /mnt/yyy
This tells Linux that the I/O device corresponding to /dev/hdc, our CD-ROM, should be mounted at the
directory /mnt/yyy. If that directory doesnt exist, you must create it rst, using mkdir. The eld -t iso9660
says that the le system type is ISO9660. This is standard for CD-ROMs, and you can probably omit it.
Use umount to unmount. Its not safe to remove a USB device without running this rst.
6.3.2 Using USB Devices
USB drives, including memory sticks, should have their lesystems mounted automatically when you attach
them. Use the df command to check where theyve been mounted (it could be in the directory /mnt/ /media
etc.).
USB mice should become automatically usable when you attach them.
2
This might not work in some cases. If fdisk doesnt recognize your device, try viewing the le /proc/partitions. Your device
may appear there, say as sdb1. Then run mount as shown below, on /dev/sdb1.
9
7 Linux Applications Software
7.1 GUI Vs. Text-Based
Most people prefer to use GUI-based applications. If you are one of them, rest assured that there are tons of
them available for Linux.
I do wish to mention, though, that many super hard core Linux users prefer to use text-based applications,
rather than GUI ones. For instance, I and many others like the mutt e-mail utility (Section ??), which is
text-based. Heres why, at least in my view:
I often access my Linux machine remotely, while traveling.
3
I might be at a university library, for
instance, or at the business center in a hotel, and be stuck with a Windows machine, and logging in
to my Linux machine via an SSH connection.
4
This limits me to text.
Its very important to me that I use the same text editor for all my computer applicationse-mail,
programming, word processing, etc.so that I can take advantage of all the abbreviations, shortcuts
and so on which I have built up over the years. This saves me huge amounts of typing. But most GUI
applications, e.g. e-mail utilities, have their own built-in text editors, so I cant use mine.
I nd that text-based applications often have more features, are better documented, etc. For example,
I often wish to automate certain processes, such as uploading les to another machine, and typically
text-based programs do this better.
However, in listing my favorite applications in Section 7.2 below, Ive made sure to list both text-based and
GUI programs.
7.2 My Favorite Unix/Linux Apps
In Ubuntu, one downloads new apps using apt-get, which Ill use in my examples here. The same is true
for other distros derived from Debian. In Fedora, use yum.
7.2.1 Text Editing
I use a modern extension to the vi editor, vim. This is the version of vi which is built in to most Linux
distros. See my tutorial at http://heather.cs.ucdavis.edu/
matloff/vim.html.
Note: In some Fedora distros, somehow the version of vim that is linked to vi isnt congured fully correctly.
I suggest using /usr/bin/vim directly.
Even though vim is text-based, it does have a GUI version too, gvim. This comes with nice icons, allows you
to do mouse operations, etc. Unfortunately, most Linux distros seem to have only the text-based program.
To get the GUI, you can download it yourself. In Ubuntu, do
3
Which is in fact exactly the case as I write this paragraph.
4
Though I sometimes use VNC to access a remote image of my Linux desktop. See http://heather.cs.ucdavis.
edu/
matloff/vnc.html.
10
sudo apt-get install vim-gnome
For this, you may need to edit /etc/apt/sources.list and uncommented the lines for Canonicals partner
repository
7.2.2 Web Browsing and Java
Your Linux distro will come with a Web browser, probably Firefox, and possibly Konqueror in addition.
I usually use Firefox. Chrome is nice, but I really like the plugins available for Firefox.
But believe it or not, sometimes I use the famous text-based browser, lynx. In some cases, it is just plain
quicker and easier. Moreover, you can do cool tricks, such as recording keystrokes for later playback, thus
enabling one to do certain Web operations automatically.
If you use Ubuntu, your system may not be congured for Java in Web browsing. If so, do
sudo apt-get install openjdk-7-jre
sudo apt-get install icedtea-7-plugin
7.2.3 HTML Editing
I usually use Vim, along with some macros Ive written for HTML editing, but I sometimes use Amaya,
which is a full-featured GUI HTML editor, written by the Web policy consortium. One nice feature is
that you can actually use the embedded Web links, good for testing them. See my tutorial at http://
heather.cs.ucdavis.edu/
matloff/amaya.html.
There are many newer and more powerful packages, such as Quanta+, Bluesh and NVu.
7.2.4 Compilers
Some distros come with the GCC suite. Ubuntu, for example, does not, but it can be downloaded via
sudo apt-get install build-essential
# may need to do this separately:
sudo apt-get install libc6-dev # C library
7.2.5 Integrated Software Development (IDE)
For programming work, I rarely use IDEs, as they are slow to load, take up too much space, and often dont
allow me to use my own text favorite editor.
I nd that the vim editor (cited above) and the ddd GUI interface to the gdb debugging tool, work great
together. For example in vim I can type :make (which I have aliased to just M, or with gvim click on the
make icon, and the source code Im debugging will be recompiled. And as Ive mentioned, its important
to me that I use the same text editor for all applications, which most IDE would not allow me to do. I use
either GDB (try CGDB!) or DDD for my debugging tool. See my tutorials at http://heather.cs.
11
ucdavis.edu/
matloff/
debug.html.
DDD is also usable with my favorite programming language, Python.
However, if you love IDEs, try Eclipse. Ive got a tutorial that is more complete than most, at http:
//heather.cs.ucdavis.edu/
matloff/lyx.html.
Install by running
sudo apt-get install texlive
# you may also need:
sudo apt-get install texlive-fonts-recommended
If you wish to work with les compatible with the Microsoft Ofce environment, there is a free suite of
programs, OpenOfce, which provide Microsoft compatibility. It is packaged with most Linux distributions.
If you would like something that quickly converts an Ofce le to rough text form, say to use with e-mail
attacments, try Antiword. In Ubuntu, install via
sudo apt-get install antiword
7.2.7 Playing Movies, Music, Etc.
MPlayer is free and outstanding. Its capabilities are amazingly broad.
The documentation is extensive, and hard to navigate, but here are a couple of things to get you started:
Installation:
Its easy in Ubuntu:
sudo apt-get install mplayer
sudo apt-get install mencoder
Otherwise, build it yourself, as follows.
One downloads the source code, MPlayer-1.0pre7try2.tar.bz2 and the codecs, essential-20041107.tar.bz2,
from www.mplayerhq.hu/design7/dload.html.
Unpack the codecs le rst,
12
tar xfj essential-20041107.tar.bz2
This creates a new directory. Copy the contents of that directory to the directory /usr/local/lib/codecs (use
mkdir to create it if necessary). (Note: There may be legality issues with some codecs. When in doubt
about a particular codec, you should obtain it from a site like Fluendo that offers it for a nominal fee, See a
discussion at http://fedoraproject.org/wiki/CodecBuddy.
Now, unpack the source code le, and go into the directory it creates. Then go through the usual sequence
for building open-source software from source:
configure
make
make install
Note that if you want to use the GUI, the congure command should be
configure --enable-gui
After make install is done, you will probably get a message something like
***
Download font at http://www.mplayerhq.hu/dload.html
***
for OSD/Subtitles support and extract to
/usr/local/share/mplayer/font/
***
Download skin(s) at http://www.mplayerhq.hu/dload.html
***
for GUI, and extract to /usr/local/share/mplayer/skins/
The fonts are needed for the subtitles (and for the GUI, if you use it). Just the iso1 font is needed. Download
the font package, go to the indicated directory (/usr/local/share/mplayer/font/ in the above example), and
then do the unpack operation. This will produce a subdirectory, e.g. font-arial-iso-8859-1.
Viewing a video:
To play a video or audio le, say x.avi, type
mplayer x.avi
If you specify several les, as a playlist, it will play them all. Hit the Enter key if you want to skip the rest
of the current le and go to the next one.
You have the following controls:
right and left arrow keys to go back or forward 10 seconds
down and up arrow keys to go back or forward 1 minutes
PgDown and PgUp keys to go back or forward 10 min
left- and right-bracket keys to decrease/increase speed by 10%, or left- and right-brace for 50%;
Backspace key to return to normal speed
13
Space bar to pause, then . to go forward frame by frame, Space bar to resume play
f to go full screen
q to quit
You can use mplayer, actually mencoder, which comes with the package, to do format conversion, e.g.
AVI to MPG, change aspect ratio, and even do some primitive editing.
There are many, MANY, MANYdifferent options.
You may wish to try other players, e.g. VLC.
7.2.8 Video Editing
Try Kino, Cinelerra, LiVES and many others.
7.2.9 Image Viewing, Manipulation and Drawing
I use xpdf to view PDF les, though Acroread for Linux is available. I like the fact that xpdf allows me to
copy ASCII text from the le. Others popular with Linux are evince, okular and MuPDF.
For collections of JPEG les and the like, I use xzgv, gqview and gwenview; for viewing a single image, I
use qiv.
Want something like Adobe Photoshop? The GIMP program is quite powerful, and free. Its included with
most Linux distributions.
You can use GIMP to draw, but for quick and dirty tasks, I would suggest Dia, at http://www.gnome.
org/projects/dia/.
7.2.10 FTP
I usually use the text-based ftp and sftp, the latter being an SSH version for security.
If you do frequent uploads/downloads to/froma particular site and wish to automate them, another text-based
program, yafc, is excellent.
A very nice GUI program, though, is gftp, which you can download from the Web if your Linux system
doesnt already have it. In addition to the GUI, this program also has some functionality which ordinary
FTP programs dont have.
7.2.11 Statistical Analysis
Use the statistical package that the professional statisticians useR!
In my opinion from the point of view of someone with a foot in both campsIm a computer science pro-
fessor who used to be a statistics professorthe R statistical package is the best one around, whether open
14
source or commercial.
5
It is statistically modern and correct, and it also is a general-purpose programming
language.
I have a tutorial on R at http://heather.cs.ucdavis.edu/
matloff/r.html.
Install via
sudo apt-get install r-base
7.2.12 Video Chat
Currently, this is an area in which many Linux distros need work.
Ubuntu comes with Ekiga, which works best if the person youre chatting with has Ekiga too.
Skype has a Linux version, which many people use, but some have found to have problems.
As of this writing, Google does not offer Google Talk for Linux. However, Empathy can be used.
There are driver issues for some Webcams. Those using the UVC protocol are supposed to work on Linux,
with the uvcvideo driver that comes with Linux. But again, there may be problems.
7.2.13 Runing Windows Applications from Within Linux
I am simply not a Windows user, but on occasion there ia a Windows program I need to run from within
Linux.
The simple way, if it works, is the WINE Windows emulator. Your distro may include it (type which
wine in a terminal window to check); if not, download it, with for example the Ubuntu command being
udo apt-get install wine
For more involved applications, you may wish to try one of the virtual machine packages. See http:
//heather.cs.ucdavis.edu/
In Gnome hit Alt F2, which will bring up a little window in which you can run a command, say pkill
as above.
In Gnome, hit Ctrl Alt T, which will create a new terminal window, from which you can kill the
offending program.
Try going to another screen! Linux allows you to switch among multiple screens. In Gnome, for
instance, You can switch to the second screen from the rst via Ctrl Alt Right, and go back via Ctl Alt
Left. Then open a terminal window in the new screen, nd the process number of the program and
kill the program, as described above.
In Gnome, try hitting Ctrl Alt Del). This should cause an exit from Linuxs X11 windowing system
but not an exit from Linux itself. You would then get an opportunity to log in again.
Try NOT to simply poweroff the machine, as that may do damage to your les. It may not be permanent
damage, as the OS will try to x the problems when you next reboot, but dont just pull the plug unless you
have no other recourse.
9.4 Accessing Your Windows Files from Linux
At this point, most Linux distributions, except Fedora/Red Hat, give you access (at least read access) to
your Windows partition from Linux. For some of them, they may do this automatically, in which case your
Windows partition, say /dev/hda1 should be visible in the le /etc/fstab. If not, mount it yourself:
mkdir /dosc
mount /dev/hda1 /dosc
cd /dosc
You should now see your Windows les, and should be able to access them on at least a read basis.
For more information, including concerning write access, ss the Linux-NTFS Project, http://www.
linux-ntfs.org/.
A What Is Linux?
Linux is a form of the Unix operating system. Though originally Unix was used mainly by engineers
and scientists and thus was not very familiar to the general public, a lot of what you take for granted on
computer systems today began in Unix. A notable example is the Internetthe rst major operating system
to implement the TCP/IP protocol at the heart of the Internet was Unix, and that led to the general acceptance
23
of the protocol. The Apple Macintosh operating system is based on a form of Unix, and the Android system
is based on Linux.
In the early 1990s, computer science student Linus Torvalds decided to write his own version of Unix,
which he called Linux. Other homegrown versions of Unix had been written, such as MINIX, but what
distinguished Linux was the scale of worldwide participation involved. Torvalds innocently put a message
on the Internet asking if anyone wanted to help, and he got a torrent of responses.
There are a several reasons why Linux is mainstream today. First, it became known as a very reliable, stable
operating system, with one result being that Linux has become a major platform for large corporate Web
servers. Another reason is that it is free, as is the vast majority of the software associated with it developed
elsewhere. Many companies have found that it is cheaper to run Linux on their PCs, both for this reason and
because of reduced maintenance costs.
There are several good reasons for you to use Linux:
As mentioned, Linux is becoming one of the hottest software systems. Virtually all of the major
companies are promoting it, and as mentioned Linux is a leading corporate choice for Web servers.
Linux is the main operating system used at , and in fact they developed their own version
of Linux, Goobuntu (a play on Ubuntu, one of the most popular versions of Linux).
Linux is also starting to make inroads in large desktop markets, such as businesses, schools and so
on, due to its high reliability, far lower rate of infection by viruses compared to Windows, and its low
cost.
The Linux community shares. That means that people online are much more willing to help you, and
more open source software is available.
If you are a university computer science student, there are some very important additional advantages:
Many CS courses make specic use of Unix, and thus their work cannot be done on Windows plat-
forms. Since it is a full Unix system, Linux allows students to do their homework in the com-
fort of their own homes. If you are new to Unix, click here for my Unix tutorial Web page at
http://heather.cs.ucdavis.edu/