Jeff Balvanz -- ISU Computation Center
January 24, 2002
When you teach a person how to use a computer for the first time, you have to teach them what they have to do as well as how to do it. They don't know what files and applications are, and that you need to copy them to diskettes or organize them into folders.
You, on the other hand, have been educated in what computers do, and are probably familar with how to do all the things that need to be done on a Macintosh or Windows machine. Your questions are more like those of someone driving a strange car: "Where's the headlight switch, and how do you turn on the radio?" That's where the 30 Essential Elements come in. You will find instructions for doing the thirty most common operating system tasks so that you can transfer your skills to Linux. This will get you up and running in Linux as quickly as possible.
This process is complicated by the fact that there are lots of ways to do the same thing in Linux. Unlike Windows or Mac OS, Linux gives you choices: a text-only command-line interface or a variety of graphical window managers. This is good. Brand new computers can use the beautiful desktop managers like KDE and Gnome. Older machines work better with a less demanding window manager like IceWM. Servers work best without the overhead of the graphical stuff, especially if you have three hundred of them without keyboards or monitors and want to manage them remotely. Finally, getting a command prompt and using the bash shell commands will almost always work no matter what window manager you're using.
For purposes of this document, we're going to assume that you have one of
these four: the K Desktop Environment (KDE), the GNOME Desktop, the IceWM
window manager, or the bash shell prompt. A text-only Linux installation will
start the bash shell by default. If your computer starts up in graphics mode
without giving you a command prompt, click on the icon at the bottom of the
screen that looks like a terminal window and a bash shell window will
While reading, if you see a list with buttons under an element or subelement, it means that any of the choices will do what you want. Without further adieu, here are the 30 Essential Elements.
Push the space bar or turn on the Big Red Switch.
Many Mac users are used to pushing the power key on the keyboard. Only the most modern PCs can start themselves up in this way, and they generally use the space bar. If you see a picture of a computer on the space bar, press it to turn the computer on. Otherwise, follow the keyboard cable to the box that is the computer and look for a power switch. In that case, you'll probably have to turn on the monitor by hand as well.
The big shock to Mac and Windows users moving to a Linux machine is that
the computer, on startup, will actually ask you for a username and password
and refuse to let you use it until you give it a correct set. If you don't
have one, find the system administrator (or the person who installed Linux on
the machine) and ask nicely for one.
You can't, exactly.
Linux treats your entire system, including the network volumes you've
mounted, as one big disk named "/". Underneath "/", other disks (like your
floppy or CD-ROM drive) will appear as "mount points". Usually the floppy
will appear as /mnt/floppy and the CD as /mnt/cdrom.
bash shell prompt: Type cat /etc/fstab. You'll
get a list that looks like this:
LABEL=/ / ext3 defaults 1 1
none /dev/pts devpts gid=5,mode=620 0 0
none /proc proc defaults 0 0
none /dev/shm tmpfs defaults 0 0
/dev/hda10 swap swap defaults 0 0
/dev/hdb4 /mnt/zip250.0 auto owner,kudzu 0 0
/dev/fd0 /mnt/floppy auto owner,kudzu 0 0
/dev/cdrom /mnt/cdrom iso9660 owner,kudzu,ro 0 0
The "LABEL=/" entry is your main filesystem. Entries that begin with
"/dev" are some kind of additional disk, with the second column describing
the mount point, which is the name Linux will use to describe that volume.
KDE Desktop/GNOME Desktop: Icons should appear on the desktop for
your home directory and any removable disks you have on your system.
Additional hard disks and network volumes will appear as mount points, so
those disks will appear in the
/etc/fstab list as described
IceWM: IceWM doesn't display disks on the desktop. Right-click on the desktop and select "xterm" or "rxvt" from the menu that appears. You have just "started a shell". (You'll probably need to do this often, and many people set up IceWM to open a shell automatically on startup.) Now refer to "bash shell prompt" above.
Mount the disk, then open it from the desktop icon or get a directory
from the shell.
In Linux, disks have to be mounted before you can use them. You may or
may not be able to do that; on many Linux machines, mounting a disk must be
done by the administrator (called "root"). This promotes security, as people
can't steal things from your machine and network if they can't mount a
removable disk. So, try the following procedure to look at a disk:
GNOME Desktop: Double-click on the icon of the disk; GNOME will automatically mount it.
IceWM/bash shell prompt: If you're using IceWM you'll need to start a shell as described above. Next, you'll need to know what you're mounting, and where it gets mounted. Here are some choices:
|Device||Device Name||Mount Point|
|Floppy disk||First disk: /dev/fd0
Second disk: /dev/fd1
|CD-ROM||Varies: usually /dev/cdrom||/mnt/cdrom|
|Zip drive||Varies: will depend on how your Zip drive is attached (usually /dev/hda2, /dev/hdb1 or /dev/hdb2 depending on how many hard disks you have and how everything is attached)||/mnt/zip100.0 or /mnt/zip/250.0|
Once you know how to describe it, you'll mount the disk with this command:
For example, mounting the first floppy disk (drive A:, to the Windows users) looks like:
mount /dev/fd0 /mnt/floppy
Now that the disk is mounted, you can look at it.
KDE Desktop: click on the removable disk's icon or on the "Home" icon on the desktop.
KDE uses the Konqueror browser to display directories, Web pages and help files. When you click once on the icon of a disk, the contents of that disk will appear in a new window. If you click on the "Home" icon, the contents of your home directory (/home/username) will be displayed. The Konqueror window will look something like this:
The left pane of the window shows the entire directory tree of your machine (beginning at "/"). If you want to see the entire root directory, click "Root Directory" in the left pane of the Konqueror window. Like Windows and Mac OS, different icons represent different types of file.
You can change the view of the window from the View menu with "View Mode". Your choices are as follows:
If you want to rearrange the icons (the Linux equivalent of the Macintosh "Special/Clean Up"), select "Sort" from the View menu. You can make it sort the icons by Name, Type, or Size.
GNOME Desktop: double-click on the icon of the disk to open, or the "User's Home" icon to open the home directory. GNOME Desktop uses the Nautilus browser as its file manager. A window like this one will appear:
Different file types are given different icons. The files can be shown in two different ways, selectable from the View menu:
Some of the icons in both KDE and GNOME Desktop have special meanings:
|KDE (Konqueror)||GNOME Desktop
|Executable binary file.. When you see an icon with gears, leave it alone unless you really know what you're doing. Removing it might break Linux or one of your applications. Fortunately, these tend to be concentrated in the directories /bin, /sbin, /usr/bin, /usr/sbin, and /usr/local/bin. Unless you are logged in as root or have become the superuser with the su command, you won't be able to modify or delete these anyway.|
|Executable script. Like a batch file in Windows, but the scripting language is much more powerful -- even better than AppleScript in Mac OS.|
|Directory, containing files and subdirectories.|
IceWM or bash shell prompt: if necessary, open a shell
window. The shell starts with the current directory as
/home/username.From the shell prompt, type
display a list of filenames in the current directory, and
to display the filenames with their permissions, ownership, etc. You can
display the information about a particular file by including the name in the
ls -l linuxelem.html. Regular expressions can
also be used in the filename to select more than one file. The question mark
matches any character. The asterisk matches any number of characters, just
like in the Windows command prompt, but the asterisk can be used at the
beginning, end and/or middle of the pattern, e.g.,
ls -l *abc*
would display directory information for all files containing the string "abc"
anywhere in the filename. More complicated regular expressions are possible
(and very useful), but their use is beyond the scope of this document.
KDE/Konqueror: Click on the folder icon. To open folders above the current directory, click the Up button or select the folder you'd like to open in the directory tree in the left pane of the Konqueror window.
GNOME Desktop: Double-click on the folder icon. To open folders above the current directory, click the Up button.
IceWM/bash shell prompt: To change the current directory, type
cd directoryname. To change the current
directory to the directory immediately above the current one, type
.. or specify the full pathname of the directory, e.g.,
KDE and GNOME Desktop:
Mac users are used to using the manual resizer box in the lower right-hand corner of the window. You don't have to in most Linux window managers; you can resize from any side of the window, which is sometimes more convenient. But when you put your mouse pointer in a corner, dragging resizes the window in both directions just like the Mac's manual resizer box.
It's written "Box/Button" because depending on which desktop scheme you're using it may be either a square box or a round button (or even something more esoteric). Note for Classic Mac OS users: the box on the far right end of the Title Bar is the Close Box, not the Zoom Box. Clicking there will close the application (darned frustrating). Most Linux window managers are compatible with Motif, which uses this three button scheme.
Minimizing a window reduces it to a button on the Task Bar. The application is still running, but it's not cluttering up the screen. NOTE: some desktop schemes also have a fourth button to the left of the Minimizer box/button, which rolls the window up into the title bar.
Closing a window shuts down whatever application was running it. Whether or not this happens gracefully depends on the application. Some will ask if you want to save your work before closing; others will warn you that there are unsaved documents and give you the opportunity to cancel; still others will simply lose whatever changes you've made. Be familiar with your tools.
KDE/Konqueror: With the window you want the folder to appear in open, do one of the following:
Konqueror will ask for a directory name. Type a name for the new folder and press <Enter>.
GNOME Desktop/Nautilus: With the window you want the folder to appear in open, do one of the following:
IceWM/bash shell prompt: at the shell prompt, type
mkdirdirectoryname, where "directoryname" is a simple
name if the directory is to be created in the current directory, or an entire
/home/joeuser/MyDocuments/NewStories) if it is
KDE/Konqueror: Click, hold and drag the file over the window or folder you want to move it to. When you release the mouse button, a drop-down menu will appear. Select "Move here".
GNOME Desktop/Nautilus: Right-click, hold and drag the file over the window or folder you want to move it to. When you release the mouse button, a drop-down menu will appear. Select "Move here".
IceWM/bash shell prompt: at a shell prompt, type
mv sourcefile destination where "sourcefile"
is the name of the original file and "destination" is the filename or
directory name to move it to. If you specify a directory as the destination,
the file will be moved to the new destination with the original filename.
mv is also used to rename files within the same
KDE/Konqueror: Click, hold and drag the file over the window or folder you want to move it to. When you release the mouse button, a drop-down menu will appear. Select "Copy here".
GNOME Desktop/Nautilus: Right-click, hold and drag the file over the window or folder you want to move it to. When you release the mouse button, a drop-down menu will appear. Select "Copy here".
IceWM/bash shell prompt: at a shell prompt, type
cpsourcefile destination where "sourcefile" is
the name of the original file and "destination" is the filename or directory
name to copy it to. If you specify a directory as the destination, the file
will be copied to the new destination with the original filename.
IceWM/bash shell: at the shell prompt, type
rm filename. In many Linux distributions you'll be
asked to confirm the deletion, but not all. You can use regular expressions
for "filename", but in those cases I recommend that you use the command
ls filename first to be sure that the files to be
deleted are really the ones you want (especially when you are logged in as
root or are the superuser).
KDE/Konqueror and GNOME Desktop/Nautilus: Open the Trash and drag the file back to the folder it came from.
bash shell: There is no easy
way to recover a file that has been deleted with the
from a shell prompt.
Disks must be formatted as the superuser, and usually only from the command line. From KDE, GNOME Desktop or IceWM you'll have to start a shell. Diskettes may be formatted either as MS-DOS diskettes (which may be used in both Linux and Windows machines) or as ext2-formatted disks. An ext2 disk can preserve Linux file attributes such as file owner and permissions; an MS-DOS diskette cannot.
MS-DOS formatted disk: formatting of disks must be done as the superuser. Type
The disk can now be mounted with the command
Another way to format MS-DOS diskettes is with the mtools set. Formatting a diskette as MS-DOS can be done by any user with the following command:
ext2 formatted disk: formatting of disks must be done as the superuser. Ttype
KDE/Konqueror and GNOME Desktop/Nautilus: Drag the file's icon to the disk's icon or to one of the disk's windows.
IceWM/bash shell: include the disk's mount point as part of the
MS-DOS formatted diskettes
only: at a shell prompt, type
a: to copy a file to the disk in drive A:, or
a:filename pathname to copy a file from an MS-DOS
formatted diskette to a location in the machine's filesystem. You do not
have to be root to use the mtools commands.
KDE/GNOME Desktop/IceWM: Click the button at the left end of the Taskbar, then the application's menu choice.
Any window manager starting a windowed application: enter the application filename followed by an ampersand from a shell window, i.e.,
This will start the application in a new window and leave the shell window available for other uses.
bash shell: enter the application filename. If the application can run in the background (like a server daemon) follow the filename with an ampersand to push the application into the background immediately.
KDE/Konqueror: Left-click on the document's icon (or on a symbolic link)
GNOME/Nautilus: Double-click on the document's icon (or on a symbolic link).
Any window manager: enter the application filename followed by the document filename and an ampersand from a shell window, i.e.,
This will start the application in a new window, open the document and leave the shell window available for other uses. You will have to know the name of the application used to open the document, of course.
bash shell: enter the application filename followed by
the document filename, e.g.,
Linux lets you select printers by name. The printer names are set up by your computer's administrator. How you select it will depend primarily on the application, not the window manager you're using. For more detailed information, see "Using Central Printers from Linux" at http://www.ait.iastate.edu/pubs/lag320/lag320.pdf.
StarOffice/OpenOffice.org: select the printer from the
pull-down menu in the Print dialog box. If your printer does not appear,
have the machine administrator run
spadmin to add your printer
to the list.
KDE: KOffice applications can also select printers from a pull-down menu in the Print dialog box. Use the KDE Printer Configuration tool (available under the System part of the K Menu) to add printers to the list.
Other Graphical Applications: many older applications do
not have a printer menu. Instead, a field in the Print dialog box is used to
specify a printing command. Specify that command as
-Pprintername, where "printername" is the name of the printer
as assigned by your system administrator or (if you're using the Iowa State
Linux software) the Vincent system print queue name.
KDE/Konqueror or GNOME Desktop/Nautilus: open the document and select "Print" from the File menu.
From graphical applications in IceWM: start the appropriate application from the Start menu, open the document using "Open" from the File menu, and select "Print" from the File menu.
IceWM/bash shell: at the command prompt, type
-Pprintername filename, where "printername" is the
name of the printer or Vincent print queue and "filename" is the name of the
document file. Depending on the print queue you're printing to, you may have
to convert the file to PostScript or some other printer control language
before printing. (If the print queue is
apsfilter or a similar "magic filter" to process the
printer input, it should do any conversions automatically.)
bash shell: There are two ways to run multiple applications from a shell.
fgcommand to select from the suspended process.
jobsto display the list of processes by process ID..
n, where "n" is the process ID of the application you want to select.
To start a new application, type the name of the application at the shell prompt after you've suspended the current process.
Once you've logged in on a virtual console, switching to that console will simply display whatever application was running when you last left it. If you leave a machine without shutting it down, be sure that you have logged out on all the virtual consoles you've used; otherwise, someone else could use your account if they discover the running application.
KDE: Use the Process Management tool.
GNOME Desktop: Use the GNOME System Monitor.
IceWM/bash shell: at a shell prompt, type
to display the current processes. Then enter
PID, where "PID" is the process ID number of the process to
suand enter the root password.
shutdown -h now.
suand enter the root password.
shutdown -r now.
Linux machines don't crash very often, though if a machine becomes very busy for some reason it may look as though it has crashed. Try the following things before turning off the power:
If all of these possibilities fail, you'll need to turn the machine off. If your computer has a "soft" power switch, try holding the switch down for 5 seconds; most machines with soft power switches will turn off even if they've crashed hard.
Connecting to a campus AFS filesystem: you will need Iowa
State Linux (available at http://linux.ait.iastate.edu) or a
comparable afs client (like OpenAFS or arla) installed and properly
configured. You must be logged in to Kerberos with either a Kerberized login
(like the full installation of Iowa State Linux) or with the
kinit command.. To attach a filesystem, start a shell prompt and
enter the command
attach filesystem, where
"filesystem" is the name of the filesystem you want to connect to. Most of
ISU's filesystems will automatically be mounted as
/home/filesystem. If you'd like to put the
filesystem at a different location, use the command
mountpoint filesystem, where "mountpoint" is the full path to
the mount point. (For example, to mount your AFS home directory as "afshome"
within your local home directory, you can use
/home/username/afshome username.) That directory
must exist before you enter the
To disconnect a filesystem, use
Connecting to a Windows file share: you must have the Samba client installed (see http://www.samba.org for more details). Start a shell prompt, become superuser with the su command and type:
mount -t smbfs -o
where "windowsserver" is the Netbios name of the Windows server the share is located on, "username" and "password" are your username and password on that server (not the Linux machine), "sharename" is the name of the Windows file share you're mounting, and "mountpoint" is the mount point on your machine you want that share to appear as.
If you're using Iowa State Liuux, you don't need to add the centralized (Vincent) print queues to your machine; just specify the printer name as described in element 20. Otherwise, you'll have to add a print queue. Here's how:
KDE: use the printconf-GUI. In the K Menu, select
System -> Printer Configuration. Click
enter the root password and follow the directions. You can add queues that
connect to UNIX, Windows and Novell printers as well as local printers and
directly to HP JetDirect cards.
bash shell, Red Hat: become superuser with the
su command and issue the command
usr/sbin/printconf-tui. Use the Tab key to select
New, then enter the information as described above.
For more information on printing in Linux, see http://www.linuxprinting.org.
At a shell prompt, become the superuser with the
/sbin/fsck device, where "device" can be a
device name (like
/dev/fd0) or a mount point (like
/home, if it's on a different partition from your root
For best results, a disk should be unmounted with the
mountpoint command before running
root filesystem cannot be unmounted, but it is automatically checked at
startup. If there are problems on the root filesystem that can't be repaired
with the disk mounted, you'll have to start from a Linux boot disk or CD and
fsck on the unmounted disk.
sucommand, then enter the command
date MMDDhhmmCCYY.ss, where "MM" is the numerical month, "DD" is the numerical day, "hh" is the numerical hour, "mm" is the minute, "CCYY" is the year, and "ss" is the number of seconds. Many of the parts of the date are optional; for example,
date MMDDhhmmis sufficient to set the date and time to the nearest minute.
That's the hard way, however. The command
time.iastate.edu will set the system time using information from ISU's
network time server, which is synchronized with the U.S. atomic clocks.