Skip to content

Oh Linux Heads..

Archived

34 replies · 1,307 views

This is an archived legacy thread. Replies are closed, but the discussion is preserved.

Cambo, you would be proud of me. I downloaded my own copy and burned a cd of Ubuntu 8.10.

I would like to boot it from the cd. Ubuntu is NOT Windows so I need to play with it and get used to it.

Hey it is free and I'd like a new toy to play with. I did this with Open Office and have been quite impressed.

But,try before you buy, okay?

How do I boot from a Live CD?

Any resources for a newbie like me?(like Ubuntu.com etc)?

0 likes

i don't know anything about linux.

but i read the title of this thread to the tune of 'oh christmas tree' (or 'oh tannenbaum').

that is all.

0 likes

Couple of options.

When you switch on, does your machine mention a key for "boot menu" somewhere near the "press (whatever) to enter setup/Bios"? If so, hit the appropriate key, and when the boot menu pops up, select your CD/DVD drive from the list....Job's a good'un.

If it has no such message, hit whatever key it says for getting into BIOS/Setup. In their poke about until you find the boot order settings, shuffle them about (how to do this is always easy but differs on different machines) until the CD/DVD comes before the hard disc. That should do the trick, and provided you don't do anything daft like leave it without the hard disc listed at all, it will still boot into Faildows as normal if no CD is in the drive.

As for help....here's an article I wrote about the commandline (with a little help from Sunil Patel). I searched all over for a copy online, and all I found were a million people saying I was brlliant and even someone calling me a linux developer (I can't code my way out of a wet subroutine). Of course you will start with the point-and-drool windows type interface, but you'll soon see from reading this that even the most basic commands can do things that would take ages with a mouse, in seconds. Ignore the but about RPM Ubuntu is Debian based and does not use it.

Newbie's Top Ten Commands

This is it, the Moment all you newbies have been waiting for, this is the list of the top ten commands that every new linux user should learn about to save time, effort and usenet flames. It is not intended to be a full description of the commands, rather it is a guide to the power of Gnu/Linux with some immediately accessible examples to try out (something that most technical documents omit, but which I believe are essential in getting the ideas involved into virgin skulls).

I want to get two things clear from the start.

First......Where the hell do you USE all these commands....

We use them in a terminal sometimes called a console. You may think of them as DOS-boxes with attitude. Linux is well specified with terminals There are at least five different ones on most distro's. The easiest to get to are the ones from KDE and Gnome as these both have icons on the "taskbar" in their respective environments. My personal choice is Eterm at the minute, as it is fast to open and has very pretty background pictures:). They all do the same job, just play about until you find your "flavour". You can also use these commands in the non-gui runlevels or in the "Virtual consoles" that you can access by pressing control-alt- and F1-F6

Second......Why the hell you should bother.Or... "it's not the 1970's maaaaan"?.

Easy, all computers work faster when run from a commandline....even Windows!!. In truth, the nice mouse driven gui's you may be used to are nothing more than the curtain behind which the little old chap sat in "The Wizzard of Oz". This is even true in MS OS's, when you click a button, it sends a command to a program, nothing more The main difference with Linux is that none of the functions are hidden in obscure dll's or the regis...ugh...regi....that THING that IT uses. I will race any man, woman or small furry creature from alpha-centauri, with a mouse against me with my keyboard, in ANY OS!. ( I must admit to an unfair advantage owing to having no mouse on my Atari STe for three years, during which time it gigged it's little ass off in dark vibrating rooms.) Please don't think that the commandline in Linux means it is somehow antiquated, nothing could be more false, always remember the "Curtain" I mentioned.

Or perhaps a better way of putting it is " Switch off your mouse, reach out with your feelings, use the force":)

Now, in the tradition of top ten chart run-downs the world over, we are going to do this in reverse order, starting with the least useful (or rather least MOST useful) command and working up to the "Big Guns". Each command will come with at least one decent example of what you can do with it, with many of them however, there are many more functions than those I will discuss. So here we go (begin playback of chart rundown music appropriate to your nation)...............

Number 10. ls Number 9. tar Number 8. permissions suite Number 7. RPM Number 6. locate Number 5. grep Number 4. cat Number 3. pico/nano Number 2. man Number 1. apropos

No: 10......ls...........And friends

I like to think of ls as being short for "list" whether it is or not, it is a good way of remembering its function. It is roughly equivalent to Dos' dir command, but with a few more clever functions. To obtain a directory listing, just type ls. To obtain a listing for a directory other than the current one, just type (for example) ls /etc; this will show you the contents of "/etc" (where most Global config files live). To see more info about the files you can use the -l (for Long) option thus... ls -l will show you the contents of the current directory in more detail, including the owner, group, permissions and (if it is a Symlink) the file to which it points. Hidden files may be shown with the -a option (always worth trying if you are sure that a certain configuration file ought to be there but you can't see it).

ls can also be used to see a listing of all the directories contained in the current one (subdirectories) by using ls -d */ and in a mandrake distributed Linux, you will find that some kind soul has put in an alias for this that enables you to enter merely lsd (an old hippie me-thinks). To GET to one of the directories you have just listed the contents off you can use cd. cd in Linux is, again, similar to DOS. You can specify a relative or absolute path. Err what..? Easy let's say you are in your home directory: "/home/newbie" and you want to look in your "News" directory. You can use either cd ./News (the "./" in front means 'start in this directory'), or just cd News as the cd command defaults to looking in the current directory for the one you asked it to change to . Now suppose you wanted to get to "/etc", well you could type cd ../../etc (the ".." means 'up one level', just like it does in DOS. However, you can also specify an "absolute path", meaning one that starts from the "/" or "root" directory. You do this by starting the directory with / like this: cd /etc and to get back to your home directory: cd /home/newbie ( Neat trick: cd ~ takes you there too and you can use ~ just about anywhere when you mean your home directory) . By default you will generally see only the name of the directory you are in at your prompt. To see the full path of that directory, use pwd which stands for "Print Working Directory" and is good for those "OK, where the hell am I?" moments. That just about covers what you NEED to know about cd, now back to ls.

The output of ls can be long to say the least and can be something of a nightmare to follow as it spits up the page. Let us welcome the twins less and more , these are actually two little programs that are fairly synonymous with one another, well enough so that the new user should just be able to use which ever one he/she thinks looks better. Their function?...to pause the stream if stuff flying out of ls (or any other command that throws megagobs of information at you) at the end of each page by saying......well, "more?". Hitting any key will advance a line and hitting space will advance 1 page. You can abort by pressing the "Q" key. Ahh, I hear you cry, how do I get this more thing to show me my directory? Well, welcome to the "pipe" symbol | and with it, some of the real power of Linux. You see, the underlying philosophy here is to build complex processes from small, easily understood ones, and piping is the key to doing this. The | symbol stuck between two commands takes the output of one and gives (pipes) it to the other. So, to get a nice pausing directory display you pipe ls to more like so: ls | more of course you can use all your ls options as well: ls -la | more is cool too. If the fancy takes you, you can also use less instead of more.

No: 9......tar..............plus supporting features.

So what is this tar thing you all hear about? Well the name is short for Tape ARchive, "oh how relevant to my desktop {NOT}" I hear you say; well you may be surprised. tar comes from an age before "zipping" when the best way to compress several files was to build them into one, thereby saving on the disc space used in all those files. Although the amount of data stays the same, much space and file system strain is saved this way, for reasons that....well for reasons you can damned well go and find out for yourselves; what am I, a history professor eh? EH? :¬P. Also it was good to keep the backups in a single file called "unflog" or something, for retrieval purposes. The command is really designed to work on directories (it can be used to pick up specific files though). In general, extracting the contents of a ".tar" file will produce a directory of the same or similar name to the original file.

Ahh, but what are these ".tar.gz" files? Well as computers got bigger and file sizes got silly, serious compression became necessary for good archiving, enter gzip. Essentially this does the same job as "WinZip or "Pkzip" (there other Linux compression programs, but we will stick with gzip as it is the one you are most likely to come across). It squashes files by a system not unlike the following: "Lets take a file that holds "000000000000000", now that takes up 15 bytes of space. However I can say "15 0's" in 4 bytes: (1, 5, space, 0....ignoring the 's as it is only there to make it read right for you)". In practice this method used comes under the heading of "Scary Maths", but the idea is the same. A ".tar.gz" file is a ".tar" file that has been passed through gzip to shrink it. Alright, lets get down to business, how do you extract one of these things..?

Quick and dirty solution coming up. Change into the directory containing the victim, err, I mean file. now issue the command tar -xzvf ./foo.tar.gz. The options are: x(extract), z(use gzip to unzip), v(be verbose, we want it to tell us if it fell over, not keep the info to itself) and f(Use the specified filename, perhaps a hangover from it's tape heitage). The ./ is not strictly needed, but it is always good practice to use it when dealing with the correct directory, until you get it into your head for running programs when it IS required to run one in the current dir. Now in the current directory you should now see a new directory created from the ".tar" file, cd into it and there are your extracted files. Very often these will be the "sources" for a program and will require you to compile them. I have included a bluffers guide to compiling lower down on this page.

Of course, you can use tar and gzip to make a new "tar.gz" file (or "tarball" as they're often called). Let's say you wanted to make a complete backup of your home directory so you can restore it if whatever disastrous tweak you are contemplating goes hideously wrong. Here is the command for it: tar -cvfz ./backup.tar.gz /home/newbie/ reading this from left to right the options (or arguments)...the letters after the "-" are, in plain language. c - Create the file I specify (./backup.tar.gz), v - tell me what you are doing, f - don't argue, z - and then zip it please. You may need to be root to do this as some configuration files in your home directory may belong to root. This will create a nice shiny new tarball with your home directory in it, in the current directory (see the ./ before backup.tar.gz), it is up to you where that is. Note: Another reason you may have to be root to do this procedure is that users may not have access to the directory you are trying to make the archive in.

That about covers the basic, "get-you-up-and-running" features of tar but believe me when I say there are a LOT more options!

No: 8......The access and permissions commands

The WHAT? Well unlike a certain other "OS", Linux has a feature called "security". This means that many users can live happily on one machine without ever treading on the toes of another user or on the system itself. To achieve this, it uses a system of "permissions", which are just what they sound like. In all honesty these can cause more newbie upsets than anything else. They can also lead to one of the most common and readily available ways to hose (destroy) a perfectly good system (ie: logging in as "root").

So, what do these permissions look like? If you recall from our little journey into the realm of ls, you can see the permissions for files by typing ls -l (l is for "long", remember). To the left of the directory listing you will see a 10 character readout of the permissions. It looks a little like this -rwxr--r--, yeah wow, that's helpful! OK maybe not, so lets look at the breakdown.... The first column we ignore (it is a special column that contains certain other flags about a file, for instance a directory will have a d here. So, we are down to nine, well that nine are actually 3 sets of 3. Lets look at the first set of 3: rwx these mean the file has read, write and executable permissions set, meaning (rocket science bit) that it can be read, written to (ie: modified) and run as a program or shell script (executable).

OK, that makes sense (doesn't it?), but why the other 6 and what is a -? Well the first 3 we have looked at are the permissions for the file's "owner", that being the person who created it. The next 3 are the permissions for that person's "group" and the 3rd lot are for the rest of us, or the "world" as Linux calls us. So a group is..? A group is, well, a group, for instance if you were working on a large network, as part of a project developement team, your group would be the other members of your team, and you may want them to be able to share files with you. Groups are not as vital on a stand alone desktop machine as on a large network, but the system still uses them to determine certain things like who gets to hear sound ( ie: the "audio" group) or play with the CD-ReWriter. This brings us to "-", this simply means that the permission is not set. So if we return to our example we now know that this file can be read, written and run by it's owner and that both the members of his group and the rest of the world can read it but nothing else. The file's owner and group name are also listed by ls -l.

As you can see it is easy to keep a file totally private, by merely setting it's permissions to -rwx------ . Err how do you change them? Let us welcome the chmod command to the party. The file's owner can use this to change the permissions on the file, "root" can also change any file on the system (keep repeating, "root=God@localhost"). So how exactly is this wonderous miracle of security achieved? Well there are 2 syntaxes (or is that syntaxen or syntae or...shuddup!), you can use to talk to this command, and they can both be obscure to the newbie. I don't want to get too deeply into it, so I will demonstrate a couple of the most common uses. First and most common is getting a file to become executable. This may sound odd, but many "runable" files, especially shell scripts may arrive in your posession from a variety of sources with the execute permission turned off. So what do you do? Well, adding a single permission to a file is easy, say you have a game demo that contains a file called "runme.sh" that wont run, we would type: (in the same directory as the file) chmod +x ./runme.sh this should add an executable permission for everyone (owner, group and world).

However, this is a little brutal, and we need a more targeted way to do this. This is where the first set of options for the chmod command come in (err, first set?...yup, those that come before the +/- rwx ones). These specify, who you are making the change for either u(ser, the owner), g(roup), o(ther, or world) and a(ll). So if we wanted to make "foo.txt" group writable for instance, we would issue: (from the directory containing the file) chmod g+w ./foo.txt. The general format in english is "chmod who +/- what" and if you leave the "who" part empty you get user, group and world, all set to whatever the "what" part specifies. Now, above I mentioned that some chmod operations require you to be "root" (for instance changing permissions on a file that belongs to a user other than yourself, or on a system file. Now you could logout and then log back in as root, but that would quickly get on your nerves, so the great elders bestowed the su command on us. With parameters added, su lets you become another user: su username , but on its own it means, "I wanna be ROOT!". In either case you will need to know the password for the username you wish to become, including "root". This applies for anything that says "permission denied" and for some that say "command not found" (some commands, like updatedb or reboot, live in the directory "/sbin", which is only part of root's path). As a rule, when told to clear off by the shell, become "root" and see if that scares it into submission.

But, why dont I just login as root all the time? A million good reasons but I will give you two: 1. If you are on the internet as root, your system is much more open to attacks. 2. If you aren't root you cannot hose your system. OK I am going to say that again only louder, If you are not root, you can NOT hose your system! You can blow 7 shades of sh** out of your user account and render it dead or at least very sick indeed (this is when the home dir tarball made earlier comes in handy). But if you login as a different user, all will be well. Login as "root" and screw up, and well, it could be a sad day for you. So keep saying, "Do I need to be root to do this?", if not, dont!!

There is one other important command in this suite that you should know and that is chown or "change owner". Bit of a no-brainer actually, you can figure it out on your own as a little challenge (don't be root when you do in case you mess up and change ownership on the wrong thing). It is unlikely you will need it much, but sometimes it comes in handy to convert a program or script that someone else gave you, to be your own.

No: 7......RPM

What exactly IS this "rpm" thing you keep seeing? RPM is short for Redhat Package manager, and is a package management system developed by Red Hat. (It does exactly what it says on the tin!). RPM keeps track of the software installed on your machine so that versions don't conflict amongst other things. A ".rpm" file then is the "ammunition" for the weapon and will typically contain a bunch of files, an install script that can be used by the rpm program, a list of dependencies (other files or packages that are required in order for this one to work correctly) and an uninstall script. You could think of it as a GOOD version of the "Installshield" system you may be familliar with from Windows. The main difference is that the full range of the system's capabilities are available to the end user rather than just the developer who built the package.

The things that RPM can do are fairly terrifying, but thankfully, as with many Linux commands, there are a few simple everyday things it can do that are damned useful. But why do I want to use the silly command line version when I have this nice shiny package manager application? Well there are just so many more fun things to do, so here goes. Want to install a package? Get yourself into the directory that contains the ".rpm" file and type: rpm -Uvh --test foo.rpm translation: U=upgrade (now you can use -i if you KNOW there is no version of the package already installed, but heck U will work too so I just always use it, since you can't go wrong), v=verbose (rpm is pretty tight lipped even with this turned on), h=hashes (makes a nice line of hashes ####, to tell you how it is getting on, requires v I think) and finally --test means "do a run-through of this procedure and tell me if it looks alright", similar to the "dummy-run" mode on CD burning software, but much less likely to cause a seizure in the user who turns it on by accident (if I had a penny for every 25 mins I have wasted waiting on a message that says "well if I HAD burned the CD it would have been cool", I would buy a faster roaster, but I ramble...).

Anyway --test will tell you if there are any dependencies you need to satisfy for the package as well as any other potential hassles. The single coolest thing about --test (and DO pay attention here 007!), is that you can "batch test" a whole directory full of rpms. This comes in handy when trying to upgrade a major component like KDE or XFree86. Without the ability to issue rpm -Uvh --test ./*.rpm any normal human being WILL lose their minds trying to work out whether anything external is needed, it is hard to explain, but trust me, this little gem will keep you sane. As will the fact that once you have tested them all you can drop the --test bit and just type rpm -Uvh ./*.rpm again this will do them all at once thereby saving the user having to figure out the correct installation order (the same thing is also to be done for the single rpm we first mentioned, removing --test will do the actual install).

Right, so what about removing rpms, dead easy: rpm -e packagename. Or what about finding out if a certain package is installed and if so, what version: rpm -q packagename. It may help if you think of -e as erase and -q as query (well that is what they mean anyway). Of course the rpm manager built into your distribution will understand your install CD's and will be able to satisfy dependencies from them. I would recommend that if you are looking for a package you use "rpmdrake" (or whatever your distro uses) to search the install CD's, before you run off to rpmfind and "going manual". Even if you do always get lucky, there is one rpm option you should burn into your brain: rpm --rebuilddb which pretty much translates to "unflog whatever has gone wrong with the rpm database" and is ALWAYS worth a shot when the rpm functions on your system start messing you about.

You will see two other options for rpm in a lot of discussions, --force and --nodeps. Don't use them, they are for the most part, best translated as "please flog my rpm database and/or system beyond all reason". The first --nodeps means "to hell with what it thinks it needs, install it anyway" and is, IMHO, asking for trouble. The second, --force has it's uses, like when you know that rpm is lying to you about something. Example, rpm wont let you install a package because it claims it is already installed, the package is either broken or half missing, then you can use --force to install it (rpm -Uvh --force packagename) but on the whole it should be considered a Bad Thing and avoided.

This is barely a scratching of the surface of this command's capabilities, but for now it is all you NEED to know.

No: 6......locate............and chums.

Blindingly obvious Linux command alert! In keeping with Linux tradition, this is one of those commands you wouldn't guess because it is just too damned obvious. Want to know where "Foo" is hanging out these days? Easy: locate Foo . This will return anything that contains "Foo" in either the file or directory name, AND it will do it instantly. This bit of magic is down to it's "other half": updatedb which, when run as root will make a database of every file on your machine. It can take a little while (5-20 minutes in my experience, depending on the complexity of the file system) so it is usually run by a Daemon in the "wee small hours of the morning", typically 4am, if the machine is down at this time, another Daemon "anacron" will attempt to run it when you do boot up. Obviously if you wish to find a very new file, you may want to run updatedb "by hand". No options, just: updatedb as root.

You may think that this is pretty stunning technology, but wait, there is more. Want to know where the essential executable of a program is (along with it's manual and source if installed)? Just type: whereis Foo. Now that is a useful command, do not forget it. If you only want to see where the executable is, try: which Foo. You are, by now starting to see that we are not in Kansas any more Toto, right?

As if this little lot wasn't enough there is also the find command. This is a little trickier than the point and click one you may have used in the other "OS" but believe me when I say that it shames it in terms of speed and power. find comes into it's own when you want to find stuff by more than just name (although it will happily search by name too). Let's say you've just downloaded a really big file, say 50MB (QNX 6.1?), and you know it is in the mess that is your home directory; somewhere but not exactly where. Try this: find /home/newbie -size +45000K . Now I really don't want to go into too much depth about find as it's functions quickly head off towards the bizarre, but trust me when I say that the next time you are looking for a file on your windows box you will probably boot it into linux to do the searching. I would say that a file would be hard pushed to hide from you now, eh? Just remember that linux is case sensitive (ie: "woRd"is not the same as "word") and you will be fine.

No: 5......grep

This is the command I have least been looking forward to. Everyone is entitled to blindness in some area, well for me it is grep. Hopefully by having to explain it here I will gain more understanding myself. There are a few conflicting definitions of what grep means but I shall furnish you with my incorrect, homebrewed definition. I say it means "get regular expression". I was reluctant to include the command as it is one of the least apparently useful in the list. However, appearances can be very deceptive indeed and a mastery of grep will lead the user on to higher things. This is basically because of the "regular expressions" used by grep, these are the key to a whole range of things in Linux, from file searching to programming and system set up.

"OK, OK! Enough!! What are they? If you are a tragic soul who has studied database design then the idea of looking for things by using oddly phrased questions will be familliar to you. That is what a regular expression is; a way of translating your request for something into a form that something as un-intelligent as a computer can't mess up. It is best if we stick to examples I feel, as explaining the ins and outs of concept is a bit much for a short work like this. OK so we have a directory full of letters (saved as ".txt" files), and we want to find all the ones that are on the subject of Windows. We could use grep "crash" ./*.txt instantly you have an answer showing every occurence of "crash" in all your ".txt" files and also showing which file each was in, and a short quotation to put it in context. This is the very tip of the iceberg. Grep's options are powerful in the extreme....learn to decode this little lot in your sleep and "strong will you be in the force young skywalker" . I want you to think about how useful grep can be when combined with some other commands, using pipes. .

If anyone out there can write a less gibbering account of grep, please mail it to me and I will include it along with a credit of course.

No: 4......cat

cat, or "concatenate" is a marvellous little toy and can be used for everything from showing a text file on the screen to making an iso image from a CD. Neat huh? To start then, let's say we have a "readme" file, you can open it in you favourite text editor (more on those next), OR use cat: cat ./readme there you go. Of course it shot up the screen so fast that you couldn't read it so, remember more and less: cat ./readme | more This pipes the output of cat ./readme into more. cat can also be used to join files. Say we want to add two files into one we would use: cat file1 file2 > newfile. Hold up!!, what's this > thing all about then? Well it is one of Linux's key features, it is called a "re-direct". See, if we just ran: cat file1 file2 we would just get the contents of both files whizzing past on the screen, because the screen is the standard place to put such stuff. The correct name being standard out or STDOUT for short. However, if we were to do this: cat file1 file2>file3 The contents of "file1" and "file2" will both be copied to "file3"

Essentially all Linux programs have a "standard out" (they also have a "standard in" that can be read from, and a "standard error" output as well, that is usually to the screen but can also be re-directed). One of the coolest things I found to do with this was to catalogue CD's. Pop a CD in the drive and type: tree /mnt/cdrom > cd1.txt this will take a nice directory listing of the CD and save it in the file "cd1.txt". Now put another CD in and repeat but using "cd2.txt", repeat until all your CD's are done. Now, in the directory with all the ".txt" files do: cat ./cd*.txt > masterlist.txt and there you have a nice CD catalogue. Neat trick huh? I don't want to dwell too long on the standard ins and outs, but commit this fact to memory: "All Linux programs can be thought of as being like a Hi-Fi component, they get their "signal" (ie: the data to work with) from "STDIN" (usually the keyboard, but can be a file, like this: command < filename , which would present command with filename as it's input) and after processing, the output is to "STDOUT" (usually the screen), just like any part of your Hi-Fi they can be "re-wired" so that other inputs and outputs are used".

In a Hi-Fi one may re-wire the output of the CD Player so that it goes to the cassette machine rather than the amplifier. In a Linux program one can make it's output go to, well just about anywhere, including the great big bit bucket in the sky: /dev/null anything sent here ceases to exist). This may all seem a little overwhelming but I can assure you that it isn't as hard as you might think, and anyway the important thing is that you get the idea of these things into your head now, as you never know when you may suddenly feel the need to use them.

One excellent use for both cat and redirection is in making ISO CD images. Now one can fool about for a while with various tools trying to make an ISO from a CD (which you would do in order to mount the image as a filesystem, ie: the file on your HD will be treated as a real CD to all intents and purposes, cool eh?. If you wanted to make multiple copies of Linux for your friends without inconveniencing your master CD's). But in the end the simplest method is simply cat /dev/cdrom> image.iso. Now compare that to loading up a great big advert sponsored app in Windows to do the same job, most mighty I think you will agree.

One more thing, cat doesn't care about filetypes and can work with any file you may have. Just today I found that the Frank Zappa concert I had ripped with "cdparanoia" (a most cool proggy) and encoded with "bladeenc" (also cool), was pretty bad because of all the track markers breaking up what should be a continuous tune. No problem, a quick cd into the directory with all the mp3s and then cat ./*.mp3 >./wholegig.mp3 and all is well again!

cat, STDOUT, STDIN and STDERR (and tree which allows you to send something two ways!) are on the same level as "real-world" screwdrivers and spanners (US = Wrenches). They are key tools for working with other commands, and a full list of their uses would be larger than this entire document, but for now you know about them and you will, I am sure, find them useful in ways I haven't even guessed at. Here, the concept is the important thing, play about!!.

No: 3......pico/nano

As you get into Linux you will quickly find that the quickest way to make a configuration change is to get in "under the hood" and do it "by hand". It is often much easier and faster to just edit the appropriate configuration file, you will also notice that much of the advice you will receive on usenet is geared towards this "get-your-hands-dirty approach", mainly because such methods are less specific to the particular system. For instance not everyone has Gnome installed and therefore not everyone has access to the Linuxconf graphical configuration tools. But everyone DOES have the files that those tools edit.

Now to edit these files we need an editor (startling conclusion that!). There are two main text editing tools available for *nix systems, vi and emacs. We shall use.....neither! Why on earth would we do this you say? The answer is two-fold. Firstly, although both these tools are immensely powerful, neither is anything like intuitive enough for the newbie to use straight away, I mean, there isn't much incentive to get editing if you have to spend a lot of time working out the editor itself (at least for now). The second reason is one of religion, the "holy war" between those loyal to vi and emacs is a computing legend and is not something a newbie wants to get into I assure you!

So we are going to use pico or nano. Pico is the text editing tool that is packaged with the pine email program that is included on the Mandrake distribution CD's (along with many other distro's). Nano is a standalone clone of pico that has one or two cool extras like find-and-replace, but from now on we will refer to only pico, as this is probably already on your cd's (although if your modem can stretch to a 400k download (sucks air through teeth at the vastness), I would grab nano).

OK, wassit do then?. Pico is IMHO the most intuitive and newbie-proof (read as, "less likely to cause hair-loss"), text editor around. You can use it to inflict all manner of insane and inept mistakes upon your poor system, thereforee pico is good:). This is an important thing to understand, hosing your system is good! Here's why, if you mess up with a graphical config tool, it might be game over (for someone inexperienced, gurus can do miracles). On the other hand, if you foul up when directly editing a file then you can restore your backup and continue. And in doing so you will have learned:)

VITAL KNOWLEDGE: Before ploughing into some important system file like a madman, BACK IT UP!! Witness the following as an example: to safely fool about with /etc/fstab, perform the following using the cp (copy) command: cp /etc/fstab /etc/fstab.saveass or perhaps: cp /etc/fstab /etc/fstab.unflog . Some people would advise the use of ".old" or ".bak" as a good way of labelling your backups, but my names are more descriptive, and sillier:). Also note that double extensions are fine in Linux, you can rename "modules.conf" to "modules.conf.unflog". Now if you blow it all up, you can delete the broken file using rm (for remove): rm /etc/fstab and reverse the cp command you used above (cp /etc/fstab.unflog /etc/fstab), and you're back in business!

Now we can continue, safe in the knowledge we can save our backsides if needed. When you need to hack at a file, be it a system configuration file or a little note to the milkman, just type pico filename (remember the ./ convention to use files in the current directory). If filename does not exist pico will open a new file with the name you specify. Pico's interface is good for the new user because it's commands are shown along the bottom of the screen. The "^" character beside the letters means the "Control" (CTRL) key, so ^o means press "Control" and "o" together -aka "CTRL+o" (you will notice that ^o is labelled as "write out", this is pico-speak for "save"). From here I figure you can manage it on your own, as the rest of the options available to you will be either obvious and/or familliar to anyone who ever used any text editor ever. Of course once you are bored with pico you can join in the Holy Wars and choose your side:)

No: 2......man

Now if anything in this Newbie Top Ten is going to get me flamed by my elders and betters, then it is the bare fact that I have put man at Number.2. Many people would say it is THE most important command on your system, and while it IS for the more experienced newbie (newbie 2nd class), I think my choice for Number.1 is better. So, man is..?

man is man(ual page). Virtually every command on your box has a man page, as do some of the large apps. Just type man commandname and sit back in wonder as the world is revealed. Man pages can be a little daunting at first, but do read them, after you have read a few you will get the idea of how they work. As a practice, go back to the top of this list and go through each command mentioned and look at it's man page, try and see how the options and methods for the commands that have been explored here, are described in the man page, you will be a guru in no time. Oh and don't forget man man :) Some programs also have an info page that one can get with info commandname Not a lot else to say about it, just get reading.

No: 1.......apropos

As indicated above I think this command is more important to the new user than man. The main reason being that one of the most common cries of the newbie is "How the hell do I..?" apropos translates as "How the hell do I..?". All you have to do is type: apropos subject. Sometimes the results can be a little over-zealous and contain references to various libraries that pertain to the subject, this can be a bit scary to the newbie, but is essential for more advanced users and especially developers. This command is your friend. A story: A while ago I was wondering how to record sounds to my HD, I downloaded several half-baked applications for the purpose with limited success. On a whim I tried apropos and looked for "record", I discovered that Linux has a command rec for this very purpose. Could have saved much hassle and embarrassing Usenet posts if I had just done this earlier. Remember this tale of caution. There isn't a lot more to say about this one either really, although you could try man apropos:)

The Bulffer's guide to compiling from source.

What is compiling?......Taking the code that a program was written in and tunring it into a runable program.

Why would I do it , what are that advantages?......When you get a pre-compiled program ( like all windows software and most RPMS) You get a version that is compiled to run on a huge array of systems, with support for all of them built in, or the code optimised to a "lowest common denominator" version of itself that may not be very quick but won't offend too many systems either. However. when you compile your own programs from source, the first stage of the process literally asks " Right where am I and what do I need to do my job here", So you end up with a smaller program, tailor made for your system.

So, how is it done? Once you have unpacked your .tar.gz with the source in it, enter the directory the unpacking created. You should Always read the readme file to make sure you don't mess up. But the general procedure is as follows.

./configure: this is a script that will take a look at your system, sometimes it may ask you some questions. The results of this are used to make appropriate changes in the sources and the makefile which is used by the next stage.

make: this bit actually builds the program into an executable form ( often referred to as a binary). This is done in accordance with the info supplied during the "./configure" stage. Now for some programs, this will be all you do, and you will have the finished product somewhere inside the current directory or a sub-directory of it. In this case just copy it into your /usr/bin directory. Since this directory is part of your default PATH ( the list of directories Linux will look in for a command you type), you can run it by merely typing it's filename into a terminal or your desktop's command prompt. Some other packages, however, have more than just a binary program file, they may compile some custom libraries or need to make some minor adjustments to the system's configuration. These packages have a third stage to the compilation process.

make install: This phase will copy the program file, and any libraries or other miscellaneous baggage, to their final appropriate resting places. It may also make a few small changes to some system configuration options, CHECK THE README!!!!!.

Some packages you download may have other stages or totally different ones, that you will need to read the documentaion for but the above three steps are by far the most common and it is important that you know what they actually are.

When computers attack!!!! Or...Common compiling problems. You may be told that make cannot be found, just install it from you CD's, it is just a command like any other. Another error you will often get, is that it can't find a compiler. Ensure gcc is installed, this is also on your CD's. There may be other compilers that some packages may want, but this is very rare. Another common newbie-stopper is that you get aparrently incorrect dependency problems. For instance you may be told that the compile process cannot find a part of XFree86 even though you have it installed. The deal here is that the compilation process is looking for bits of X to compile into itself or to get info from. Very often all you need to do is go to your CD's and install missingpackagename-devel.rpm the -devel is ( I assume) short for developer, this file will more than likely contain the stuff you need. And if in doubt there is always rpmfind or "sanctuary" as i call it.

The Mighty shell script Start with a DOS .bat file and then add the ability to perform ANY function of the OS, and you are getting the idea. Basically if you ever find you have a lot of stuff you need to type over and over again, stick it in a shell script and you are laughing....Example....Lets say you want to backup your home and /etc directories: rattle the following into your text editor of choice......

#/bin/bash

#In the first line above the # has a special meaning #that being to let the system know that this is a script #to be run on the bash shell that is probably your default one #but on all other lines #starting a line with # means #ignore this line #very useful for putting in comments like this

#make ourselves a new directory to work in

mkdir /tmp/backups

#copy the files we wish to backup to the new directory #the options used in the cp command are #r -recursive -descend into sub-directories #p -preserve permissions -essential for a good backup as #normally the cp command makes everything belong to whoever ran it #v -verbose -log all activity to the screen -good for spotting errors #but much better for showing off:) #f -force -don't argue about little things ( note..silly things includes

overwriting existing files...good here...bad at other times. be careful)

cp -rpvf /etc/ /tmp/backups

#remember to change /home/newbie to the right username

cp -rpvf /home/newbie /tmp/backups

#tar 'em up

tar -cvzf /tmp/saveass.tar.gz /tmp/backups

#get rid of the copies we made now that we have them tar'ed #the options on rm ( ReMove) are... #r -recursive same as for cp #f -force, don't ask for confirmation, just delete it

rm -rf /tmp/backups

echo your new backup file is complete....it is /tmp/saveass.tar.gz echo please place it somewhere nice and safe like a CDR echo CONGRATULATIONS!!!! you are now a hacker cadet exit

OK, very nice now what do you DO with it. firstly save it as let's say backmeup.sh/ The .sh isn't needed but it helps to remind you it is a shell script. Then make it executable by using chmod ( see above ). Now put it somewhere in your PATH -the directories Linux will look in for any command you type. ( type echo $PATH to see what directories are included). I reccommend you place it in /sbin because that directory is only in Root's path and a procedure like this is really a job for Root.Naturally, you will need to be root to cp the file into /sbin.

Now all you have to do to back up pretty much all your crucial settings is su to root and type backmeup.sh. It would be best to have some friends round to show off the whizzing text to:) So in future instead of typing out the same old command sequences over and over again, you can just wrap 'em up between a #/bin/bash and an exit, kick back and watch the penguin do the Donkey-work. As ever this is just the tip of the iceberg in terms of what can be done with shell scripts, have a look ( NOT a tweak!! :) ) at some of the files in the /etc directory, many of these are shell scripts and are wonderfully scary:)

Sunil's alphabet soup decoder

You asked for help? You got a reply? You couldn't understand all those abbreviations in it? Well look no further, here is a small list of abbreviations, just in case you were wondering, WTF does $ABBREVIATION mean? NG Newsgroup LM Linux Mandrake MS Microsoft M$ Microsoft

FUD Fear, Uncertainty, Doubt LOL Laugh Out Loud WTF What The F*ck IMO In My Opinion BTW By The Way BRS Big Red Switch (power button) PFY Pimple Faced Youth

IMHO In My Humble Opinion ROFL Roll On Floor Laughing BSOD Blue Screen Of Death BOFH Bastard Operator From Hell RTFM Read The Flippin' Manual YMMV Your Mileage May Vary LART Luser Attitude Readjustment Tool FWIW For What It's Worth IIRC If I Recall Correctly LMAO Laughing My A** Off

AFAIK As Far A I Know

AFAICT As Far As I Can Tell


Ones not listed here are to be found HERE

Some other mindbendigly useful links

http://www.linuxdoc.org --the repository of All Wisdom http://www.mandrakeuser.org --Very useful guides http://www.linux-newbie.org --Speaks for itself really:) http://www.mandrakecampus.org --Online courses, very good ( although, strangely, the Admin course doesn't cover deleting the accounts of users who stole your parking space, or even how to wire an ethernet plug into the mains for the ultimate vengance) see......here......... http://bofh.ntk.net/Bastard.html --for an explanation and a damned good chuckle) http://www.linuxmandrake.com --Home, home on the range http://www.linuxheadquarters.com --Some very good everday use tutorials. http://www.tuxedo.org/~esr/jargon/ wonderful resource read a bit a day and laugh your way to knowledge

And don't forget your /usr/share/doc directory, it has much wisdom. Also look on your cd's or hard drive for a Document called "rute.pdf" ( from rute.nn.n.rpm I believe. It is like having a UNIX drill-instructor in your ear, but if you follow it's order you will be a lean mean Linux machine.

THE LAST WORD

You have taken a big step forward if you have read ( and understood) this page. You aren't in any danger of re-writing Linux from the ground up just yet, but hopefully you will be best friends with your terminal and ready to do battle with all the other options for the commands we have discussed as well as being prepared for the many dozens of others lurking in the depths of your box just waiting on your orders.

Go forth, and enjoy your penguin:)

There you have it! The Top Ten most useful commands for newbies, I believe if you read this all, poke about for a while, come back and read it again you will be in pretty good shape. Then, (and this is the important bit) find some friends to show off to as your mouse sits idle while you molest your poor machine like an oldschool hacker. If you have a burning desire to add a command, then write up a little paragraph on your personal favourite and mail it to me at Mail

Feel free to send any good newbie article links you know of. I am most intrested in things simmillar to this, stuff that opens your eyes and makes you say "ooooooh".:)

All flames directed to /dev/null

Steve Campbell Chief Machine Torturer The SlightylyNarrow SoundSystem

With the capable assistance of Sunil Patel Proof reader and un-abbreviator.

There'a alaways linuxquestions.org or ubuntu's own fora.

Not sure how kick ass the ubuntu live CD is, Knoppix is certain more fully featured, but the ubuntu one is VERY slick running in comparison (remember, running from compressed files on a CD's always gonna LAAAAAAG).

If you are tempted to install onto a machine with an existing OS, use something else to shrink the partition with that on it first, I had a bad experience once with a linux partitioning tool resizing FAT32, Linux seemed to count disc blocks correctly from 0 and windows wrongly from 1....the result was that windows could always "see" the Linux partition and it drove it mental.....it was just BURNING to format it.

0 likes

Cool. Ok so now I must figure out how to set my internet connection in Linux (ugh) I am not techically inclined as much. I know I could prolly find the settings in XP and just drop them in the proper Linux setup box.

Network Settings are annoying in Windows and ???? in Linux

0 likes

Holy crap Cambo.... did you type that all in one sitting!?:eek:

0 likes

LiamShed wrote: Cool. Ok so now I must figure out how to set my internet connection in Linux (ugh) I am not techically inclined as much. I know I could prolly find the settings in XP and just drop them in the proper Linux setup box.

Network Settings are annoying in Windows and ???? in Linux

As long as you do not have a PCI or USB "modem" it'll work a treat. Surprised it didn't just get you online automatically.

0 likes

:wtf: ? Cambo i do love you but you are a bit of a technogimp! :lol:

Linux,int that the bloke off snoopy?:scratch:

:nuts:

0 likes

:nuts: wrote: :wtf: ? Cambo i do love you but you are a bit of a technogimp! :lol:

Linux,int that the bloke off snoopy?:scratch:

:nuts:

Funny enough, nearly. It's called Linux after it's creator...LINUS Torvalds :lol:

I wrote that about 6 years ago, and when I was searching for it online (my original copy being long gone), it seems it's attained some kind of legendary status, and I'm apparently a "talented musician" and a "linux developer" both of which most people would dispute :D

I really should repair a few errors in it, kill off the stuff about RPM and replace it with stuff about APT (used by ubuntu, the new flavour of the month) and get it back up on the web again.

I HATE boring tech docs, so when I wrote that and a few other shorter things, I made sure they read like a magazine article and not a stuffy manual.

Linux is what makes the world go round. It runs happily on anything from a digital watch to a 10,000 machine supercomputer cluster.

0 likes

Cambo, why hasn't my computer ever crashed once in the 5 years i've had it?

I use Windows XP btw.Please don't murder me.

0 likes

johnny wrote: Cambo, why hasn't my computer ever crashed once in the 5 years i've had it?

I use Windows XP btw.Please don't murder me.

It's obviously well built, well installed, operated by someone who is not a fucktard, and has an easy life (not high end 3d games or other hardware stressing things). My own windows machine is pretty well behaved too, but then it doesn't have to do much, just games and cubase. Still dislike it's way of doing things and it still has it's moments......eg trying to get a DVB-S sattelite tv card working in it ARRRGH....even plugging in the infrared sensor threw a BSOD....in Vista too, which I thought HAD no BSOD.

Watchin a video in windows, for example, especially with it's own built in player is, for me, like sitting on a cactus. Email was always really painful for me, no mater what alternative to that useless virus crapware outhouse excuse that I tried.

I often think that whether you find windows a loveable thing or something you'd watch burn while eating popocorn, is down to how much time you have on pre-pc computers. If you used much pre-windows, windows is torture, but if it's the first thing you seen on a computer, well you don't know any better.

The acid test for linux comes this Xmas.....got my mum an EEE-PC, she's 62 and has never used a standalone computer, so we shall see about "you need to be a geek and a programmer to use linux".

0 likes

Thanks :thumb:

It doesn't take too kindly to having 3 or more Firefox tabs open at a time lately though.Freezes, stutters and all that crap.Also, simply opening a file seems to a major operation for it these days.

0 likes

johnny wrote: Thanks :thumb:

It doesn't take too kindly to having 3 or more Firefox tabs open at a time lately though.Freezes, stutters and all that crap.Also, simply opening a file seems to a major operation for it these days.

Defrag it, preferably with something other than the default windows defragger which is very basic and unspeakably slow. PerfectDisk is excellent and Norton Speed Disk is good as long as you do not use NTFS, if you do, it will defrag fuck all cos it can't unlock any files windows has left open at it's arse.

More memory is always a good thing. Firefox is usually OK for memory but if any pages you have open use flash and/or java it can get greedy very quickly.

Another trick is to "nail" your swapfile. Windows starts up, and thinks "I need 400MB of virtual memory" and makes a 400MB swapfile.....but later realises it needs maybe 700MB......cur major system flogging while it creates a new 700MB swapfile and copies what's in the 400MB one accross to it, then removes the 400MB one. Right click on "my computer" >properties and poke about in there (I think under "advanced", I don't have a windows machine switched on just now to check) until you find the virtual memory settings. Set the min and max to the same (about 2x the amount of real memory you have is a reasonable size), and reboot. You should find this stops it's hard disc going into spasm at the oddest times. DO that BEFORE defragging BTW, and if using perfect disk, do an "offline defragment" which will defrag your new swapfile for you too.

0 likes

Chers Steve, will have a go at defragging ,ain't done that in a while so it's about time.

0 likes

johnny wrote: ain't done that in a while so it's about time.

Lower your standards, improve your turnover.

Hope this helps :thumb:

0 likes

the real question is is cambos reply on here the longest post of the year !! ? :evil4:

0 likes

banshee wrote: the real question is is cambos reply on here the longest post of the year !! ? :evil4:

it's got to be the longest one that isn't a quote, they can get pretty long when they're a quote of a quoted quote.

He certainly knows his stuff, personally, I only connect my pc to the internet to register the software on it, it's only used for music, my computer for everything else is a mac, and when the pc dies, I'll replace it with a mac, i wish i'd never bought it.

I agree about the comment, if windows is all you've ever used you won't know any better, I've been through a sinclair zx81 then nothing for years then an amiga, then my first mac in 1995, my next one in 1999, which was still in daily use up until 2 months ago, now a nice new imac, and a piece of shit carillon pc

0 likes

I don't really know my stuff (depite all the bizzarely nice reviews of the above all over the net). For one thing, those are just easy commands for making you go Oooooh and Aaaaah, or making you realise how astray you've been led.

Take these two examples........

  1. Backing up a hard drive partition:

Windows: buy Acronis true image for $BIGBUCKS, fidget about with mouse, select c: drive, find somewhere to save the backup, play with compression options....wait a long time (note: if you boot from Acronis' own CD, it runs in linux, and whores along).

Linux: dd if=/dev/hda1>/mnt/backups/winbackup.img

(Or with compression for a smaller backup...... dd if=/dev/hda1|gzip>/mnt/backups/winbackup.img.gz)

And then to restore........ dd if=/mnt/backups/winbackup.img of=/dev/hda1

(with the compressed image gunzip /mnt/backups/winimage.img.gz | dd of=/dev/hda1)

Looks like gibberish, but if I tell you that dd means DiskDump, if mean Input File and of means Output File, and that hda1 translates as "hard disc A (ie the 1st), partition number 1" (ie what faildows calls C: ).... it suddenly looks a whole lot like you just asked the machine to do exactly what you wanted in a succint and efficient manner.

Example 2.

Copying a DVD, and burning it at half speed for compatibility with standalone players.

Windows: Buy/steal Nero/ashampoo/whatever. put disc in tray, close tray. Swear at machine while DVD calibrates and Nero goes unresponsive. Cancel annoying "would you like me to play the files on this?" requestor. Twat around with Nero's menus, select source drive, browse to image destination folder. Hit go, wait for windows to piss about with DVDrom because Nero opened a channel to it. Wait for Nero to make image. Remove source disc (after first convincing Nero to give it up, sometimes it volunteers, sometimes it's like a puppy with a slipper). Put blank DVD in drive, close drawer....dismiss annoying "do you want to burn something onto this blank disc" requestor (A handy tool if it bothered to check to see if you had a burning application already open). Open Nero image burning wizard. Browse for image file you just made, if you can remember where you put it. Try to set speed to 4x, force drive redetect because it only offered 8x in the speed choices, successfully set 4x. Hit "burn". Wait while disc is burned at 8x :lol: Finally get disc off Nero, before it closes the drawer again and pops another "heyyyy it looks like you put a disc in" spam.

Linux. Put disc in tray. This uses a little more automation than needed, but all will become clear.

#close door eject -t /dev/burner &&

#&& means wait for this to finish successfully before continuing to the next command

#Make Image cat /dev/burner>/mnt/temp/dvd.img &&

#Spit source out, wait 15 seconds for user to change disc and swallow new disc.

eject /dev/burner && sleep 15 && eject -t /dev/burner &&

#Burn disc and eject

cdrecord dev=0,0,1 speed=4 /mnt/temp/dvd.img &&

eject /dev/burner

Now with you sitting there doing the button and stuff, all you really need is the "cat" and "cdrecord" lines, nothing else. BUT if you do it as above, typed in a text file called "dvdcopy" saved in the right place, and from thence all you need to is type "dvdcopy" and everything, except actually swapping discs, happens automagically. This is what I LUUUUURVE about penguinland, it's computing for the lazy. If you had an Ameoba games machine, then you've used a version of Minix, which is the same Unix variant Linus Torvalds set out to emulate with his Linux kernel.

I can't code, and I know naaaathing, but I can read "man pages" and can use google. The only thing I bring to the party myself is my inbuilt gift for communicating with and understanding machines....like an electronic Dr Doolittle :D

BTW, that HUGE article IS a paste in, hence all the dead links and anchors. It also contains a GLARING mistake that we decuded to leave in as "a test", but it's bugging me.

0 likes

Doctor? wrote: Couple of options.

When you switch on, does your machine mention a key for "boot menu" somewhere near the "press (whatever) to enter setup/Bios"? If so, hit the appropriate key, and when the boot menu pops up, select your CD/DVD drive from the list....Job's a good'un.

If it has no such message, hit whatever key it says for getting into BIOS/Setup. In their poke about until you find the boot order settings, shuffle them about (how to do this is always easy but differs on different machines) until the CD/DVD comes before the hard disc. That should do the trick, and provided you don't do anything daft like leave it without the hard disc listed at all, it will still boot into Faildows as normal if no CD is in the drive.

As for help....here's an article I wrote about the commandline (with a little help from Sunil Patel). I searched all over for a copy online, and all I found were a million people saying I was brlliant and even someone calling me a linux developer (I can't code my way out of a wet subroutine). Of course you will start with the point-and-drool windows type interface, but you'll soon see from reading this that even the most basic commands can do things that would take ages with a mouse, in seconds. Ignore the but about RPM Ubuntu is Debian based and does not use it.

Newbie's Top Ten Commands

This is it, the Moment all you newbies have been waiting for, this is the list of the top ten commands that every new linux user should learn about to save time, effort and usenet flames. It is not intended to be a full description of the commands, rather it is a guide to the power of Gnu/Linux with some immediately accessible examples to try out (something that most technical documents omit, but which I believe are essential in getting the ideas involved into virgin skulls).

I want to get two things clear from the start.

First......Where the hell do you USE all these commands....

We use them in a terminal sometimes called a console. You may think of them as DOS-boxes with attitude. Linux is well specified with terminals There are at least five different ones on most distro's. The easiest to get to are the ones from KDE and Gnome as these both have icons on the "taskbar" in their respective environments. My personal choice is Eterm at the minute, as it is fast to open and has very pretty background pictures:). They all do the same job, just play about until you find your "flavour". You can also use these commands in the non-gui runlevels or in the "Virtual consoles" that you can access by pressing control-alt- and F1-F6

Second......Why the hell you should bother.Or... "it's not the 1970's maaaaan"?.

Easy, all computers work faster when run from a commandline....even Windows!!. In truth, the nice mouse driven gui's you may be used to are nothing more than the curtain behind which the little old chap sat in "The Wizzard of Oz". This is even true in MS OS's, when you click a button, it sends a command to a program, nothing more The main difference with Linux is that none of the functions are hidden in obscure dll's or the regis...ugh...regi....that THING that IT uses. I will race any man, woman or small furry creature from alpha-centauri, with a mouse against me with my keyboard, in ANY OS!. ( I must admit to an unfair advantage owing to having no mouse on my Atari STe for three years, during which time it gigged it's little ass off in dark vibrating rooms.) Please don't think that the commandline in Linux means it is somehow antiquated, nothing could be more false, always remember the "Curtain" I mentioned.

Or perhaps a better way of putting it is " Switch off your mouse, reach out with your feelings, use the force":)

Now, in the tradition of top ten chart run-downs the world over, we are going to do this in reverse order, starting with the least useful (or rather least MOST useful) command and working up to the "Big Guns". Each command will come with at least one decent example of what you can do with it, with many of them however, there are many more functions than those I will discuss. So here we go (begin playback of chart rundown music appropriate to your nation)...............

Number 10. ls Number 9. tar Number 8. permissions suite Number 7. RPM Number 6. locate Number 5. grep Number 4. cat Number 3. pico/nano Number 2. man Number 1. apropos

No: 10......ls...........And friends

I like to think of ls as being short for "list" whether it is or not, it is a good way of remembering its function. It is roughly equivalent to Dos' dir command, but with a few more clever functions. To obtain a directory listing, just type ls. To obtain a listing for a directory other than the current one, just type (for example) ls /etc; this will show you the contents of "/etc" (where most Global config files live). To see more info about the files you can use the -l (for Long) option thus... ls -l will show you the contents of the current directory in more detail, including the owner, group, permissions and (if it is a Symlink) the file to which it points. Hidden files may be shown with the -a option (always worth trying if you are sure that a certain configuration file ought to be there but you can't see it).

ls can also be used to see a listing of all the directories contained in the current one (subdirectories) by using ls -d */ and in a mandrake distributed Linux, you will find that some kind soul has put in an alias for this that enables you to enter merely lsd (an old hippie me-thinks). To GET to one of the directories you have just listed the contents off you can use cd. cd in Linux is, again, similar to DOS. You can specify a relative or absolute path. Err what..? Easy let's say you are in your home directory: "/home/newbie" and you want to look in your "News" directory. You can use either cd ./News (the "./" in front means 'start in this directory'), or just cd News as the cd command defaults to looking in the current directory for the one you asked it to change to . Now suppose you wanted to get to "/etc", well you could type cd ../../etc (the ".." means 'up one level', just like it does in DOS. However, you can also specify an "absolute path", meaning one that starts from the "/" or "root" directory. You do this by starting the directory with / like this: cd /etc and to get back to your home directory: cd /home/newbie ( Neat trick: cd ~ takes you there too and you can use ~ just about anywhere when you mean your home directory) . By default you will generally see only the name of the directory you are in at your prompt. To see the full path of that directory, use pwd which stands for "Print Working Directory" and is good for those "OK, where the hell am I?" moments. That just about covers what you NEED to know about cd, now back to ls.

The output of ls can be long to say the least and can be something of a nightmare to follow as it spits up the page. Let us welcome the twins less and more , these are actually two little programs that are fairly synonymous with one another, well enough so that the new user should just be able to use which ever one he/she thinks looks better. Their function?...to pause the stream if stuff flying out of ls (or any other command that throws megagobs of information at you) at the end of each page by saying......well, "more?". Hitting any key will advance a line and hitting space will advance 1 page. You can abort by pressing the "Q" key. Ahh, I hear you cry, how do I get this more thing to show me my directory? Well, welcome to the "pipe" symbol | and with it, some of the real power of Linux. You see, the underlying philosophy here is to build complex processes from small, easily understood ones, and piping is the key to doing this. The | symbol stuck between two commands takes the output of one and gives (pipes) it to the other. So, to get a nice pausing directory display you pipe ls to more like so: ls | more of course you can use all your ls options as well: ls -la | more is cool too. If the fancy takes you, you can also use less instead of more.

No: 9......tar..............plus supporting features.

So what is this tar thing you all hear about? Well the name is short for Tape ARchive, "oh how relevant to my desktop {NOT}" I hear you say; well you may be surprised. tar comes from an age before "zipping" when the best way to compress several files was to build them into one, thereby saving on the disc space used in all those files. Although the amount of data stays the same, much space and file system strain is saved this way, for reasons that....well for reasons you can damned well go and find out for yourselves; what am I, a history professor eh? EH? :¬P. Also it was good to keep the backups in a single file called "unflog" or something, for retrieval purposes. The command is really designed to work on directories (it can be used to pick up specific files though). In general, extracting the contents of a ".tar" file will produce a directory of the same or similar name to the original file.

Ahh, but what are these ".tar.gz" files? Well as computers got bigger and file sizes got silly, serious compression became necessary for good archiving, enter gzip. Essentially this does the same job as "WinZip or "Pkzip" (there other Linux compression programs, but we will stick with gzip as it is the one you are most likely to come across). It squashes files by a system not unlike the following: "Lets take a file that holds "000000000000000", now that takes up 15 bytes of space. However I can say "15 0's" in 4 bytes: (1, 5, space, 0....ignoring the 's as it is only there to make it read right for you)". In practice this method used comes under the heading of "Scary Maths", but the idea is the same. A ".tar.gz" file is a ".tar" file that has been passed through gzip to shrink it. Alright, lets get down to business, how do you extract one of these things..?

Quick and dirty solution coming up. Change into the directory containing the victim, err, I mean file. now issue the command tar -xzvf ./foo.tar.gz. The options are: x(extract), z(use gzip to unzip), v(be verbose, we want it to tell us if it fell over, not keep the info to itself) and f(Use the specified filename, perhaps a hangover from it's tape heitage). The ./ is not strictly needed, but it is always good practice to use it when dealing with the correct directory, until you get it into your head for running programs when it IS required to run one in the current dir. Now in the current directory you should now see a new directory created from the ".tar" file, cd into it and there are your extracted files. Very often these will be the "sources" for a program and will require you to compile them. I have included a bluffers guide to compiling lower down on this page.

Of course, you can use tar and gzip to make a new "tar.gz" file (or "tarball" as they're often called). Let's say you wanted to make a complete backup of your home directory so you can restore it if whatever disastrous tweak you are contemplating goes hideously wrong. Here is the command for it: tar -cvfz ./backup.tar.gz /home/newbie/ reading this from left to right the options (or arguments)...the letters after the "-" are, in plain language. c - Create the file I specify (./backup.tar.gz), v - tell me what you are doing, f - don't argue, z - and then zip it please. You may need to be root to do this as some configuration files in your home directory may belong to root. This will create a nice shiny new tarball with your home directory in it, in the current directory (see the ./ before backup.tar.gz), it is up to you where that is. Note: Another reason you may have to be root to do this procedure is that users may not have access to the directory you are trying to make the archive in.

That about covers the basic, "get-you-up-and-running" features of tar but believe me when I say there are a LOT more options!

No: 8......The access and permissions commands

The WHAT? Well unlike a certain other "OS", Linux has a feature called "security". This means that many users can live happily on one machine without ever treading on the toes of another user or on the system itself. To achieve this, it uses a system of "permissions", which are just what they sound like. In all honesty these can cause more newbie upsets than anything else. They can also lead to one of the most common and readily available ways to hose (destroy) a perfectly good system (ie: logging in as "root").

So, what do these permissions look like? If you recall from our little journey into the realm of ls, you can see the permissions for files by typing ls -l (l is for "long", remember). To the left of the directory listing you will see a 10 character readout of the permissions. It looks a little like this -rwxr--r--, yeah wow, that's helpful! OK maybe not, so lets look at the breakdown.... The first column we ignore (it is a special column that contains certain other flags about a file, for instance a directory will have a d here. So, we are down to nine, well that nine are actually 3 sets of 3. Lets look at the first set of 3: rwx these mean the file has read, write and executable permissions set, meaning (rocket science bit) that it can be read, written to (ie: modified) and run as a program or shell script (executable).

OK, that makes sense (doesn't it?), but why the other 6 and what is a -? Well the first 3 we have looked at are the permissions for the file's "owner", that being the person who created it. The next 3 are the permissions for that person's "group" and the 3rd lot are for the rest of us, or the "world" as Linux calls us. So a group is..? A group is, well, a group, for instance if you were working on a large network, as part of a project developement team, your group would be the other members of your team, and you may want them to be able to share files with you. Groups are not as vital on a stand alone desktop machine as on a large network, but the system still uses them to determine certain things like who gets to hear sound ( ie: the "audio" group) or play with the CD-ReWriter. This brings us to "-", this simply means that the permission is not set. So if we return to our example we now know that this file can be read, written and run by it's owner and that both the members of his group and the rest of the world can read it but nothing else. The file's owner and group name are also listed by ls -l.

As you can see it is easy to keep a file totally private, by merely setting it's permissions to -rwx------ . Err how do you change them? Let us welcome the chmod command to the party. The file's owner can use this to change the permissions on the file, "root" can also change any file on the system (keep repeating, "root=God@localhost"). So how exactly is this wonderous miracle of security achieved? Well there are 2 syntaxes (or is that syntaxen or syntae or...shuddup!), you can use to talk to this command, and they can both be obscure to the newbie. I don't want to get too deeply into it, so I will demonstrate a couple of the most common uses. First and most common is getting a file to become executable. This may sound odd, but many "runable" files, especially shell scripts may arrive in your posession from a variety of sources with the execute permission turned off. So what do you do? Well, adding a single permission to a file is easy, say you have a game demo that contains a file called "runme.sh" that wont run, we would type: (in the same directory as the file) chmod +x ./runme.sh this should add an executable permission for everyone (owner, group and world).

However, this is a little brutal, and we need a more targeted way to do this. This is where the first set of options for the chmod command come in (err, first set?...yup, those that come before the +/- rwx ones). These specify, who you are making the change for either u(ser, the owner), g(roup), o(ther, or world) and a(ll). So if we wanted to make "foo.txt" group writable for instance, we would issue: (from the directory containing the file) chmod g+w ./foo.txt. The general format in english is "chmod who +/- what" and if you leave the "who" part empty you get user, group and world, all set to whatever the "what" part specifies. Now, above I mentioned that some chmod operations require you to be "root" (for instance changing permissions on a file that belongs to a user other than yourself, or on a system file. Now you could logout and then log back in as root, but that would quickly get on your nerves, so the great elders bestowed the su command on us. With parameters added, su lets you become another user: su username , but on its own it means, "I wanna be ROOT!". In either case you will need to know the password for the username you wish to become, including "root". This applies for anything that says "permission denied" and for some that say "command not found" (some commands, like updatedb or reboot, live in the directory "/sbin", which is only part of root's path). As a rule, when told to clear off by the shell, become "root" and see if that scares it into submission.

But, why dont I just login as root all the time? A million good reasons but I will give you two: 1. If you are on the internet as root, your system is much more open to attacks. 2. If you aren't root you cannot hose your system. OK I am going to say that again only louder, If you are not root, you can NOT hose your system! You can blow 7 shades of sh** out of your user account and render it dead or at least very sick indeed (this is when the home dir tarball made earlier comes in handy). But if you login as a different user, all will be well. Login as "root" and screw up, and well, it could be a sad day for you. So keep saying, "Do I need to be root to do this?", if not, dont!!

There is one other important command in this suite that you should know and that is chown or "change owner". Bit of a no-brainer actually, you can figure it out on your own as a little challenge (don't be root when you do in case you mess up and change ownership on the wrong thing). It is unlikely you will need it much, but sometimes it comes in handy to convert a program or script that someone else gave you, to be your own.

No: 7......RPM

What exactly IS this "rpm" thing you keep seeing? RPM is short for Redhat Package manager, and is a package management system developed by Red Hat. (It does exactly what it says on the tin!). RPM keeps track of the software installed on your machine so that versions don't conflict amongst other things. A ".rpm" file then is the "ammunition" for the weapon and will typically contain a bunch of files, an install script that can be used by the rpm program, a list of dependencies (other files or packages that are required in order for this one to work correctly) and an uninstall script. You could think of it as a GOOD version of the "Installshield" system you may be familliar with from Windows. The main difference is that the full range of the system's capabilities are available to the end user rather than just the developer who built the package.

The things that RPM can do are fairly terrifying, but thankfully, as with many Linux commands, there are a few simple everyday things it can do that are damned useful. But why do I want to use the silly command line version when I have this nice shiny package manager application? Well there are just so many more fun things to do, so here goes. Want to install a package? Get yourself into the directory that contains the ".rpm" file and type: rpm -Uvh --test foo.rpm translation: U=upgrade (now you can use -i if you KNOW there is no version of the package already installed, but heck U will work too so I just always use it, since you can't go wrong), v=verbose (rpm is pretty tight lipped even with this turned on), h=hashes (makes a nice line of hashes ####, to tell you how it is getting on, requires v I think) and finally --test means "do a run-through of this procedure and tell me if it looks alright", similar to the "dummy-run" mode on CD burning software, but much less likely to cause a seizure in the user who turns it on by accident (if I had a penny for every 25 mins I have wasted waiting on a message that says "well if I HAD burned the CD it would have been cool", I would buy a faster roaster, but I ramble...).

Anyway --test will tell you if there are any dependencies you need to satisfy for the package as well as any other potential hassles. The single coolest thing about --test (and DO pay attention here 007!), is that you can "batch test" a whole directory full of rpms. This comes in handy when trying to upgrade a major component like KDE or XFree86. Without the ability to issue rpm -Uvh --test ./*.rpm any normal human being WILL lose their minds trying to work out whether anything external is needed, it is hard to explain, but trust me, this little gem will keep you sane. As will the fact that once you have tested them all you can drop the --test bit and just type rpm -Uvh ./*.rpm again this will do them all at once thereby saving the user having to figure out the correct installation order (the same thing is also to be done for the single rpm we first mentioned, removing --test will do the actual install).

Right, so what about removing rpms, dead easy: rpm -e packagename. Or what about finding out if a certain package is installed and if so, what version: rpm -q packagename. It may help if you think of -e as erase and -q as query (well that is what they mean anyway). Of course the rpm manager built into your distribution will understand your install CD's and will be able to satisfy dependencies from them. I would recommend that if you are looking for a package you use "rpmdrake" (or whatever your distro uses) to search the install CD's, before you run off to rpmfind and "going manual". Even if you do always get lucky, there is one rpm option you should burn into your brain: rpm --rebuilddb which pretty much translates to "unflog whatever has gone wrong with the rpm database" and is ALWAYS worth a shot when the rpm functions on your system start messing you about.

You will see two other options for rpm in a lot of discussions, --force and --nodeps. Don't use them, they are for the most part, best translated as "please flog my rpm database and/or system beyond all reason". The first --nodeps means "to hell with what it thinks it needs, install it anyway" and is, IMHO, asking for trouble. The second, --force has it's uses, like when you know that rpm is lying to you about something. Example, rpm wont let you install a package because it claims it is already installed, the package is either broken or half missing, then you can use --force to install it (rpm -Uvh --force packagename) but on the whole it should be considered a Bad Thing and avoided.

This is barely a scratching of the surface of this command's capabilities, but for now it is all you NEED to know.

No: 6......locate............and chums.

Blindingly obvious Linux command alert! In keeping with Linux tradition, this is one of those commands you wouldn't guess because it is just too damned obvious. Want to know where "Foo" is hanging out these days? Easy: locate Foo . This will return anything that contains "Foo" in either the file or directory name, AND it will do it instantly. This bit of magic is down to it's "other half": updatedb which, when run as root will make a database of every file on your machine. It can take a little while (5-20 minutes in my experience, depending on the complexity of the file system) so it is usually run by a Daemon in the "wee small hours of the morning", typically 4am, if the machine is down at this time, another Daemon "anacron" will attempt to run it when you do boot up. Obviously if you wish to find a very new file, you may want to run updatedb "by hand". No options, just: updatedb as root.

You may think that this is pretty stunning technology, but wait, there is more. Want to know where the essential executable of a program is (along with it's manual and source if installed)? Just type: whereis Foo. Now that is a useful command, do not forget it. If you only want to see where the executable is, try: which Foo. You are, by now starting to see that we are not in Kansas any more Toto, right?

As if this little lot wasn't enough there is also the find command. This is a little trickier than the point and click one you may have used in the other "OS" but believe me when I say that it shames it in terms of speed and power. find comes into it's own when you want to find stuff by more than just name (although it will happily search by name too). Let's say you've just downloaded a really big file, say 50MB (QNX 6.1?), and you know it is in the mess that is your home directory; somewhere but not exactly where. Try this: find /home/newbie -size +45000K . Now I really don't want to go into too much depth about find as it's functions quickly head off towards the bizarre, but trust me when I say that the next time you are looking for a file on your windows box you will probably boot it into linux to do the searching. I would say that a file would be hard pushed to hide from you now, eh? Just remember that linux is case sensitive (ie: "woRd"is not the same as "word") and you will be fine.

No: 5......grep

This is the command I have least been looking forward to. Everyone is entitled to blindness in some area, well for me it is grep. Hopefully by having to explain it here I will gain more understanding myself. There are a few conflicting definitions of what grep means but I shall furnish you with my incorrect, homebrewed definition. I say it means "get regular expression". I was reluctant to include the command as it is one of the least apparently useful in the list. However, appearances can be very deceptive indeed and a mastery of grep will lead the user on to higher things. This is basically because of the "regular expressions" used by grep, these are the key to a whole range of things in Linux, from file searching to programming and system set up.

"OK, OK! Enough!! What are they? If you are a tragic soul who has studied database design then the idea of looking for things by using oddly phrased questions will be familliar to you. That is what a regular expression is; a way of translating your request for something into a form that something as un-intelligent as a computer can't mess up. It is best if we stick to examples I feel, as explaining the ins and outs of concept is a bit much for a short work like this. OK so we have a directory full of letters (saved as ".txt" files), and we want to find all the ones that are on the subject of Windows. We could use grep "crash" ./*.txt instantly you have an answer showing every occurence of "crash" in all your ".txt" files and also showing which file each was in, and a short quotation to put it in context. This is the very tip of the iceberg. Grep's options are powerful in the extreme....learn to decode this little lot in your sleep and "strong will you be in the force young skywalker" . I want you to think about how useful grep can be when combined with some other commands, using pipes. .

If anyone out there can write a less gibbering account of grep, please mail it to me and I will include it along with a credit of course.

No: 4......cat

cat, or "concatenate" is a marvellous little toy and can be used for everything from showing a text file on the screen to making an iso image from a CD. Neat huh? To start then, let's say we have a "readme" file, you can open it in you favourite text editor (more on those next), OR use cat: cat ./readme there you go. Of course it shot up the screen so fast that you couldn't read it so, remember more and less: cat ./readme | more This pipes the output of cat ./readme into more. cat can also be used to join files. Say we want to add two files into one we would use: cat file1 file2 > newfile. Hold up!!, what's this > thing all about then? Well it is one of Linux's key features, it is called a "re-direct". See, if we just ran: cat file1 file2 we would just get the contents of both files whizzing past on the screen, because the screen is the standard place to put such stuff. The correct name being standard out or STDOUT for short. However, if we were to do this: cat file1 file2>file3 The contents of "file1" and "file2" will both be copied to "file3"

Essentially all Linux programs have a "standard out" (they also have a "standard in" that can be read from, and a "standard error" output as well, that is usually to the screen but can also be re-directed). One of the coolest things I found to do with this was to catalogue CD's. Pop a CD in the drive and type: tree /mnt/cdrom > cd1.txt this will take a nice directory listing of the CD and save it in the file "cd1.txt". Now put another CD in and repeat but using "cd2.txt", repeat until all your CD's are done. Now, in the directory with all the ".txt" files do: cat ./cd*.txt > masterlist.txt and there you have a nice CD catalogue. Neat trick huh? I don't want to dwell too long on the standard ins and outs, but commit this fact to memory: "All Linux programs can be thought of as being like a Hi-Fi component, they get their "signal" (ie: the data to work with) from "STDIN" (usually the keyboard, but can be a file, like this: command < filename , which would present command with filename as it's input) and after processing, the output is to "STDOUT" (usually the screen), just like any part of your Hi-Fi they can be "re-wired" so that other inputs and outputs are used".

In a Hi-Fi one may re-wire the output of the CD Player so that it goes to the cassette machine rather than the amplifier. In a Linux program one can make it's output go to, well just about anywhere, including the great big bit bucket in the sky: /dev/null anything sent here ceases to exist). This may all seem a little overwhelming but I can assure you that it isn't as hard as you might think, and anyway the important thing is that you get the idea of these things into your head now, as you never know when you may suddenly feel the need to use them.

One excellent use for both cat and redirection is in making ISO CD images. Now one can fool about for a while with various tools trying to make an ISO from a CD (which you would do in order to mount the image as a filesystem, ie: the file on your HD will be treated as a real CD to all intents and purposes, cool eh?. If you wanted to make multiple copies of Linux for your friends without inconveniencing your master CD's). But in the end the simplest method is simply cat /dev/cdrom> image.iso. Now compare that to loading up a great big advert sponsored app in Windows to do the same job, most mighty I think you will agree.

One more thing, cat doesn't care about filetypes and can work with any file you may have. Just today I found that the Frank Zappa concert I had ripped with "cdparanoia" (a most cool proggy) and encoded with "bladeenc" (also cool), was pretty bad because of all the track markers breaking up what should be a continuous tune. No problem, a quick cd into the directory with all the mp3s and then cat ./*.mp3 >./wholegig.mp3 and all is well again!

cat, STDOUT, STDIN and STDERR (and tree which allows you to send something two ways!) are on the same level as "real-world" screwdrivers and spanners (US = Wrenches). They are key tools for working with other commands, and a full list of their uses would be larger than this entire document, but for now you know about them and you will, I am sure, find them useful in ways I haven't even guessed at. Here, the concept is the important thing, play about!!.

No: 3......pico/nano

As you get into Linux you will quickly find that the quickest way to make a configuration change is to get in "under the hood" and do it "by hand". It is often much easier and faster to just edit the appropriate configuration file, you will also notice that much of the advice you will receive on usenet is geared towards this "get-your-hands-dirty approach", mainly because such methods are less specific to the particular system. For instance not everyone has Gnome installed and therefore not everyone has access to the Linuxconf graphical configuration tools. But everyone DOES have the files that those tools edit.

Now to edit these files we need an editor (startling conclusion that!). There are two main text editing tools available for *nix systems, vi and emacs. We shall use.....neither! Why on earth would we do this you say? The answer is two-fold. Firstly, although both these tools are immensely powerful, neither is anything like intuitive enough for the newbie to use straight away, I mean, there isn't much incentive to get editing if you have to spend a lot of time working out the editor itself (at least for now). The second reason is one of religion, the "holy war" between those loyal to vi and emacs is a computing legend and is not something a newbie wants to get into I assure you!

So we are going to use pico or nano. Pico is the text editing tool that is packaged with the pine email program that is included on the Mandrake distribution CD's (along with many other distro's). Nano is a standalone clone of pico that has one or two cool extras like find-and-replace, but from now on we will refer to only pico, as this is probably already on your cd's (although if your modem can stretch to a 400k download (sucks air through teeth at the vastness), I would grab nano).

OK, wassit do then?. Pico is IMHO the most intuitive and newbie-proof (read as, "less likely to cause hair-loss"), text editor around. You can use it to inflict all manner of insane and inept mistakes upon your poor system, thereforee pico is good:). This is an important thing to understand, hosing your system is good! Here's why, if you mess up with a graphical config tool, it might be game over (for someone inexperienced, gurus can do miracles). On the other hand, if you foul up when directly editing a file then you can restore your backup and continue. And in doing so you will have learned:)

VITAL KNOWLEDGE: Before ploughing into some important system file like a madman, BACK IT UP!! Witness the following as an example: to safely fool about with /etc/fstab, perform the following using the cp (copy) command: cp /etc/fstab /etc/fstab.saveass or perhaps: cp /etc/fstab /etc/fstab.unflog . Some people would advise the use of ".old" or ".bak" as a good way of labelling your backups, but my names are more descriptive, and sillier:). Also note that double extensions are fine in Linux, you can rename "modules.conf" to "modules.conf.unflog". Now if you blow it all up, you can delete the broken file using rm (for remove): rm /etc/fstab and reverse the cp command you used above (cp /etc/fstab.unflog /etc/fstab), and you're back in business!

Now we can continue, safe in the knowledge we can save our backsides if needed. When you need to hack at a file, be it a system configuration file or a little note to the milkman, just type pico filename (remember the ./ convention to use files in the current directory). If filename does not exist pico will open a new file with the name you specify. Pico's interface is good for the new user because it's commands are shown along the bottom of the screen. The "^" character beside the letters means the "Control" (CTRL) key, so ^o means press "Control" and "o" together -aka "CTRL+o" (you will notice that ^o is labelled as "write out", this is pico-speak for "save"). From here I figure you can manage it on your own, as the rest of the options available to you will be either obvious and/or familliar to anyone who ever used any text editor ever. Of course once you are bored with pico you can join in the Holy Wars and choose your side:)

No: 2......man

Now if anything in this Newbie Top Ten is going to get me flamed by my elders and betters, then it is the bare fact that I have put man at Number.2. Many people would say it is THE most important command on your system, and while it IS for the more experienced newbie (newbie 2nd class), I think my choice for Number.1 is better. So, man is..?

man is man(ual page). Virtually every command on your box has a man page, as do some of the large apps. Just type man commandname and sit back in wonder as the world is revealed. Man pages can be a little daunting at first, but do read them, after you have read a few you will get the idea of how they work. As a practice, go back to the top of this list and go through each command mentioned and look at it's man page, try and see how the options and methods for the commands that have been explored here, are described in the man page, you will be a guru in no time. Oh and don't forget man man :) Some programs also have an info page that one can get with info commandname Not a lot else to say about it, just get reading.

No: 1.......apropos

As indicated above I think this command is more important to the new user than man. The main reason being that one of the most common cries of the newbie is "How the hell do I..?" apropos translates as "How the hell do I..?". All you have to do is type: apropos subject. Sometimes the results can be a little over-zealous and contain references to various libraries that pertain to the subject, this can be a bit scary to the newbie, but is essential for more advanced users and especially developers. This command is your friend. A story: A while ago I was wondering how to record sounds to my HD, I downloaded several half-baked applications for the purpose with limited success. On a whim I tried apropos and looked for "record", I discovered that Linux has a command rec for this very purpose. Could have saved much hassle and embarrassing Usenet posts if I had just done this earlier. Remember this tale of caution. There isn't a lot more to say about this one either really, although you could try man apropos:)

The Bulffer's guide to compiling from source.

What is compiling?......Taking the code that a program was written in and tunring it into a runable program.

Why would I do it , what are that advantages?......When you get a pre-compiled program ( like all windows software and most RPMS) You get a version that is compiled to run on a huge array of systems, with support for all of them built in, or the code optimised to a "lowest common denominator" version of itself that may not be very quick but won't offend too many systems either. However. when you compile your own programs from source, the first stage of the process literally asks " Right where am I and what do I need to do my job here", So you end up with a smaller program, tailor made for your system.

So, how is it done? Once you have unpacked your .tar.gz with the source in it, enter the directory the unpacking created. You should Always read the readme file to make sure you don't mess up. But the general procedure is as follows.

./configure: this is a script that will take a look at your system, sometimes it may ask you some questions. The results of this are used to make appropriate changes in the sources and the makefile which is used by the next stage.

make: this bit actually builds the program into an executable form ( often referred to as a binary). This is done in accordance with the info supplied during the "./configure" stage. Now for some programs, this will be all you do, and you will have the finished product somewhere inside the current directory or a sub-directory of it. In this case just copy it into your /usr/bin directory. Since this directory is part of your default PATH ( the list of directories Linux will look in for a command you type), you can run it by merely typing it's filename into a terminal or your desktop's command prompt. Some other packages, however, have more than just a binary program file, they may compile some custom libraries or need to make some minor adjustments to the system's configuration. These packages have a third stage to the compilation process.

make install: This phase will copy the program file, and any libraries or other miscellaneous baggage, to their final appropriate resting places. It may also make a few small changes to some system configuration options, CHECK THE README!!!!!.

Some packages you download may have other stages or totally different ones, that you will need to read the documentaion for but the above three steps are by far the most common and it is important that you know what they actually are.

When computers attack!!!! Or...Common compiling problems. You may be told that make cannot be found, just install it from you CD's, it is just a command like any other. Another error you will often get, is that it can't find a compiler. Ensure gcc is installed, this is also on your CD's. There may be other compilers that some packages may want, but this is very rare. Another common newbie-stopper is that you get aparrently incorrect dependency problems. For instance you may be told that the compile process cannot find a part of XFree86 even though you have it installed. The deal here is that the compilation process is looking for bits of X to compile into itself or to get info from. Very often all you need to do is go to your CD's and install missingpackagename-devel.rpm the -devel is ( I assume) short for developer, this file will more than likely contain the stuff you need. And if in doubt there is always rpmfind or "sanctuary" as i call it.

The Mighty shell script Start with a DOS .bat file and then add the ability to perform ANY function of the OS, and you are getting the idea. Basically if you ever find you have a lot of stuff you need to type over and over again, stick it in a shell script and you are laughing....Example....Lets say you want to backup your home and /etc directories: rattle the following into your text editor of choice......

#/bin/bash

#In the first line above the # has a special meaning #that being to let the system know that this is a script #to be run on the bash shell that is probably your default one #but on all other lines #starting a line with # means #ignore this line #very useful for putting in comments like this

#make ourselves a new directory to work in

mkdir /tmp/backups

#copy the files we wish to backup to the new directory #the options used in the cp command are #r -recursive -descend into sub-directories #p -preserve permissions -essential for a good backup as #normally the cp command makes everything belong to whoever ran it #v -verbose -log all activity to the screen -good for spotting errors #but much better for showing off:) #f -force -don't argue about little things ( note..silly things includes

overwriting existing files...good here...bad at other times. be careful)

cp -rpvf /etc/ /tmp/backups

#remember to change /home/newbie to the right username

cp -rpvf /home/newbie /tmp/backups

#tar 'em up

tar -cvzf /tmp/saveass.tar.gz /tmp/backups

#get rid of the copies we made now that we have them tar'ed #the options on rm ( ReMove) are... #r -recursive same as for cp #f -force, don't ask for confirmation, just delete it

rm -rf /tmp/backups

echo your new backup file is complete....it is /tmp/saveass.tar.gz echo please place it somewhere nice and safe like a CDR echo CONGRATULATIONS!!!! you are now a hacker cadet exit

OK, very nice now what do you DO with it. firstly save it as let's say backmeup.sh/ The .sh isn't needed but it helps to remind you it is a shell script. Then make it executable by using chmod ( see above ). Now put it somewhere in your PATH -the directories Linux will look in for any command you type. ( type echo $PATH to see what directories are included). I reccommend you place it in /sbin because that directory is only in Root's path and a procedure like this is really a job for Root.Naturally, you will need to be root to cp the file into /sbin.

Now all you have to do to back up pretty much all your crucial settings is su to root and type backmeup.sh. It would be best to have some friends round to show off the whizzing text to:) So in future instead of typing out the same old command sequences over and over again, you can just wrap 'em up between a #/bin/bash and an exit, kick back and watch the penguin do the Donkey-work. As ever this is just the tip of the iceberg in terms of what can be done with shell scripts, have a look ( NOT a tweak!! :) ) at some of the files in the /etc directory, many of these are shell scripts and are wonderfully scary:)

Sunil's alphabet soup decoder

You asked for help? You got a reply? You couldn't understand all those abbreviations in it? Well look no further, here is a small list of abbreviations, just in case you were wondering, WTF does $ABBREVIATION mean? NG Newsgroup LM Linux Mandrake MS Microsoft M$ Microsoft

FUD Fear, Uncertainty, Doubt LOL Laugh Out Loud WTF What The F*ck IMO In My Opinion BTW By The Way BRS Big Red Switch (power button) PFY Pimple Faced Youth

IMHO In My Humble Opinion ROFL Roll On Floor Laughing BSOD Blue Screen Of Death BOFH Bastard Operator From Hell RTFM Read The Flippin' Manual YMMV Your Mileage May Vary LART Luser Attitude Readjustment Tool FWIW For What It's Worth IIRC If I Recall Correctly LMAO Laughing My A** Off

AFAIK As Far A I Know

AFAICT As Far As I Can Tell


Ones not listed here are to be found HERE

Some other mindbendigly useful links

http://www.linuxdoc.org --the repository of All Wisdom http://www.mandrakeuser.org --Very useful guides http://www.linux-newbie.org --Speaks for itself really:) http://www.mandrakecampus.org --Online courses, very good ( although, strangely, the Admin course doesn't cover deleting the accounts of users who stole your parking space, or even how to wire an ethernet plug into the mains for the ultimate vengance) see......here......... http://bofh.ntk.net/Bastard.html --for an explanation and a damned good chuckle) http://www.linuxmandrake.com --Home, home on the range http://www.linuxheadquarters.com --Some very good everday use tutorials. http://www.tuxedo.org/~esr/jargon/ wonderful resource read a bit a day and laugh your way to knowledge

And don't forget your /usr/share/doc directory, it has much wisdom. Also look on your cd's or hard drive for a Document called "rute.pdf" ( from rute.nn.n.rpm I believe. It is like having a UNIX drill-instructor in your ear, but if you follow it's order you will be a lean mean Linux machine.

THE LAST WORD

You have taken a big step forward if you have read ( and understood) this page. You aren't in any danger of re-writing Linux from the ground up just yet, but hopefully you will be best friends with your terminal and ready to do battle with all the other options for the commands we have discussed as well as being prepared for the many dozens of others lurking in the depths of your box just waiting on your orders.

Go forth, and enjoy your penguin:)

There you have it! The Top Ten most useful commands for newbies, I believe if you read this all, poke about for a while, come back and read it again you will be in pretty good shape. Then, (and this is the important bit) find some friends to show off to as your mouse sits idle while you molest your poor machine like an oldschool hacker. If you have a burning desire to add a command, then write up a little paragraph on your personal favourite and mail it to me at Mail

Feel free to send any good newbie article links you know of. I am most intrested in things simmillar to this, stuff that opens your eyes and makes you say "ooooooh".:)

All flames directed to /dev/null

Steve Campbell Chief Machine Torturer The SlightylyNarrow SoundSystem

With the capable assistance of Sunil Patel Proof reader and un-abbreviator.

There'a alaways linuxquestions.org or ubuntu's own fora.

Not sure how kick ass the ubuntu live CD is, Knoppix is certain more fully featured, but the ubuntu one is VERY slick running in comparison (remember, running from compressed files on a CD's always gonna LAAAAAAG).

If you are tempted to install onto a machine with an existing OS, use something else to shrink the partition with that on it first, I had a bad experience once with a linux partitioning tool resizing FAT32, Linux seemed to count disc blocks correctly from 0 and windows wrongly from 1....the result was that windows could always "see" the Linux partition and it drove it mental.....it was just BURNING to format it.

you FUCKING WHAT?

excuse me.. I just needed to quote the longest post ever, and swear on a Sunday.

0 likes

:rofl:

Was SO tempted to quote you, but It was cunty enough to post the shite in the first place.

FWIW, all this talk of typing at the computer might give ppl the wrong idea. All the point and drool stuff is there too if you prefer that.

Told yous all before, download Knoppix or Ubuntu (Knoppix does more, Ubuntu's slicker). Play with it. One day it may save your bacon, or at very least help you decide if your PC is fucked, or if windows has just had one of it's little turns. You don't install it, you just burn the CD, set the PC to boot from CD, and it works like a big ass playstation.

0 likes

Sorry to bring this back uf it annoys people.

But had to ask...

I am going to get a big external HD i think (or a portable one)

I could offload my data to said drive and just leave the computer for the OS

or is it better to load Ubuntu from an External HD-if it can be done?

0 likes

Either all really.

Installing o the external: You might get some issues with the bootloader if you remove the external though. Particularly if the machine's internal drives are SATA (the drive's ID's will change depending on whether or not the external is present). Should get away with it if you install the bootloader ON the external.

0 likes

actually I was going to install a bootloader like Grub (recommendation from a techie co-worker) on the external.

I figure I can attach the external and just download the bootloader to the external.

I have the Ubuntu disc and can format the external as I please.

0 likes

LiamShed wrote: actually I was going to install a bootloader like Grub (recommendation from a techie co-worker) on the external.

I figure I can attach the external and just download the bootloader to the external.

I have the Ubuntu disc and can format the external as I please.

Yeah you can do that, means going through the BIOS boot selector to change OS's but apart from that it works fine. Installing the bootloader to the internal would give you trouble if you removed the external, as half of grub actually lives in /boot ( be it a folder or a partition)

0 likes

or since I do not have tons of $$ I was thinking maybe some upgrades.

go from 512 MB RAM to 2 gigs in XP

http://www.crucial.com/store/mpartspecs.aspx?mtbpoid=FDDD7433A5CA7304

and since I can add another internal HD-why not??

http://www.4allmemory.com/index.cfm?fuseaction=search.memorySearch3&model_id=53325

for $100-ish total-extend the life of my desktop for a while longer. I'd love a new laptop but save the major cash for a rainy day.

0 likes

That's a good plan. And here's what you do then............

Chop the new drive in half, use partition magic, or window's own disc management console (burried deep in the admin tool control panel). First half is formatted to DOS.....FAT32 if you have no big files (over 4GB), NTFS if u do. NTFS is the better filesystem, but it's more bloated and Linux is suspicious of it and uses a reverse engineered filesystem driver because a certain cunt wont tell anyone how it works....Ubuntu seems to pile on in their with gay abandon, and swears is 100% stable for read and write....Gentoo and a lot of other distros still consider the writing part of the driver as "here be dragons". I have fuck all experience myself. The other half of the drive you chop up into your future / 20GB should be MORE than enough /boot Miniscule.....100MB-500MB (if your chosen install method suggests you use a separate /boot that is.....it has advantages....like you never mount it in day to day use so cannot hose your system without concious effort [1], and it has diasadvantages....like you never have to mount it in normal use, and you forget and wonder why all those cool hacks you did to grub.conf (or menu.lst whichever name your distro uses) don't seem to appear when grub next runs.) /home as big as you like, as you no doubt know this is your "my shit goes here" folder. and of course /swap coupla GB

You can still do all of that inside the windows disk manager or partition magic if you are a little reluctant to do your learning with stuff like cfdisk and parted.

During linux install you will clearly see these partitions and can simply do a "point and format" on them.

Install grub to the windows drive.

If you like, make backups of windows and data into the new windows partion on the new drive before you start with installing.....no matter how big a twat you manage to be, you will not fuck two drives at once :lol:

[1] I have JUST basically destroyed my laptop. Gentoo move a few very key things around between packages....so some of the updates I wanted to install needed me to remove other programs, which they would replace (eg....mktemp a command for making a temporary directory, which presumably does something that "mkdir /temp" doesn't, has moved from being it's own package, into being part of coreutils). I was MEANT to remove mktmp......I removed coreutils....so the machine no longer had..... ls cd rm mkdir and so on.....which meant that the package installer could no longer work right (it tried, bless it). SO....one really big paperweight with Dell stamped on it. Luckily Gentoo have a binary repository with "bog standard, unoptimised, runs on anything" binaries of their packages.....a quick "cd / && tar xvjf /root/coreutils.something.tar.bz2" and I had a version of those commands good enough to get a proper one installed again. Phew. Needless to say, everything else I was doing with the machine didn't even notice what was going on.....a bit like whippin the table cloth out and leaving the vase standing.

0 likes

Cambo, I was having my coffee and NOOL in the morning as usual, but this morning it was pouring rain in the backyard. Being that I'm from California, I really didn't know what to do, so I took my computer inside and shook it really hard to try and get the water out, then Saran wrapped the entire thing tightly to make it water proof and went back outside (amazingly my coffee was half drunk, but when I went back it was full!). The computer started making wierd fizzled and popping noises, and slowed down alot. What should I do?

Oh by the way it has Windows 95 on it, if that helps at all.

0 likes

Plus, I found that waterpoofing it, in the way mentioned, I can't get to my coffee cup holder that pops out the side. How can I get to it and also keep the computer waterpoofed? Please help, in desperate need!!

0 likes

okay found thid about my hard drives

"Storage controller

Type: 1 x Serial ATA - integrated

Controller Interface Type: Serial ATA-150 Storage controller (2nd)

Type: IDE - integrated

Controller Interface Type: IDE/ATA"

so okay first drive bay is SATA (plus)

the second bay is IDE, I assume? or if it is ATA compatible, can I use a SATA drive in bay #2?

0 likes

EdelBrock wrote: Plus, I found that waterpoofing it, in the way mentioned, I can't get to my coffee cup holder that pops out the side. How can I get to it and also keep the computer waterpoofed? Please help, in desperate need!!

You can buy external, usb powered coffee cup holders (they may not work with windows 95). Try and aim for the "CDRW" (Cup Deposition Retractable Whatsit), not the DVDRW (Drink Vessel Deposition Retractable Whatsit) As they're just the same thing really, but the latter costs far more.

0 likes

okay found what I was looking for....

" Drive bays Bay type Quantity 5.25-inch, external Two (one available) 3.5-inch, external Two (one available) 3.5-inch, internal One (occupied)"

Does this mean I may not be able to add a second internal HD?

0 likes

LiamShed wrote: okay found thid about my hard drives

"Storage controller

Type: 1 x Serial ATA - integrated

Controller Interface Type: Serial ATA-150 Storage controller (2nd)

Type: IDE - integrated

Controller Interface Type: IDE/ATA"

so okay first drive bay is SATA (plus)

the second bay is IDE, I assume? or if it is ATA compatible, can I use a SATA drive in bay #2?

IDE is also called "Paralell ATA" to destinquish it from SATA, because despite their differencees, they are both subsets of the ATA standard, so let's just leave things to IDE and SATA then for clarity.

Your IDE controller can handle two or four drives.....two per cable, a master and a slave (ahhhhh whole new worlds of jumper-joy about to open up to you.....lock the prozac in a safe place)....you need to check how many sockets you have.....1 socket, 2 drives, 2 sockets, 4 drives. Your CD drive is probably IDE, so unless you have two sockets.....you may be all IDE'd-out. Sata is better anyway, quicker and there are no jumpers involved (yeah they're a doddle, jumpers, right up until the first time you move some drives around and nothing boots because you forgot and put two masters on one IDE line and two slaves on the other and your BIOS has run away and hid from you).

Linux enumerates IDE devices as HDA HDB HDC and HDD, and SATA drives (as well as USB externals) as SDA SDB SDC etc etc etc.

With IDE the A B C etc is worked out by whichever order it finds the drives in while LOOKING in a certain order.....ie it looks for a primary (the two IDE sockets if you have two, are named primary and secondary cos people don't call things 0 and 1 like the BIOS does LOL ) master drive first, which would be the drive inflicted with windows in 99.999999% of such machines, this gets called HDA....then it looks for a primary slave, then a secondary master and a secondary slave (it'll also go on to others if you have an IDE control card or a freak motherboard with more than two IDE sockets (welllll, busses to be precise)), the next drive it finds in that sequence gets HDB and so on. SATA and USB are enumerated in the order they are found or connected....your SATA sockets are numbered and looked at in that order, again SDA is the first found (note: it doesn't have to be in the first socket, you can have two drives, one in socket 2 and the other in socket 5, they will still be SDA and SDB ( wellll /dev/sda etc).

The way el pingu uses discs and partitions freaks the balls out of a lot of people who are used to C:\ D:\ etc.......but it takes no time to wrap your head around the naming, and mounting....and then you see all the thngs you can do, and why it all works more sanely....I mean you NEVER need to reinstall linux cos you ran out of disc space.....shove another disc in, copy a huge directory worth of shit onto it, delete the original and then mount the new drive AS that directory.....as if changing from C: to C:\Program Files took you to what you now know as D: seamlessly without you or the system really noticing the change.

That stuff is telling you about the disc controllers not the discs.....the controller being the chip which controls....yeah you get it. Drives should be in the device manager in the system control panel (hey, instead of mousing it....open your windows run prompt and type "control sysdm.cpl" sans quotes. You should probably still stick your head inside the machine and look at how may sockets there are and where the existing discs are plugged in. Sata=small, IDE=big plugs and probably ribbon cables.

0 likes

LiamShed wrote: okay found what I was looking for....

" Drive bays Bay type Quantity 5.25-inch, external Two (one available) 3.5-inch, external Two (one available) 3.5-inch, internal One (occupied)"

Does this mean I may not be able to add a second internal HD?

Not sure actually....... I think so, unless the machine has two floppy bays and 1 HD bay, in which case someone needs to die. You can wedge another HD into the 5.25" bay anyway with a little bracket that costs about $5-10, so you wont be left holding a useless drive.

I keep forgetting you've not got this thing yet and can't stick your head inside it.

0 likes

True. I work with a few kids who make their own computers. They could always help me out. They'd know what they are looking for.

and with my shaky hands, any small screwdriver is a pain for me. That is why I never I did that. Well that and I always lose those tiny screws!

the hood is held on by four tiny phillips heads screws and one twist off knob.

0 likes

There's nothing a normal sized Phillips can't handle. You can even use magnetic ones, even on hard discs....just don't keep the screw on the driver all day, and never bring the driver near the top or bottom of the drive, only the sides, which are 1/4" mild steel......more than effective at dissapating magnetism.

0 likes

You're leaving NewOrderOnline

This link goes to an external website we don't operate, which has its own privacy policy and terms.

Destination:
Continue ↗