This document is designed to help a naive user install and get started with Red Hat Linux 4.2 or 5.0 It presumes you are familiar with Windows 95. I am a Linux virgin, so take 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.
Win95 | Linux | Notes |
---|---|---|
+ (concatentation) | cat | |
< (input redirect) | < | |
> (output redirect) | > |
1> redirects stdout, normal output. 2> redirects stderr. 2>&1 redirects stderr to go to wherever stdout is going. |
| (pipe) | | | tee splits the stream to both the console and a file. |
alias (4DOS) | alias | to temporarily turn off an alias and get at the original meaning of a word, preceed 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. |
autoexec.bat |
/etc/*rc*, .login, .profile, .bash_profile, .bash_login, .bashrc, .cshrc . |
/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 informantion 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. |
Eudora | Pine | |
exit | exit | |
file/disk space used, Norton FS | du -s /myDir | |
find | locate xxx find / -name xxx -mount which xxx type xxx whence xxx find / -type f -print | xargs grep -l "String To Search For" find / -type f -print | xargs grep -li "String To Search For" |
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. |
move | mv | |
Netscape | Netscape | |
path | echo $PATH | |
lpr nenscript cp afile /dev/lp0 |
lpr adds files to the print queue. nenscript converts text files to PostScript | |
PVCS | cvs | You can download the source for the cvs version 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/* dir2 cp --recursive --update dir2/* dir1 |
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. |
who is logged on? | w | |
Win95 | startx, X Windows, Fvwm | F* Virtual Window Manager |
WinFTP | ftp, ncftp | |
WinZip | tar -xvzf afilename.tar.gz tar -xvf afilename.tar gunzip afilename.gz unzip afilename.zip emacs |
with emacs configured with (auto-compression-mode 1). |
xcopy | cp -R /sourceDir /targetDir find . -name '*.c' -print | cpio -pd /targetDir tar cf - myfiles* | (cd /targetDir; tar xf -) |
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 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. |
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 Linux. |
swap | 200 | to swap out programs too big to fit in RAM. |
/ | 50 | root directory. everything needed to boot. My SCSI 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 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 contigous so you can move the boundary between them. The Linux swap and root partitions are fairly easy to wipe and and redo if the need arises. Put put them next you your Win95 and NT partitions.
You might need to put a little Linux root partition totally below the 1024 cylinder mark.
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.
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/pub/linux/distributions/redhat/redhat/redhat-4.2/i386/RedHat/RPMS/
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 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 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 configuing your .fvwmrc file to configure the menus etc.
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:
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/.
CD /usr/src/linux make configThough I have not had quite the nerve to try it yet.
For a sound card you may want $20 commercial drivers from http://www.4front-tech.com.
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.
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.
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.
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 |
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 ouput. |
$name | old way of doing ${name} |
`name` | old way of doing $(name) |
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:
(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 everybody.
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 binding for M-w. Have fun!
Title | Author | ISBN | Publisher | Notes |
---|---|---|---|---|
The Linux Bible | 1-883601-20-7 | Yggdrasil Computing | very thick, the Gnu Testament. | |
Running Linux | Matt Welsh and Lar Kaufmann | 1-56592-151-8 | O'Reilly | good introduction to Linux and Unix in general |
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 |
![]() |
![]() |
|
Canadian Mind Products | You can get an updated copy of this page from http://mindprod.com/linux.html |