[Scottish] Hopeless newbie part 2

Colin McKinnon colin.mckinnon at ntlworld.com
Tue Sep 20 20:50:19 BST 2005


On Monday 19 September 2005 20:34, Steve Logan wrote:
> Here's what I've got:
> - a boxed copy of Suse 9.1 which I bought ages ago and have finally
> installed on a Del PIII 500 with 768MB RAM and a couple of IBM 80GB drives.
> - Suse manuals for 9.1
> - a copy of Suse 9.3 from Linux Something mag this month
> - a bunch of Oreilly books on Apache.
>

Although I'd recommend 9.3 over 9.1 beware - discs stuck on the front of 
magazines are often cut down versions (to fit everything on one cdrom).

> - Conceptual #1.  I'm struggling to figure out where Suse/Linux puts
> things.  On XP, on the whole, programs are installed (by default) in
> c:\Program Files, dlls etc in C:\Windows and subdirs, user data in
> C:\Documents and settings\User\ and sub dirs.  Is there a direct Linux
> equivalent?  And I'm beginning to think that Suse ain't the same as
> Redhat?  Can you give me a HoNe Rule Of Thumb for where to find stuff?
>

The layout of Unix systems harks back to the days when disks were small, slow 
and very expensive but have evolved to accomodate things like diskless 
workstations. Typically you will see the same dirs in the root of any unix 
box:

/bin
/dev
/etc
/home
/sbin
/tmp
/usr
/var

the /sbin dir contains programs which run automatically or are for root to use 
only. Typically this is just for botting up the computer, with more esoteric 
admin functions in /usr/sbin. Similarly /bin contains contains basic user 
tools (like shells, 'ls', 'cp' etc) while more complex (or larger) programs 
live in /usr/bin. Configuration files are usually found in /etc. Normally, 
users only control files in their home directories (in /home). /var contains 
things which are more dynamic - log files, printer spool dirs and such. 
Temporary files go in /tmp (or more correctly these days /var/tmp). That 
just leaves /dev. One of the original ideas in Linux was that everything could 
be treated as a file - so you can print something by appending it to the 
device your printer is attached to ('cat stuff.txt >>/dev/lp0') and you can 
also do really bad things to your disks ('dd if=/dev/hda count=1 | cat -v' is 
a handy way to find out what bootloader you are using - kudos to Lawrence 
Sweeney for that one). 

These are not hard and fast rules - just a convention. 

On a Linux box, you'll also find /boot (kernel images) and /proc (a virtual 
filesystem providing an interface to the running kernel).

A modern Linux box will also have /opt which contains larger packages 
(including OpenOffice and KDE on a SuSE box).
 
...but you just want to run a program? OK. Hopefully you'll get an icon 
installed somewhere you can click on, but suppose you want to know more about 
a package? The spreadsheet entry in my SuSE menu runs a program oocalc
It doesn't specify a specific directory, so it's probably on the PATH 
somewhere - I can use the 'which' command to find it:
colin at kermit:~> which oocalc
/usr/bin/oocalc

I can now find out which package this belongs to:
colin at kermit:~> rpm -q -f /usr/bin/oocalc
OpenOffice_org-1.9.79-9

and I can find some more information about the package by:
colin at kermit:~> rpm -q -i OpenOffice_org-1.9.79-9

(actually, you don't need to specify the version number - just `rpm -q -i 
OpenOffice_org` would suffice).

And you can list all the files in the package by
colin at kermit:~> rpm -q -l OpenOffice_org

> - Conceptual #2.  Being a big Firefox fan I downloaded the RPM from
> mozilla.org to my desktop (as root) and ran it.  It seems to have
> installed in a directory under the desktop, which, I suspect, isn't
> correct.  Where should I have put it so that all users can run it?
>

The rpm file usually defines where the contents will be deposited so it won't 
make any difference where you put the rpm file (and should probably delete it 
afterwards). Firefox comes with SuSE as standard - lifes a lot simpler if you 
get as much stuff from the same distributor as possible. I'd recommend you 
track down the proper SuSE rpm, remove the Mozilla one and install the SuSE 
rpm instead.


> - I installed Webmin (sort of), ie I downloaded the RPM and double
> clicked on it.  I suspect that I've got another of these strange 'where
> are things supposed to be' problems because Webmin can't find my Apache
> 2 install (which I did directly from YaST from the CDs).  So, two things
> (a) is Webmin a Good Thing? (b) What do I need to do to get it working
> (that's probably a dumb question!  I have tried using YaST to install
> the Webmin from the CD set but YaST appears to bomb out without doing
> anything).
>

Have you tried running the online update from Yast first - there are several 
Yast patches to install. The CDs have lots of rpms on them - I'd suggest 
finding the right file on the CDs and instaling it from the command line 
(Yast hides most of the messages when installing rpms).

> HoNe Q1: How do I uninstall apps?
>

Use Yast, or uninstall from the command line using the rpm command again (this 
time with the -e switch) e.g.

rpm -e OpennOffice_org

(you need to be root to install/upgrade/remove packages).

> HoNe Q2: I've got this Suse 9.3 from the Linux mag.  Can I 'install'
> that over what I've got?  Will I lose anything (eg YaST online update or
> similar?  I'm hazy as to what I get for paying fifty quid for the boxed
> version of 9.1 vs the free versions)
>
See comment above - you can download the whole of 9.3 if you've got unmetered 
bandwidth.

SuSEs manuals are excellent and there's not a lot of difference from the docs 
point of view between 9.1 & 9.3

Good luck,

C.



More information about the Scottish mailing list