From: IN%"ggholson@bellsouth.net" "James Gholson" 19-OCT-1999 22:04:02.82
To: IN%"ggholson@MOCHA.MEMPHIS.EDU"
CC:
Subj: [Fwd: Returned mail: Host unknown (Name server: cc.memphis./edu: host not found)]
Return-path:
Received: from mail1.bna.bellsouth.net by mocha.memphis.edu
(PMDF V5.1-12 #D3067) with ESMTP id <01JHC1K0FBV48YC1XH@mocha.memphis.edu> for
ggholson@mocha.memphis.edu; Tue, 19 Oct 1999 22:04:00 CDT
Received: from bellsouth.net
(host-209-214-196-111.mem.bellsouth.net [209.214.196.111])
by mail1.bna.bellsouth.net (3.3.4alt/0.75.2) with ESMTP id XAA26338 for
; Tue, 19 Oct 1999 23:06:03 -0400 (EDT)
Date: Tue, 19 Oct 1999 22:02:03 -0500
From: James Gholson
Subject: [Fwd: Returned mail: Host unknown (Name server: cc.memphis./edu: host
not found)]
To: ggholson@MOCHA.MEMPHIS.EDU
Message-id: <380D30AB.47ED8279@bellsouth.net>
MIME-version: 1.0
X-Mailer: Mozilla 4.04 [en]C-bls40 (Win95; U)
Content-type: multipart/mixed; boundary="------------4C7DE9D00175A3094F7B96D4"
This is a multi-part message in MIME format.
--------------4C7DE9D00175A3094F7B96D4
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
--------------4C7DE9D00175A3094F7B96D4
Content-Type: message/rfc822
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
Received: from localhost (localhost)
by mail2.bna.bellsouth.net (3.3.4alt/0.75.2) with internal id FAA01190;
Mon, 18 Oct 1999 05:38:31 -0400 (EDT)
Date: Mon, 18 Oct 1999 05:38:31 -0400 (EDT)
From: Mail Delivery Subsystem
Message-Id: <199910180938.FAA01190@mail2.bna.bellsouth.net>
To:
MIME-Version: 1.0
Content-Type: multipart/report; report-type=delivery-status;
boundary="FAA01190.940239511/mail2.bna.bellsouth.net"
Subject: Returned mail: Host unknown (Name server: cc.memphis./edu: host not found)
Auto-Submitted: auto-generated (failure)
This is a MIME-encapsulated message
--FAA01190.940239511/mail2.bna.bellsouth.net
The original message was received at Mon, 18 Oct 1999 05:38:15 -0400 (EDT)
from host-209-214-192-13.mem.bellsouth.net [209.214.192.13]
----- The following addresses had permanent fatal errors -----
----- Transcript of session follows -----
550 ... Host unknown (Name server: cc.memphis./edu: host not found)
--FAA01190.940239511/mail2.bna.bellsouth.net
Content-Type: message/delivery-status
Reporting-MTA: dns; mail2.bna.bellsouth.net
Received-From-MTA: DNS; host-209-214-192-13.mem.bellsouth.net
Arrival-Date: Mon, 18 Oct 1999 05:38:15 -0400 (EDT)
Final-Recipient: RFC822; ggholson@cc.memphis./edu
Action: failed
Status: 5.1.2
Remote-MTA: DNS; cc.memphis./edu
Last-Attempt-Date: Mon, 18 Oct 1999 05:38:31 -0400 (EDT)
--FAA01190.940239511/mail2.bna.bellsouth.net
Content-Type: message/rfc822
Return-Path:
Received: from bellsouth.net (host-209-214-192-13.mem.bellsouth.net [209.214.192.13])
by mail2.bna.bellsouth.net (3.3.4alt/0.75.2) with ESMTP id FAA01064
for ; Mon, 18 Oct 1999 05:38:15 -0400 (EDT)
Message-ID: <380AEAA3.928E6DED@bellsouth.net>
Date: Mon, 18 Oct 1999 04:38:45 -0500
From: James Gholson
X-Mailer: Mozilla 4.04 [en]C-bls40 (Win95; U)
MIME-Version: 1.0
To: ggholson@cc.memphis./edu
Subject: Linux Cheat Sheet
Content-Type: multipart/mixed; boundary="------------154D75DD7CBC5076C5B49032"
This is a multi-part message in MIME format.
--------------154D75DD7CBC5076C5B49032
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable
> Linux Cheat Sheet
>
> Last updated Sunday, 17-Oct-1999 02:34:42 PDT by Roedy Green =A91998-19=
99 Canadian Mind Products.
>
> This document is designed to help a naive user install and get started =
with Red Hat Linux 4.2 or 5.0. Since I wrote this 5.2 came out, and presu=
mably everything has changed. Anything you read here with a large grain o=
f salt. Please let me know of any errors or omissions. I have been having=
a exceedingly frustrating time getting Linux to work. Further I have bee=
n overwhelmed by the sheer volume of documentation. I hope to make your w=
ay a little easier.
>
> Introduction
>
> This essay was written in the spring of 1998. Since that time Linux has=
evolved amazingly. I spent 1999 October 16 at the West Coast Computer Fa=
ire, lecturing on Java, viruses, and backups and talking with all kinds o=
f people. People told me things that made me really wonder if the PC worl=
d is in for a major shakeup.
>
> 1. I talked with various Linux users. They showed me how Linux has ch=
anged in the year last year and a half since I gave up on it as too nerdy=
=2E It is evolving about five times faster than Windows in terms of ease =
of use. It now has whiz bang wow-the-earthlings stuff like animated wallp=
aper. It runs Windows apps (Win 3.1 and Win95 with wine). It looks snazzy=
and modern. It has lost that klunky DOS look, even in the GUIs. KDE as G=
UI manager has made a world of difference. It runs many more devices than=
before. It can do simultaneous cpu-intensive tasks like MP3 without even=
breathing hard. Caldera installs are orders of magnitude easier than the=
old Red Hat ones. They had a poster showing a giant penguin about to sto=
mp on Microsoft headquarters. The caption said "Good evening, Mr. Gates. =
I will be your server tonight."
> 2. I have heard that Windows 2000 will retail for about $1000. I am n=
ot sure if that is US or Canadian. If you have the patience, you can down=
load Linux, along with all kinds of apps such as Star Office, free. Even =
if you buy the CD at full retail you will spend only $20-$40 Canadian (wh=
ich is about $1.50 US :-)) Mr. Gates started out with DOS, an ersatz CPM-=
86. He blew away the competition not because his DOS was superior, but be=
cause it was much cheaper. I wonder if he has forgotten this.
> 3. I heard a report that people had tested a beta copy of Windows 200=
0 server recently. It took 20 minutes to boot. Mind you that is beta code=
, probably riddled with extra debug code, but still!
> 4. I heard a report that a major US company had a server farm of 5000=
servers, geographically distributed, all running NT server. About once e=
very 60 seconds a server would fail and require a reboot. They switched t=
o the much more stable, and free Linux.
>
> Granted these are just stories and I can't back them up. However, I did=
make the Linux people show me all kinds of things and I can vouch that L=
inux is evolving at a breakneck speed. If it is not better than Windows n=
ow, it soon will be. In contrast, Windows 98 is only a tiny increment mor=
e evolved than Windows 95. The Linux people are building on a much firmer=
foundation.
>
> Equivalents
>
> These are the closest equivalents I could find to the following Windows=
95 utilities and concepts.
>
> Win95 Linux=
>
> + (concatenation) cat
>
> < (input redirect) <
>
> =
1> redirects stdout, normal output.
> > (output redirect) > =
2> redirects stderr.
> =
2>&1 redirects stderr to go to wherever std=
out is going.
>
> | (pipe) | =
tee splits the stream to both the console a=
nd a file.
>
> alias (4DOS) alias =
to temporarily turn off an alias and get at=
the original meaning of a word, precede it with a \. To permanently turn=
it off use unalias.
>
> attrib chmod =
There are three sets read/write/execute per=
mission attribute bits for each file, one for the owner, one for the grou=
p the file belongs to, and one for the universe at large. Each file has a=
n owner and a group. A lead dot on a filename is similar to the DOS hidde=
n attribute. You need ls -a to see them. Any easy way to maintain this in=
formation is with Midnight Commander, mc.
> chown
>
> /etc/*rc*, =
/etc/*rc* execute when you first boot.
> autoexec.bat .login, .profile, .bash_profile, =
=2Ebash_login, .login, .profile, .bash_profile, .bash_lo=
gin execute when you first login.
> .bashrc, .cshrc . =
.bashrc, .cshrc execute when you first star=
t a script.
>
> beep echo -en "\a"
>
> boot manager LILO =
To modify the Linux boot manager modify /et=
c/lilo_config then run lilo to parse it and poke the information into the=
various absolute locations on hard disk.
>
> call myscript.bat . myscript =
. means run in the same process. Without th=
e ., the new scripts starts up a new process. exec myscript stops the cur=
rent script and starts a new one.
>
> cd cd, pwd =
cd changes to a directory, default the $HOM=
E directory, where pwd tells you where you are now, print working directo=
ry.
>
> config.sys ?
>
> close kill
>
> command bash, sh, csh, Zsh, exec, perl
>
> copy cp -p, scp =
scp can be used inside or outside of an ssh=
(secure remote) session. When you use it outside one, it will automatica=
lly login, do the copying work and logout. -R is recursive like XCOPY /S.=
Watch out cp ignores directories and files beginning with "."
>
> del rm
>
> dialler ppp
>
> dial up networking rsh (regular), ssh -v (secure) =
You can download the source code for ssh fr=
om ftp://ftp.cs.hut.fi:/pub/ or alternatively ftp://ftp.achilles.net:/pub=
/security/ssh. When you install Linux make sure you include the C/C++ dev=
elopment tools so that you can compile this. The easiest way to set up co=
mmunication with another host is to exchange public keys via email and in=
sert the host's key in the known_hosts file and the user's key in the aut=
horized_keys file. You can use a null passphrase by typing ssh-keygen -p.=
>
> dir ls, dir =
ls -F will mark each executable with a *, d=
irectories with a /, and symbolic links with a @. Often ls is aliased to =
ls -F by default.
>
> =
Midnight Commander. You will have to instal=
l this manually. You will have to mount the CD-ROM first with:
> =
cd /
> =
mount /dev/cdrom /mnt/cdrom
> Disk Explorer mc =
and get to the directory where the install =
files are with:
> =
cd /mnt/cdrom/RedHat/RPMS
> =
then install:
> =
rpm -i mc-3.2.11-2.i386.rpm
>
> edit emacs, xemacs, nedit, kde, vi, jo=
e, pico, SlickEdit Linux editors are highly configurable. They=
are almost unusable out the box. You need to edit text files that contro=
l how they work. Catch 22! Without special configuring, even simple thing=
s like the Del key won't work properly. I think the authors deliberately =
make the default configurations infuriating to force you, like a tormente=
d oyster, into learning the configuring tools and creating a pearl. Slick=
edit can be configured to behave in perfectly standard CUA fashion. Other=
s can be coerced grudgingly to sort of behave in a CUA way.
>
> empty afile : > afile
>
> empty the trash rm -R '#'* =
to get rid of the #xxx files emacs leaves b=
ehind as backup. The single quotes ensure # is not treated as a comment.
>
> Eudora Pine
>
> exit exit
>
> file/disk space used, Norton FS du -s /myDir
>
> locate xxx
> find / -name xxx -mount
> which xxx
> find type xxx =
You need to periodically use updatedb to up=
date the database that locate uses. The database does not get updated as =
a side effect of creating, deleting or copying or moving files.
> whence xxx
> find / -type f -print | xargs gre=
p -l "String To Search For"
> find / -type f -print | xargs gre=
p -li "String To Search For"
>
> finger finger
>
> free disk space
> SNIFF C: D: df -k /myDir
>
> help man -k , info, apropos
>
> if "${x} =3D "orange"
> if "%x" =3D=3D "orange" echo "fruit" then
> echo "fruit"
> fi
>
> if ! -f myfile.txt
> if not exist myfile.txt echo "oops" then
> echo "oops"
> fi
>
> install rpm
>
> Internet Explorer Netscape, Arena, HotJava
>
> md mkdir
>
> more more, less
>
> MS DOS prompt shell, bash, sh
>
> password passwd =
passwd is used to change your password. Pas=
swords are stored in the /etc/passwd file in encrypted form. If any are i=
n plain text, the account was not properly set up. The root user can set =
other people's password with password someUserId.
>
> move mv
>
> Netscape Netscape
>
> path echo $PATH
>
> lpr
> print nenscript =
lpr adds files to the print queue. nenscrip=
t converts text files to PostScript
> cp afile /dev/lp0
>
> PVCS cvs =
You can download the source for the cvs ver=
sion control software from ftp://download.cyclic.com/pub/.
>
> rd rmdir, rm -r
>
> REM
> ::REM # =
comments in scripts
>
> remote shell rsh, ssh =
See dial up networking.
>
> rename mv
>
> replace cp -u
>
> resync cp --recursive --update dir1/* di=
r2 To resynchronise two directory trees to mak=
e them identical, propagating the newest version of each file in the dire=
ctory to the other. You can use the short switches -R and -u.
> cp --recursive --update dir2/* di=
r1
>
> set env | sort, setenv, export
>
> shortcut link, ln -s /usr/local/netscape/n=
etscape netsc Soft Links will be left dangling if the ori=
ginal file is deleted. See section later on soft links.
>
> spawn &
>
> splice cut split
>
> =
Before you can use a CD-ROM disc you must m=
ount it with a command like this:
> subst mount, umount, ln -s- =
cd /
> =
mount /dev/cdrom /mnt/cdrom
> =
/mnt/cdrom must be a prexisting, but unused=
, directory where the CD-ROM files will appear. Further, it may not be th=
e current directory. Any files there will be invisible during the time th=
e directory is being used as a mount. Don't expect a meaningful error mes=
sage if you violate any of these rules. Every time you change discs you m=
ust umount and re-mount, as if you were changing a removable disk pack on=
an ancient mainframe. Mounts are easier to do with the X Windows control=
-panel. Edit your etc/fstab to have two lines in it one for /dev/cdrom an=
d one for/dev/hda. Use mount point /mnt/cdrom and options iso9660,noauto,=
ro 0 0 .
>
> task list top, ps, ps aux | grep roedy
>
> tasks tasks, jobs
>
> telnet telnet
>
> grep -i Abc myfile
> TS (Text Search) grep '$' myfile =
grep looks for regular expressions. -i allo=
ws case insensitive matches. If your string contains any magic regular ex=
pression character such as []$\{}<>, or space then you need to enclose it=
in apostrophes. If you want $ environment expressions expanded, use quot=
es.
> grep "$USER:" myfile
> fgrep
>
> type cat
>
> uninstall rpm -e uninstallPackageName =
The catch is, you don't use the same packag=
e name to install as to uninstall! To find out the uninstall names, do a =
rmp -q -a | less. Very likely you will want to uninstall the 1.0 Java and=
replace it with a 1.1.X.
>
> who is logged on? w
>
> Win95 startx, X Windows, Fvwm =
F* Virtual Window Manager
>
> WinFTP ftp, ncftp
>
> tar -xvzf afilename.tar.gz
> tar -xvf afilename.tar
> WinZip gunzip afilename.gz =
with emacs configured with (auto-compressio=
n-mode 1).
> unzip afilename.zip
> emacs
>
> cp -R /sourceDir /targetDir
>
> xcopy find . -name '*.c' -print | cpio =
-pd /targetDir The first form copies the entire directory,=
and Recursively copies the subdirectories. The second form selects just =
some of the files by wildcard. find lists the files to copy and cpio make=
s the copies. -d means create new directories as needed. The third form u=
ses the tar, tape backup utility. cpio can be persuaded to avoid copying =
over top of newer files.
>
> tar cf - myfiles* | (cd /targetDi=
r; tar xf -)
>
> .zip .tar, .tar.gz, .gz =
Watch out trying to download .tar.gz files =
with Win95. The names will get mangled since Win95 does not live more tha=
n one dot per name. You will have to correct them once you get them to Li=
nux. See Winzip entry for various utilities to pack/unpack these files.
>
> Installation Hints
>
> Before you start installing Linux, go into the Windows 95 control panel=
and glean every obscure fact you can about your hardware, in particular =
your video card, video chip, RAMDAC, clock chip, and amount of video RAM.=
You will want your modem manual to concoct a good modem init string, one=
that insists on hardware compression, that insists on some base speed et=
c. There is button to print out a multipage summary. Write down the techn=
otrivia about how your TCP/IP and LANs are configured.
>
> Installing Hard Disk Partitions
>
> Create all your partitions with DOS's fdisk or Partition Magic before y=
ou start your Linux install. Do not create or delete them with Linux FDis=
k or Druid. Use Linux FDisk only to change the partition type to 82 for s=
tandard Linux ext-2 partitions and 83 for the swap partition. DOS won't b=
e able to see the Linux partition after they are formatted. Partition Mag=
ic won't be able to move or resize them. Linux won't let you shuffle them=
either. So do some work planning the sizes. You might consider installin=
g, then looking to see how full each partition is, then erase everything =
and use new partition sizes based on your newfound knowledge. DOS Fdisk w=
ill not be able to erase the partitions for you. Use Partition Magic, or =
if you want to live dangerously, use Linux. (I got my own system is such =
a snit after using Linux to create and delete partitions, the only way I =
could repair the damage was with a hex disk editor. None of my usual tool=
s could fix the damage.)
>
> Here is how I sized my partitions:
>
> Name Size in MB =
Purpose
>
> win95 1953 my Win95 C: VFAT (not Fat32) partition visible =
to Linux.
>
> NT 1326 my NT4.0 NTFS partition. Not accessible to Linu=
x.
>
> swap 200 to swap out programs too big to fit in RAM.
>
> / 50 root directory. everything needed to boot. My S=
CSI BIOS lets me put this directory above the 1024 cylinder limit.
>
> /usr 400 where application software bundled with Red Hat=
resides
>
> /usr/local 320 utilities not part of the Red Hat distribution.=
>
> /home 75 where all the user's home directories are.
>
> It is hard to know in advance how big to make your partitions. There is=
no way to change their sizes later save by erasing everything and starti=
ng over. So it is wise to save some unallocated space on your hard drive =
that you can make into a partition later, then move data off one of your =
existing overstuffed partitions to it. Also put the Win95 and NT partitio=
n contiguous so you can move the boundary between them. The Linux swap an=
d root partitions are fairly easy to wipe and redo if the need arises. Pu=
t them next you your Win95 and NT partitions.
>
> You might need to put a little Linux root partition totally below the 1=
024 cylinder mark.
>
> You can mount your DOS/Windows partition, either read-only or read-writ=
e. You don't set it up during the sysgen. You add it later with a bit of =
fussing. You first need to mkdir a /win95 directory as the mount point. T=
hen you need to use the control-panel in X windows to add a new partition=
=2E Add, not edit! You need to set its type to "vfat" not "DOS" It will b=
e added to the /etc/fstab the auto option, so it will be automatically re=
mounted on any reboot. If you want to set it up before you get X windows =
working, you can edit the /etc/fstab to insert an entry of type vfat, mou=
nt point /win95 and options auto,noexec,nosuid,nouser,rw 0 0. You need to=
do one mount /dev/sda1 manually, and from then on it seems to work autom=
atically.
>
> Others to consider making a separate partition:
>
> Name Size in MB Purpose
>
> /tmp ? for temporary files.
>
> /usr/src ? for application source code bundled with Red Hat.=
>
> /var ? lock files, logs, image of working system.
>
> There are several jobstreams running during the install. You can flip b=
ack and forth with Alt-F1 Alt-F2 etc. or Ctrl-Alt-F1 if under X Windows. =
To get back to X Windows use Alt-F7.
>
> Installing Video and X Windows
>
> If you are a masochist, you will love Xfree86. It is almost like a buil=
d-it-yourself driver toolkit but more frustrating. If you want to spend l=
ess than a month of your life solving the problem of making the screen di=
splay something, use Red Hat 5.0 and the enclosed commercial Metro-X driv=
ers and use configX. Be careful to fill in both panels one for the monito=
r and one for the video card, and don't touch the add button.
>
> If you want to go with XFree, get the latest documentation from http://=
www.XFree86.org. Getting X roughly working is fairly easy, but getting it=
to work in all the resolutions and colour depths, without huge black bor=
ders takes considerably more patience. Get the latest drivers from http:/=
/www.kernel.org/.
>
> Use Xconfigurator to configure X-Windows, and X or startx to start it. =
Once you have X working you can use the control-panel that you can access=
inside X to configure a second printer, configure ppp access, add users =
etc.
>
> If Xconfigurator does not work, you may have to start over from scratch=
installing Linux or use rpm to make sure you have the right video driver=
=2E Look over all the choices, don't just grab the first one that looks g=
ood. If X still does not work, try installing fewer video modes in partic=
ular leave out some of the higher resolution ones. I found the old xf86co=
nfig line-oriented configuration program gave better results, though it w=
as more awkward to use. Without it I could not get at the high resolution=
modes and I could not change modes with Ctrl-Alt-Keypad+ and Ctrl-Alt-Ke=
ypad-. If X hangs on fireup, hit Alt-F1 and you will be able see some err=
or messages about why it failed. Use xvidtune within X Windows to fine tu=
ne the configuration so that the image is sized and centered properly on =
the monitor in all modes. Not that xvidtune does not change your XF86Conf=
ig file for you. It just displays settings you can manually add to it. It=
may be easier to use your monitor's adjustments,
> then adjust other OS's to those settings.
>
> The first entry on the modes line is the one your X windows will come u=
p in. When you hit Ctrl-Alt-+, it should step through them in order.
> Modes "640x480" "800x600" "1024x768" "1280x1024"
>
> You can control which colour depth your X windows comes up in with: sta=
rtx -- -bpp 16
>
> In theory you should by able to permanently configure this by creating =
a file in your home directory called .xserverrc with the line exec X :0 -=
bpp 16 in it. However, I have not got that to work myself.
>
> To properly solve this configuration problem you have to have entries t=
hat exactly match the documented modes supported by your video bios. This=
may require setting up modes that are specific to a colour depth because=
your video card my require different rates for different colour depths w=
ith the same resolution. I have yet not found documentation on how to gen=
erate the required magic numbers.
>
> After that is done, you can start thinking about configuring your .fvwm=
rc file to configure the menus etc.
>
> Installing Internet Access
>
> There as a plethora (too much of a Good Thing TM) of documentation on h=
ow to get PPP working. I found that the following document was most usefu=
l: http://www.interweft.com.au/other/rhtips/ppp/ppp-tip-6.html. It guides=
you through using netcfg under X Windows. It is even easier than configu=
ring PPP for Win95, since everything is in one place. The descriptions of=
the prompts are slightly out-of-date, but nothing you can't handle. This=
process generates the scripts, creates the /etc/resolve.conf nameserver =
file etc. In going through this process, it often looks as though the sys=
tem has hung. What has really happened is a window off screen is demandin=
g your attention. Scroll around to have a look.
>
> If it does not work, before you panic, view the generated scripts in /e=
tc/sysconfig/network-scripts with emacs. You may have misspelled a passwo=
rd or forgotten that everything in Linux is case sensitive. You can test =
your connection with by starting up a new shell and running ping in it. T=
he only thing that document does not cover is creating alias or short fir=
eup/shutdown scripts so you don't have to type the giant long names and p=
arameters.
>
> If that is not sufficient, here are some other approaches others have r=
ecommended:
>
> Get a copy of pppsetup from ftp://ftp.tux.org/pub/people/kent-robotti. =
It will generate you the bash scripts to handle your ppp needs.
>
> There a giant HowTo document on doing the processes manually at http://=
sunsite.unc.edu/mdw/HOWTO/PPP-HOWTO.html. There are some Red Hat specific=
tips at http://www.interweft.com.au/other/.
>
> Installing Other Hardware
>
> The standard install program ignores much of your hardware, e.g. tape b=
ackup, sound card, scanner. To use these devices you must generate a new =
kernel, or find a pre-built one that has the support you need. I'm told y=
ou can do this with:
>
> CD /usr/src/linux
> make config
>
> Though I have not had quite the nerve to try it yet.
>
> For a sound card you may want $20 commercial drivers from http://www.4f=
ront-tech.com.
>
> More Shells Than You Can Shake A Shtick At
>
> autoexec script when run
>
> /etc/*rc* when the system boots
>
> /home/yourname.login, .profile, .bash_profile when you log in
>
> .cshrc, .bashrc whenever you start a ne=
w shell
>
> The different names .login, .profile, etc. are used by different shells=
, which allows them to co-exist more or less amicably. The C shell uses .=
login, the Bourne and Korn shells use .profile, bash (the Bourne Again SH=
ell) normally looks for .bash_profile first but may also read .profile.
>
> Re-Installing
>
> When you install. Keep notes on what worked. Sooner or later you will h=
ave to re-install and those notes will be invaluable. Before you reinstal=
l, save a copy of your /etc directory and your root .bash_profile outside=
Linux. The master copies will likely be destroyed. You can do quite a bi=
t of your re-install simply by copying selected configuration files back =
into /etc, or by comparing old and new versions.
>
> Be very careful about copying files to and from a Win95 partition. You =
will lose the owner, the attribute bits, and files and directories beginn=
ing with "." will not be copied. Files will be redated.
>
> Naming Your Computer
>
> If you have registered your own DNS domain, e.g. "ark.com", your comput=
ers will have names like "mars.ark.com" and "oberon.ark.com". If you have=
not, your computer name should match the last two parts of your ISP's do=
main. So for example if your ISP's computer were called "oberon.ark.com",=
your computer's hostname should be something like "cmp.ark.com".
>
> Simply editing /etc/HOSTNAME is not sufficient. Change the name with th=
e X control panel netconfig.
>
> Your computer also has another name, localhost@localdomain with dummy I=
P 127.0.0.1.
>
> Gotchas
>
> Here are a grab bag of miscellaneous things that bit me at some point i=
n my early Linux career.
>
> * Alt-F-X or Ctrl-C won't get you out of very many programs. Linux h=
as never heard of CUA. Each program wants to keep you trapped in there un=
til you read the entire online manual looking for the magic escape sequen=
ce (other than Ctrl-Alt-Del to reboot). Hint:
>
> Program How To Get Out
>
> emacs Ctrl-G Ctrl-M Ctrl-C N yes
>
> less Ctrl-Q Q
>
> man Ctrl-Q Q
>
> vi Esc : Q
>
> vim Esc : Q
>
> * Linux is case sensitive. Linux programmers seem to take great deli=
ght in mixing case in names in inconsistent ways.
> * Be careful in emacs. Using the arrow keys can add blank lines on t=
he end of your document if you overshoot out the bottom.
> * BS and Del don't work consistently. The Linux folk still have not =
learned the difference. Backspace won't work until you configure it to wi=
th:
> stty stop ^S start ^Q erase ^H
> * The path traditionally excludes the current directory, at least fo=
r the root user. To execute something in the current directory you must s=
ay ./myProg to qualify it enough to be found.
> * cp is not quite xcopy. * in a wildcard will not match files that b=
egin with ".". They have to be specially handled. cp usually seems to fin=
d a way to misread your intentions and create a new directory tree under =
the target rather than merging source files with the target's similar dir=
ectory structure. By default cp redates files. Do some experiments.
> * There are no extensions. Linux examines the first few bytes of eac=
h file to figure out what type it is. Data files don't appear to automati=
cally launch the corresponding app when you run them. There is also an ex=
ecutable permission attribute bit (actually three separate ones) that mus=
t be set before you can execute a program.
> * Wildcards of the form *xxx work in Linux, finding files ending in =
xxx. In DOS/Win95 they are uselessly equivalent to plain *. This is an "u=
ngotcha", a rare and precious event.
> * XWindows generates a virtual screen bigger than your physical scre=
en. When you open a window, you might not see it. You have to scroll arou=
nd to find it.
> * In documentation, C-x means Control-x, M-x means Esc then x, or so=
metimes Alt-x.
> * The default PATH given to root is different than for a normal user=
=2E root, by default does not get /usr/local/bin on his path. You have to=
add it in the .bash-profile.
> * It is common for programs to come in source form only. Even you ha=
ve no plans to develop software in C/C++, you still need the compilers in=
stalled to install software.
> * If you let Linux write files in your Win95 vfat partitions, it wil=
l use GMT, not local time. Norton Disk Doctor will freak over these futur=
e dated files. It also may cause trouble trying to figure out which file =
are really more recent if you share files between OSes.
> * The rpm install package name is not the same as the uninstall pack=
age name. See notes under "uninstall" in the Win95 equivalents table.
> * If Linux gets it into its head that your CD-ROM drive is /dev/hda =
when it should be /dev/hdb or vice versa, you set it straight by editing =
the symbolic link for cdrom in the /dev directory.
> * if you don't have write permissions for a file, you can still dele=
te it - but only if you have write permissions for the directory the file=
is located in. The Linux people look at this very literally. When you de=
lete the file, you don't write to the file, you write to the directory. E=
very file has an owner, and usually only the ower can touch that file. Th=
e root user can read, write or delete any files.
> * If you create new script files, they are not accessible via unqual=
ified names using the path until you have either logged out and in again,=
or used rehash.
> * The control-panel program for adding new users will not automatica=
lly encrypt the passwords. They need to be encrypted before use. To encry=
pt them, click CHANGE; don't just enter them in plain text in the slot ma=
rked password.
> * Command line substitution is complex:
>
> code meaning
>
> "..." expand what is inside now.
>
> '...' what is inside later.
>
> ${name} expand name as a set parameter.
>
> $(name) run the program name and expand with its output.
>
> $name old way of doing ${name}
>
> `name` old way of doing $(name)
>
> Symbolic Links
>
> Symbolic links have many uses:
>
> * Creating aliases for files and directories.
> * Putting a program on the path without adding extra directories to =
the path.
> * Divvying up the directory tree over several partitions.
> * Physically reordering the disk structure without changing any of t=
he scripts that reference the files.
> * Create a shorthand for long strings of directory names or long fil=
enames.
>
> The basic idea is:
>
> 1. In some directory,
> 2. you put an alias name, a link to:
> 3. some other file or directory that exists elswhere.
>
> Let us say that you had a file A/x and you wanted to be able to access =
it alternatively by that alias B/y. Here are the steps:
> cd /B
> ln -s A/x y
>
> emacs
>
> Emacs is an editor that comes in both text (emacs) and X-windows (xemac=
s) versions. You can get the four *.rpm files for xemacs from the www.xem=
acs.org web site. Even without source, the download is 20 MB! To further =
complicate the matter, the text version behaves differently in text mode =
and under X-windows. Emacs is a powerful editor with a great many feature=
s. Everything (even the mouse button) works in a totally non-CUA way. Win=
-95 users will feel all thumbs and possibly even seasick when no command =
works in the familiar way.
>
> Emacs is designed solely for the convenience of advanced users. You mig=
ht think if it as a suite of word processing LISP functions. You edit a f=
ile by running in an interactive programming mode where you compose and e=
xecute a LISP program on the fly where each keystroke invokes one LISP fu=
nction.
>
> To begin to make it friendly, (bind home jump to start of line instead =
of start of file, bind end jump to end of line, bind ^@ behave like Shift=
-^@, and bind ^- to behave like ^C_) create a .emacs file in your $HOME d=
irectory like this:
>
> (global-set-key [home] 'beginning-of-line)
> (global-set-key [end] 'end-of-line)
> (global-set-key [?\C-2] 'set-mark-command)
> (global-set-key [?\C--] 'advertised-undo)
>
> When you have the key bindings set up the way you like, you might copy =
your .emacs file to /usr/share/emacs/site-lisp/default.el to set it for e=
verybody.
>
> Here is a table of the basic commands to get you started. M-x in Linux-=
speak means Alt-x, C-x means Ctrl-x and S-x means Shift-X.
>
> Keystrokes Effect
>
> Home or M-< Move to beginning of file
>
> End or M-> Move to end of file
>
> PgDn or C-v Page down
>
> PgUp or M-v Page up
>
> M-% Replace text
>
> C-@ or C-space Place mark at cursor location
>
> C-g cancel current command.
>
> C-x C-f load a file
>
> C-x C-s Save a file
>
> C-x C-c Exit Emacs with option to save
>
> C-x u Undo the last change
>
> C-x 1 go back to having a single window
>
> C-x 2 Split the window in two
>
> C-x o Other window
>
> C-d Delete a character
>
> M-d Delete a word
>
> C-g Cancels the current command
>
> C-k Cuts text from cursor to end of line
>
> M-q Justifies the current paragraph
>
> C-s Search for text
>
> C-t Transposes two characters
>
> M-t Transposes two words
>
> M-u Capitalises current word
>
> C-w Cuts text between cursor and mark
>
> M-w Copies text between cursor and mark
>
> C-y Paste/Uncuts text
>
> In emacs under X-windows by default, Shift-C-@, and does not have a bin=
ding for M-w. Have fun!
>
> Suggested Reading
>
> Title Author =
ISBN Publisher Notes
>
> The Linux Bible: the Gnu Testament John Purcell and Amanda Robinson 1=
-883601-20-7 Yggdrasil Computing very thick. Out of date.
>
> Running Linux Matt Welsh and Lar Kaufmann 1=
-56592-151-8 O'Reilly good introduction to Linux and Unix in =
general
>
> Credits
>
> As you might guess, many people helped compile this document. If you wo=
uld like to be added to this list, please tell me.
>
> Andrew Langmead alangmead@bix.com
>
> Bob Friesenhahn thefuzz@BIX.com
>
> Daniel Kulp jdkulp@athena.com
>
> Harvey Fishman fishman@panix.com
>
> James Janney jjaney@bix.com
>
> Matija Grabnar matija@bix.com
>
> Joanne Dow jdow@bix.com
>
> Alan Ogden arog@bix.com
>
> Keven Kreiser kkreiser@bix.com
>
> Alan Ogden arog@bix.com
>
> John Strom john.r.strom@bix.com
>
> C. D. Inchauste inchaust@students.uiuc.edu
>
> ---------------------------------------------------------------------=
---
>
> [CMP_home] You are visitor number =
[HTML Checked!] [award]
> 4010.
> =
The Mining Company's
> [CMP_home]Canadian Mind Products You can get an updated copy of this p=
age from http://mindprod.com/linux.html Focus on Java
> =
Best of the Net Award
> ---------------------------------------------------------------------=
---
http://mindprod.com/linux.html
--------------154D75DD7CBC5076C5B49032
Content-Type: text/html; charset=us-ascii; name="linux.html"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline; filename="linux.html"
Content-Base: "http://mindprod.com/linux.html"
Linux Cheat Sheet

Linux Cheat Sheet

This document is designed to help a naive user install and get started
with Red Hat Linux 4.2 or 5.0. Since I wrote this 5.2 came out, and
presumably everything has changed. Anything you read here with a large
grain of salt. Please let me know of any errors or omissions. I
have been having a exceedingly frustrating time getting Linux to work.
Further I have been overwhelmed by the sheer volume of documentation. I
hope to make your way a little easier.

Introduction

This essay was written in the spring of 1998. Since that time
Linux has evolved amazingly. I spent 1999 October 16 at the West
Coast Computer Faire, lecturing on Java, viruses, and backups and
talking with all kinds of people. People told me things that made
me really wonder if the PC world is in for a major shakeup.

I talked with various Linux users. They showed me how Linux
has changed in the year last year and a half since I gave up on
it as too nerdy. It is evolving about five times faster than
Windows in terms of ease of use. It now has whiz bang
wow-the-earthlings stuff like animated wallpaper. It runs Windows
apps (Win 3.1 and Win95 with wine). It looks snazzy and modern.
It has lost that klunky DOS look, even in the GUIs. KDE as GUI
manager has made a world of difference. It runs many more devices
than before. It can do simultaneous cpu-intensive tasks like MP3
without even breathing hard. Caldera installs are orders of
magnitude easier than the old Red Hat ones. They had a poster
showing a giant penguin about to stomp on Microsoft headquarters.
The caption said "Good evening, Mr. Gates. I will be your
server tonight."

I have heard that Windows 2000 will retail for about $1000. I
am not sure if that is US or Canadian. If you have the patience,
you can download Linux, along with all kinds of apps such as Star
Office, free. Even if you buy the CD at full retail you will
spend only $20-$40 Canadian (which is about $1.50 US :-)) Mr.
Gates started out with DOS, an ersatz CPM-86. He blew away the
competition not because his DOS was superior, but because it was
much cheaper. I wonder if he has forgotten this.

I heard a report that people had tested a beta copy of
Windows 2000 server recently. It took 20 minutes to boot. Mind
you that is beta code, probably riddled with extra debug code,
but still!

I heard a report that a major US company had a server farm of
5000 servers, geographically distributed, all running NT server.
About once every 60 seconds a server would fail and require a
reboot. They switched to the much more stable, and free
Linux.

Granted these are just stories and I can't back them up. However,
I did make the Linux people show me all kinds of things and I can
vouch that Linux is evolving at a breakneck speed. If it is not
better than Windows now, it soon will be. In contrast, Windows 98
is only a tiny increment more evolved than Windows 95. The Linux
people are building on a much firmer foundation.

Equivalents

These are the closest equivalents I could find to the following Windows
95 utilities and concepts.

to temporarily turn off an alias and get at the original meaning of a word,
precede it with a \. To permanently turn it off use unalias.

attrib

chmod
chown

There are three sets read/write/execute
permission attribute bits for each file, one for the owner, one for
the group the file belongs to, and one for the universe at large.
Each file has an owner and a group. A lead dot on a filename is
similar to the DOS hidden attribute. You need ls -a to see them.
Any easy way to maintain this information is with Midnight Commander, mc.

/etc/*rc* execute when you first boot.
.login,
.profile,
.bash_profile,
.bash_login execute when you first login.
.bashrc,
.cshrc execute when you first start a script.

beep

echo -en "\a"

boot manager

LILO

To modify the Linux boot manager modify /etc/lilo_config
then run lilo to parse it and poke the information into the
various absolute locations on hard disk.

call myscript.bat

. myscript

. means run in the same process. Without the ., the new scripts starts
up a new process. exec myscript stops the current script and starts a new one.

cd

cd, pwd

cd changes to a directory, default the $HOME directory,
where pwd tells you where you are now, print
working directory.

config.sys

?

close

kill

command

bash, sh, csh, Zsh,
exec, perl

copy

cp -p, scp

scp can be used inside or outside of an ssh (secure remote)
session. When you use it outside one, it will automatically login,
do the copying work and logout. -R is recursive like XCOPY /S. Watch out
cp ignores directories and files beginning with "."

del

rm

dialler

ppp

dial up networking

rsh (regular), ssh -v (secure)

You can download the source code for ssh from ftp://ftp.cs.hut.fi:/pub/ or
alternatively
ftp://ftp.achilles.net:/pub/security/ssh. When you install Linux make
sure you include the C/C++ development tools so that you can compile this.
The easiest way to set up communication with another host is to exchange
public keys via email and insert the host's key in the
known_hosts file and the user's key in the
authorized_keys file. You can use a null passphrase by typing
ssh-keygen -p.

dir

ls, dir

ls -F will mark each
executable with a *, directories with a /, and symbolic links with a
@. Often ls is aliased to ls -F by default.

Disk Explorer

mc

Midnight Commander. You will have to install
this manually. You will have to mount the CD-ROM first with:
cd /mount /dev/cdrom /mnt/cdrom
and get to the directory where the install files are with:
cd /mnt/cdrom/RedHat/RPMS
then install:
rpm -i mc-3.2.11-2.i386.rpm

edit

emacs, xemacs, nedit, kde, vi, joe,
pico, SlickEdit

Linux editors are highly configurable. They are almost unusable out
the box. You need to edit text files that control how they work.
Catch 22! Without special configuring, even simple things like the Del key
won't work properly. I think the authors deliberately make the default
configurations infuriating to force you, like a tormented oyster,
into learning the configuring tools and creating a pearl.
Slickedit can be configured to behave in perfectly standard CUA fashion. Others can be
coerced grudgingly to sort of behave in a CUA way.

empty afile

: > afile

empty the trash

rm -R '#'*

to get rid of the #xxx files emacs leaves behind as backup. The
single quotes ensure # is not treated as a comment.

You need to periodically use updatedb to update the database
that locate uses. The database does not get updated as a side
effect of creating, deleting or copying or moving files.

finger

finger

free disk space
SNIFF C: D:

df -k /myDir

help

man -k , info, apropos

if "%x" == "orange" echo "fruit"

if "${x} = "orange"
then
echo "fruit"
fi

if not exist myfile.txt echo "oops"

if ! -f myfile.txt
then
echo "oops"
fi

install

rpm

Internet Explorer

Netscape, Arena, HotJava

md

mkdir

more

more, less

MS DOS prompt

shell, bash, sh

password

passwd

passwd is used to change your password. Passwords are stored in
the /etc/passwd file in encrypted form. If any are in plain text, the account
was not properly set up.
The root user can set other people's password with password someUserId.

To resynchronise two directory trees to make them identical,
propagating the newest version of each file in the directory to the other.
You can use the short switches -R and -u.

set

env | sort, setenv, export

shortcut

link, ln -s /usr/local/netscape/netscape netsc

Soft Links will be left dangling if the original file is deleted.
See section later on soft links.

spawn

&

splice cut

split

subst

mount, umount, ln -s-

Before you can use a
CD-ROM disc you must mount it with a command like this:
cd /mount /dev/cdrom /mnt/cdrom
/mnt/cdrom must
be a prexisting, but unused, directory where the CD-ROM files will
appear. Further, it may not be the current directory. Any files
there will be invisible during the time the directory is being used
as a mount. Don't expect a meaningful error message if you violate
any of these rules. Every time you change discs you must umount and
re-mount, as if you were changing a removable disk pack on an ancient
mainframe. Mounts are easier to do with the X Windows control-panel.
Edit your etc/fstab to have two lines in it one for
/dev/cdrom and one for/dev/hda. Use mount point /mnt/cdrom
and options iso9660,noauto,ro 0 0 .

task list

top, ps, ps aux | grep roedy

tasks

tasks, jobs

telnet

telnet

TS (Text Search)

grep -i Abc myfile
grep '$' myfile
grep "$USER:" myfile
fgrep

grep looks for regular expressions. -i allows case
insensitive matches. If your string contains any magic regular
expression character such as []$\{}<>, or space then you need to
enclose it in apostrophes. If you want $ environment expressions
expanded, use quotes.

type

cat

uninstall

rpm -e uninstallPackageName

The catch is, you don't use the same package name to install as to
uninstall! To find out the uninstall names, do a rmp -q -a |
less. Very likely you will want to uninstall the 1.0 Java and replace
it with a 1.1.X.

The first form copies the entire directory, and
Recursively copies the subdirectories. The second form selects
just some of the files by wildcard. find lists the files to
copy and cpio makes the copies. -d means create
new directories as needed.
The third form uses the tar, tape backup utility. cpio can be persuaded to avoid
copying over top of newer files.

.zip

.tar, .tar.gz, .gz

Watch out trying to download .tar.gz files with Win95. The names will get
mangled since Win95 does not live more than one dot per name.
You will have to correct them once you get them to Linux.
See Winzip entry for various utilities to pack/unpack these files.

Installation Hints

Before you start installing Linux, go into the Windows 95 control panel
and glean every obscure fact you can about your hardware, in particular
your video card, video chip, RAMDAC, clock chip, and amount of video RAM.
You will want your modem manual to concoct a good modem init string, one
that insists on hardware compression, that insists on some base speed etc.
There is button to print out a multipage summary. Write down the technotrivia
about how your TCP/IP and LANs are configured.

Installing Hard Disk Partitions

Create all your partitions with DOS's fdisk or Partition Magic
before you start your Linux install. Do not create or delete them
with Linux FDisk or Druid. Use Linux FDisk only to change the
partition type to 82 for standard Linux ext-2 partitions and 83
for the swap partition. DOS won't be able to see the Linux
partition after they are formatted. Partition Magic won't be able
to move or resize them. Linux won't let you shuffle them either.
So do some work planning the sizes. You might consider
installing, then looking to see how full each partition is, then
erase everything and use new partition sizes based on your
newfound knowledge. DOS Fdisk will not be able to erase the
partitions for you. Use Partition Magic, or if you want to live
dangerously, use Linux. (I got my own system is such a snit after
using Linux to create and delete partitions, the only way I could
repair the damage was with a hex disk editor. None of my usual
tools could fix the damage.)

It is hard to know in advance how big to make your partitions. There is
no way to change their sizes later save by erasing everything and starting
over. So it is wise to save some unallocated space on your hard drive
that you can make into a partition later, then move data off one of your
existing overstuffed partitions to it. Also put the Win95 and NT
partition contiguous so you can move the boundary between them. The Linux
swap and root partitions are fairly easy to wipe and redo if the need arises.
Put them next you your Win95 and NT partitions.

You can mount your DOS/Windows partition, either read-only or read-write.
You don't set it up during the sysgen. You add it later with a bit of
fussing. You first need to mkdir a /win95 directory as the mount point.
Then you need to use the control-panel in X windows to add a new
partition. Add, not edit! You need to set its type to "vfat" not
"DOS" It will be added to the /etc/fstab the auto option, so it will be
automatically remounted on any reboot. If you want to set it up before
you get X windows working, you can edit the /etc/fstab to insert an entry
of type vfat, mount point /win95 and options
auto,noexec,nosuid,nouser,rw 0 0. You need to do one mount
/dev/sda1 manually, and from then on it seems to work automatically.

Others to consider making a separate partition:

Name

Size in MB

Purpose

/tmp

?

for temporary files.

/usr/src

?

for application source code bundled with Red Hat.

/var

?

lock files, logs, image of working system.

There are several jobstreams running during the install. You can flip back
and forth with Alt-F1 Alt-F2 etc. or Ctrl-Alt-F1 if under X Windows. To get
back to X Windows use Alt-F7.

Installing Video and X Windows

If you are a masochist, you will love Xfree86. It is almost like a
build-it-yourself driver toolkit but more frustrating. If you want to
spend less than a month of your life solving the problem of making the
screen display something, use Red Hat 5.0 and the enclosed commercial
Metro-X drivers and use configX. Be careful to fill in both panels one
for the monitor and one for the video card, and don't touch the
add button.

If you want to go with XFree, get the latest documentation from http://www.XFree86.org. Getting X
roughly working is fairly easy, but getting it to work in all the
resolutions and colour depths, without huge black borders takes
considerably more patience.
Get the latest drivers from
http://www.kernel.org/.

Use Xconfigurator to configure X-Windows, and X or
startx to start it. Once you have X working you can use the
control-panel that you can access inside X to configure a second
printer, configure ppp access, add users etc.

If Xconfigurator does not work, you may have to start
over from scratch installing Linux or use rpm to make sure you have
the right video driver. Look over all the choices, don't just grab
the first one that looks good. If X still does not work, try
installing fewer video modes in particular leave out some of
the higher resolution ones. I found the old xf86config
line-oriented configuration program gave better results, though it
was more awkward to use. Without it I could not get at the high
resolution modes and I could not change modes with Ctrl-Alt-Keypad+
and Ctrl-Alt-Keypad-. If X hangs on fireup, hit Alt-F1 and you will
be able see some error messages about why it failed. Use xvidtune
within X Windows to fine tune the configuration so that the image is
sized and centered properly on the monitor in all modes. Not that
xvidtune does not change your XF86Config file for you. It just
displays settings you can manually add to it. It may be easier to use
your monitor's adjustments, then adjust other OS's to those settings.

The first entry on the modes line is the one your X windows will
come up in. When you hit Ctrl-Alt-+, it should step through them
in order.
Modes "640x480" "800x600" "1024x768" "1280x1024"

You can control which colour depth your X windows comes up in with:
startx -- -bpp 16

In theory you should by able to permanently configure this by creating
a file in your home directory called .xserverrc with the line
exec X :0 -bpp 16 in it. However, I have not got that to work myself.

To properly solve this configuration problem you have to have entries
that exactly match the documented modes supported by your video bios.
This may require setting up modes that are specific to a colour
depth because your video card my require different rates for different
colour depths with the same resolution. I have yet not found documentation
on how to generate the required magic numbers.

After that is done, you can start thinking about configuring your
.fvwmrc file to configure the menus etc.

Installing Internet Access

There as a plethora (too much of a Good Thing TM) of documentation on how
to get PPP working. I found that the following document was most useful:
http://www.interweft.com.au/other/rhtips/ppp/ppp-tip-6.html.
It guides you through using netcfg under X Windows. It is even easier than
configuring PPP for Win95, since everything is in one place. The descriptions
of the prompts are slightly out-of-date, but nothing you can't handle.
This process generates the scripts, creates the /etc/resolve.conf nameserver
file etc. In going through this process, it often looks as though the system
has hung. What has really happened is a window off screen is demanding
your attention. Scroll around to have a look.

If it does not work, before you panic, view the generated scripts in
/etc/sysconfig/network-scripts with emacs. You may have misspelled
a password or forgotten that everything in Linux is case sensitive. You can test
your connection with by starting up a new shell and running ping in it.
The only thing that document does not cover is creating alias or short
fireup/shutdown scripts so you don't have to type the giant long names
and parameters.

If that is not sufficient, here are some other approaches others have
recommended:

Installing Other Hardware

The standard install program ignores much of your hardware, e.g. tape
backup, sound card, scanner. To use these devices you must generate a new
kernel, or find a pre-built one that has the support you need. I'm told
you can do this with:

More Shells Than You Can Shake A Shtick
At

autoexec script

when run

/etc/*rc*

when the system boots

/home/yourname.login, .profile, .bash_profile

when you log in

.cshrc, .bashrc

whenever you start a new shell

The different names .login, .profile, etc. are used by
different shells, which allows them to co-exist more or less amicably.
The C shell uses .login, the Bourne and Korn shells use .profile,
bash (the Bourne Again SHell) normally looks for .bash_profile
first but may also read .profile.

Re-Installing

When you install. Keep notes on what worked. Sooner or later you will
have to re-install and those notes will be invaluable. Before you
reinstall, save a copy of your /etc directory and your root .bash_profile
outside Linux. The master copies will likely be destroyed. You can do
quite a bit of your re-install simply by copying selected configuration
files back into /etc, or by comparing old and new versions.

Be very careful about copying files to and from a Win95 partition.
You will lose the owner, the attribute bits, and files and directories
beginning with "." will not be copied. Files will be redated.

Naming Your Computer

If you have registered your own DNS domain, e.g. "ark.com", your
computers will have names like "mars.ark.com" and "oberon.ark.com". If
you have not, your computer name should match the last two parts of your
ISP's domain. So for example if your ISP's computer were called
"oberon.ark.com", your computer's hostname should be something like
"cmp.ark.com".

Simply editing /etc/HOSTNAME is not sufficient. Change the name with
the X control panel netconfig.

Your computer also has another name, localhost@localdomain with dummy IP
127.0.0.1.

Gotchas

Here are a grab bag of miscellaneous things that bit me at some point in
my early Linux career.

Alt-F-X or Ctrl-C won't get you out of very many programs. Linux has
never heard of CUA. Each program wants to keep you trapped in there until
you read the entire online manual looking for the magic escape sequence
(other than Ctrl-Alt-Del to reboot). Hint:

Program

How To Get Out

emacs

Ctrl-G Ctrl-M Ctrl-C N yes

less

Ctrl-Q Q

man

Ctrl-Q Q

vi

Esc : Q

vim

Esc : Q

Linux is case sensitive. Linux programmers seem to take great
delight in mixing case in names in inconsistent ways.

Be careful in emacs. Using the arrow keys can add blank lines on the
end of your document if you overshoot out the bottom.

BS and Del don't work consistently. The Linux folk still have not
learned the difference. Backspace won't work until you configure it to
with:
stty stop ^S start ^Q erase ^H

The path traditionally excludes the current directory, at
least for the root user. To execute something in the current directory
you must say ./myProg to qualify it enough to be found.

cp is not quite xcopy. * in a wildcard will not
match files that begin with ".". They have to be specially handled. cp
usually seems to find a way to misread your intentions and create a new
directory tree under the target rather than merging source files with the
target's similar directory structure. By default cp redates files.
Do some experiments.

There are no extensions. Linux examines the first few bytes of each
file to figure out what type it is. Data files don't appear to
automatically launch the corresponding app when you run them. There is
also an executable permission attribute bit (actually three separate ones)
that must be set before you can execute a program.

Wildcards of the form *xxx work in Linux, finding files ending in
xxx. In DOS/Win95 they are uselessly equivalent to plain *. This is an
"ungotcha", a rare and precious event.

XWindows generates a virtual screen bigger than your physical screen.
When you open a window, you might not see it. You have to scroll around
to find it.

The default PATH given to root is different than for a normal user. root,
by default does not get /usr/local/bin on his path. You have to add
it in the .bash-profile.

It is common for programs to come in source form only. Even you have
no plans to develop software in C/C++, you still need the compilers
installed to install software.

If you let Linux write files in your Win95 vfat partitions, it will use
GMT, not local time. Norton Disk Doctor will freak over these future
dated files. It also may cause trouble trying to figure out which file are
really more recent if you share files between OSes.

The rpm install package name is not the same as the uninstall package
name. See notes under "uninstall" in the Win95 equivalents table.

If Linux gets it into its head that your CD-ROM drive is /dev/hda when
it should be /dev/hdb or vice versa, you set it straight by editing the
symbolic link for cdrom in the /dev directory.

if you don't have write permissions for a file, you can still delete
it - but only if you have write permissions for the directory the file is
located in. The Linux people look at this very literally. When you
delete the file, you don't write to the file, you write to the directory.
Every file has an owner, and usually only the ower can touch that file.
The root user can read, write or delete any files.

If you create new script files, they are not accessible via
unqualified names using the path until you have either logged out and in
again, or used rehash.

The control-panel program for adding new users will not
automatically encrypt the passwords. They need to be encrypted
before use. To encrypt them, click CHANGE; don't just enter them in
plain text in the slot marked password.

Command line substitution is complex:

code

meaning

"..."

expand what is inside now.

'...'

what is inside later.

${name}

expand name as a set parameter.

$(name)

run the program name and expand with its output.

$name

old way of doing ${name}

`name`

old way of doing $(name)

Symbolic Links

Symbolic links have many uses:

Creating aliases for files and directories.

Putting a program on the path without adding extra directories to the path.

Divvying up the directory tree over several partitions.

Physically reordering the disk structure without changing any of the scripts that
reference the files.

Create a shorthand for long strings of directory names or long filenames.

The basic idea is:

In some directory,

you put an alias name, a link to:

some other file or directory that exists elswhere.

Let us say that you had a file A/x and you wanted to be able to access it alternatively by that
alias B/y. Here are the steps:
cd /B
ln -s A/x y

emacs

Emacs is an editor that comes in both text (emacs) and X-windows (xemacs) versions.
You can get the four *.rpm files for xemacs from the www.xemacs.org web site. Even without source,
the download is 20 MB!
To further complicate the matter, the text version behaves differently in
text mode and under X-windows. Emacs is a powerful editor with a
great many features. Everything (even the mouse button) works in a
totally non-CUA way. Win-95 users will feel all thumbs and possibly
even seasick when no command works in the familiar way.

Emacs is designed solely for the convenience of advanced users.
You might think if it as a suite of word processing LISP functions.
You edit a file by running in an interactive programming mode where
you compose and execute a LISP program on the fly where each
keystroke invokes one LISP function.

To begin to make it friendly, (bind home jump to start of line
instead of start of file, bind end jump to end of line,
bind ^@ behave like Shift-^@, and bind ^- to behave like
^C_) create a .emacs
file in your $HOME directory like this: