Text 601, 311 rader
Skriven 2004-09-02 18:37:48 av Pascal Schmidt (1:153/401.2)
Ärende: Linux FAQ (3/5)
=======================
----- xac begins -----
instructions, and a list of files that belong to the package. The
package manager software of the distribution keeps track of all
that information. By use of the package manager, it is easy to
install and uninstall software, and uninstalling usually leaves
no trace of the package ever being installed on the system. The
package manager also checks dependencies when a package is
installed, so that the user gets to know when something is missing
that the package needs.
Different kinds of packages and package managers are used on
different distributions. One way to classify them is by the file
name extensions used by the package files:
.rpm - these are files for the Red Hat Package Manager (RPM), used
on Red Hat and other RPM-based distributions
.deb - these are files for the dpkg package manager used on Debian
and Debian-based distributions
.tgz - these are binary tar/gz archives used by the pkg tools on
Slackware and Slackware-based distributions
Some distributions don't use package management. Consult the docs
of your distribution to find out what kind of packages it uses, if
any. A special case are the so-called source based distributions:
these compile the whole system from sources and are generally not
based on binary packages.
An incomplete list of RPM-based distributions: Red Hat, Mandrake,
SuSE, Lycoris, Yellow Dog, Ark.
An incomplete list of DEB-based distributions: Debian, Lindows,
Libranet, Xandros (former Corel), Knoppix, Gnoppix, Morphix,
Mepis, Damn Small Linux.
An incomplete list of TGZ-based distributions: Slackware, Yoper,
Vector.
An incomplete list of source-based distributions: Gentoo, Lunar,
Onebase, Rock Linux, Sorcerer, SourceMage, Linux From Scratch.
+-+
2.3.1 RPM-based package management
Contributed by: Pascal Schmidt
As RPM seems to be very common in today's distributions, here is a
short overview on the basic commands:
rpm -ivh foo-1.0.i386.rpm install package foo
rpm -Uvh foo-1.1.i386.rpm upgrade foo
rpm -e foo get rid of foo
rpm -q foo check if foo is installed
rpm -qa list all installed packages
rpm -qi foo what the heck is that foo?
rpm -ql foo what files are from foo?
rpm -qd foo what documentation comes with
foo?
rpm -qc foo where are the configuration
files of foo?
rpm -qf /some/file what package is /some/file from?
Most of these work for ordinary users, but install and upgrade
require superuser (root) privileges.
+-+
2.3.2 DEB-based package management
Contributed by: Francois Thunus, Pascal Schmidt, Russell Tiedt
Distributions using the dpkg package manager usually also come
with the apt frontend that automates many tasks that dpkg cannot
handle on its own. For example, if a package you want to install
has some dependencies that you don't have installed, apt can
automatically download and install the needed additional packages
for you. Some basic dpkg/apt commands:
dpkg -i foo.deb install package foo
dpkg -r foo remove package foo
dpkg -l list installed packages
dpkg -l | grep foo is package foo installed?
dpkg -L foo list files from package foo
dpkg -S /some/file what package is /some/file from?
apt-get install foo install package foo
apt-get remove foo remove package foo
apt-get update download fresh package list
apt-get dist-upgrade install available upgrades
apt-cache pkgnames list installed packages
apt-cache dumpavail list available packages
apt-cache search <keyword> find package by keyword
apt-cache show foo show information about foo
Package installation and removal, and the update and dist-upgrade
commands of apt-get only work for the superuser (root).
+-+
2.3.3 TGZ-based package management
Contributed by: Pascal Schmidt
Here is a list of the most basic package management commands for
use on Slackware/TGZ-based distributions:
installpkg foo.tgz install package foo
upgradepkg foo.tgz upgrade package foo
removepkg foo remove package foo
All require superuser (root) privileges. A menu-driven interface
to package management is provided by the "pkgtool" application.
+-+
2.4 I come from DOS. Is there a DOS-to-Linux command map?
Contributed by: Pascal Schmidt
There is. Look for the DOS-to-Linux HOWTO, probably installed in
/usr/doc/HOWTO on your system. There actually was such a list in
this FAQ (contributed by Pasi Jaernstedt), but I chose to remove
it because the one in the HOWTO does the same thing and is easily
available on most/all distributions.
+-+
2.5 Is there a way NOT to type in silly long names like
StarOffice.5.1.a.rev-2.i386.glib2.1-4.rpm
Contributed by: Francois Thunus, Pascal Schmidt
When using bash (the Linux default) or tcsh as shell, there is.
For the example, simply type in "Star" and then hit the TAB key.
You only need to type in as much of the filename as is needed to
make it unique. If you press TAB when there are still multiple
choices possible, the shell will either beep or print out all the
possible filenames. If it beeps, simply press TAB again to get the
list.
This also works at the start of the command line for commands. Try
typing in "a" and then hitting TAB once or twice. This will show a
list of commands starting with "a".
+-+
2.6 What about those permissions?
Contributed by: Pascal Schmidt
Most Unix filesystems and also the ext2 filesystem used on most
Linux system offer permissions which can limit access to files and
directories in numerous ways. To the filesystem, there are three
seperate "groups" that can access a file: the owner, the group and
all others. Each of these three can have read, write and/or execute
permission on a file or directory. The permission are often written
down as a sequence of nine characters like this:
rwxrw-r--
The first three letters indicate the permissions the owner of the
file has, the second three the permissions of the group the file
belongs to, and the last three show the permissions that all other
users on the system have. A dash means this particular permission is
not set. A file with full permissions for all would have:
rwxrwxrwx
You can see the owner and group of a file or directory with the
command "ls -l". You can change them with the "chown" and/or "chgrp"
commands. The permissions themselves can be changed with "chmod".
One thing that may be confusing about permissions is that there is a
different representation for them using numbers. In that system, "x"
is 1, "w" is 2, and "r" is 4. The permissions of a file can then be
given as a number triplet, with each individual number indicating
the permissions for one of the three different "groups". If you have
something like "rwx", this is handled by adding the relevant num-
bers, in this case 4+2+1=7. This means "rwxrwxrwx" is the same as
777, and "rwxrw-r--" is 764.
What the permissions mean is different for files and directories.
For files, "r" allows to read the contents of the file, "w" allows
to write to the file, and "x" marks a file as executable (different
from Windows, where the extension of a file decides whether it is
executable). For directories, "r" allows listing the directory with
the command "ls", "w" allows creating new files and deleting files,
and "x" allows to enter the directory with "cd". Note that "w"
permission on a directory is enough to be able to delete a file.
People often assume you cannot delete a file you do not have write
permission to, but this is wrong.
+-+
2.7 What about Office software for Linux?
Contributed by: Francois Thunus
Note: StarOffice is superceded by OpenOffice, at OpenOffice.org. I
have an extensive experience of StarOffice both under Linux and under
OS/2. As far as StarOffice 5.2 is concerned, I'll say one thing: I
took it OUT and went back to 5.1. The main reason is that 5.2 is WAY
slower than 5.2 (on a 64Megs station, don't even dream about using
5.2 unless you have a lot of spare time). 5.1 _can_ be used on a 64
Meg station after initial load time.
My experience is limited to StarWriter, I have absolutely no ex-
perience whatsoever of StarCalc, the spreadsheet module. StarWriter
is very compatible with word. You can easily read docyments, and you
can save in winword 6.0, word95, or word97, a feature which, by the
way, was taken OUT of 5.2 and subsequent version, or if it still is
there, it's well hidden. As far as we are concerned (the whole com-
pany runs under Linux), its capabilities are sufficient for most
documents EXCEPT when they use strange fonts. We keep one dual boot
machine for such cases with a copy of word, and use it mostly to read
the doc and re-save it in another format (99% of the time rtf).
As far as gnumerics is concerned, it is compatible enough for me, who
never uses a spreadsheet :-) All I need is to visualize data sent by
others. I have had one problem with a formula not recognized, but
that's about as far as it goes. gnumerics saves in a lot of format,
including xml (native), html, and Excel95.
Three other possibilities worth mentionning: AbiWord also reads most
Word documents, but sometimes loses some formatting on complex docs.
It will do for most of the people's need. It doesn't save in doc
format but saves in 2 rtf formats and a LOT of others. This weights
only 3 megs, as opposed to the several hundred for StarOffice, but
it's only a wp.
Hancomm.com (or is it hancom.com ?), a korean company which has
developed a suite compatible with Office. I liked most their pre-
sentation module, but their wordprocessor fares ok too. I haven't
tested their spreadsheet.
Finally, there is WordPerfect 8.0 which can also read word documents.
The main problem with WP8 is that its rtf support is a joke, which
limits a lot the exchanges with anything else since it doesn't write
the word format.
There is also the koffice and Siag suites, but I have never tried
them.
+-+
3 What hardware does Linux need?
Contributed by: Francois Thunus
Linux needs a 386 with 4 megabyte of memory. If you want a Unix
system on an 8088/80286, you will have to use ELKS (Embedded Linux
Kernel Subset) or Minix. However, this is the minimum to get a
running system. This doesn't mean that it is actually fun to work
with. In particular, if you intend to work with X Window, you will
need to have more RAM if possible, or a big swap file.
Note that Slackware is the only distribution that will still in-
stall on a system with only 4 megabytes of memory. Most modern
distributions need at least 8 megabytes to install. However, once
the install is done, and provided you have enough swap space, you
can go back down to 4 megabytes.
+-+
3.1 Does my <insert-name-here> device run under Linux?
Contributed by: Pascal Schmidt
A good place to start looking if you want to know whether some
piece of hardware will work with Linux is the Hardware-HOWTO. It
lists a lot of hardware for which Linux drivers exist. It may help
if you know what kind of chip is used on your particular device.
Sometimes the HOWTO will just say "devices with this or that chip
should work", so you better know what you have at hand. ;)
As Linux is becoming more and more popular, some companies have
begun to write Linux drivers of their own for their hardware. You
will sometimes find information on such drivers on the homepages of
hardware companies. Or just send them email. Even if they don't
have Linux drivers available, it may be a good thing to remind them
that there are Linux users out there who may want to use their
products.
+-+
3.2 Will my WinModem or WinPrinter run on Linux?
Contributed by: Pascal Schmidt, Francois Thunus
There are hardware devices called WinModems or WinPrinters which
are not very likely to work with Linux. These devices generally
are dirt cheap, and use up a lot of the CPU power of your machine
to do their work. In the case of a WinModem, the digital-to-analog
encoding will not be done by the modem, but by your computer.
Most people wouldn't call such a device a modem, but marketing has
decided to label them so.
There are two problems with that kind of hardware: first of all,
there is almost no standard for them, so it's not possible to write
a standard driver for WinModems. Also, some/most of the manu-
facturers keep the inner workings of their "modems" a secret. The
second problem is that such drivers would need to run at very
accurate timings (to emulate the analog modem sounds), which is
not easily possible on the Unix approach to scheduling.
The good news is that people are facing the challenge and try to
----- xac ends -----
--- Msged/LNX 6.1.1
* Origin: By order of the king, the city must empty. (1:153/401.2)
|