Page 1 of 2 12 LastLast
Results 1 to 15 of 17
  1. #1
    Joined
    Jul 2001
    Location
    UK
    Age
    49
    Posts
    20,231

    * * * * All New Linux Forum FAQ * * * *

    Welcome to the all new Linux Forum FAQ.

    The idea is to create a simple but easily seachable FAQ. Like the Linux Forum Links thread, this thread is designed to expand, but that will depend on you, the forum members, submitting your FAQs. To make a submission either PM a forum moderator or post it in the forums.



    Bonso has recently started an FAQ which I hope he'll submit to this, and I know Provicemo has also expressed an interest in doing some bits. If you'd like to tackle a topic, I would suggest either using Bonso's thread or starting a new thread as a "workshop" to work on your FAQ, and then when you're happy with it, it can be added here. Also, suggestions for a list of topics to be covered would be useful then people can pick off which they would like to cover. I've started the ball rolling below to give you an idea (there is a 10,000 character limit per post and I'd suggest one topic per post).

    Bonso's FAQ Thread can be found here or in HTML form.

    Ned
    Last edited by Ned Slider; 03-16-2005 at 04:46 PM.

  2. #2
    Joined
    Jul 2001
    Location
    UK
    Age
    49
    Posts
    20,231

  3. #3
    Joined
    Jul 2001
    Location
    UK
    Age
    49
    Posts
    20,231

    Re: * * * * All New Linux Forum FAQ * * * *

    How to download and burn your copy of Linux



    Originally Posted by Ned Slider

    The first thing you'll need to do before you can try out linux is to download and burn your chosen copy to CD (or DVD). Here I will address a few common questions to help you out. First you'll need to decide which Linux distro you want and then download it from the distro's site or a mirror site (see the Linux Forum Links sticky for the common distro download sites). The files will most likely be in .ISO format (CD or DVD image files), one per disk. Files that have SRPM or source in the name are normally not required as these contain the source code. Files that have x86_64 are probably 64-bit versions and i386, i586 or i686 are the common 32-bit versions.

    Once you've downloaded your .ISO image files, before you burn them to disk it is wise to check that they have downloaded correctly and are not corrupt. To do this, we use something called an MD5 checksum. In the download directory of the server you will probably also find a small file called MD5SUM or similar that contains a long checksum number for each file. We must now perform a checksum on each downloaded .ISO file and check that it matches - if it doesn't match exactly then the downloaded file is corrupted. The md5sum file is available on all Linux systems and a copy for windows may be downloaded here. Simply download and save the md5sum.exe program in the same directory as your downloaded .ISO files and run the program from a DOS command prompt as follows to check each .ISO file:

    Code:
    md5sum.exe FC3-i386-disc1.iso
    db8c7254beeb4f6b891d1ed3f689b412  FC3-i386-disc1.iso
    As you can see, the command outputs the checksum together with the file name, and this must exactly match the checksum for that file on the server. In this case it matches so the downloaded file is good and we can now burn it to CD. When burning the image file to CD, it is important to burn the file as a CD image, not just write it to CD as a normal file. You can find instructions here for common Windows CD writing software.

    Congratulations, you've just created your first linux CD and you're now ready to think about installing it.

    ..
    Last edited by Ned Slider; 03-21-2005 at 02:18 AM.

  4. #4
    Joined
    Jul 2001
    Location
    UK
    Age
    49
    Posts
    20,231

    Re: * * * * All New Linux Forum FAQ * * * *

    Can I try out Linux without installing it?



    Originally Posted by Ned Slider

    Yes. There are a large number of Linux distributions that are available in what is commonly known as Linux LiveCD format. These are typically single CDs that are bootable and run Linux directly from the CD. They load Linux to a RAM drive and thus do not need to be installed to the hard disk. Because they run from CD, they are somewhat slower in booting and do generally require a reasonably fast machine (modern CPU, 256MB RAM) with plenty of memory.

    The main advantages afforded by Linux LiveCDs are that they offer a way to try out Linux without having to install it to your hard disk. This is a great way for potential new users to get a feel for Linux and to check their system for hardware compatibility. They also make very useful system recovery CDs.

    A comprehensive list of Linux LiveCDs is available here. Knoppix is probably the most well known of the Linux LiveCDs, but there are now many variations to choose from including LiveCD offerings from some of the major Linux distributors. They are generally available for download in ISO format - see the section on How to download and burn your copy of Linux.

    ..
    Last edited by Ned Slider; 03-21-2005 at 02:15 AM.

  5. #5
    Joined
    Jul 2001
    Location
    UK
    Age
    49
    Posts
    20,231

    Re: * * * * All New Linux Forum FAQ * * * *

    How should I partition my hard disk for Linux?



    Originally Posted by Ned Slider

    Basically, you don't - well, not in advance anyway. Most modern Linux installation routines have the facility to partition and install to unpartitioned free space and it is probably best to let Linux handle this for you until you know what you're doing. How much space is required and how it's distributed will depend on the distro, but as a general rule of thumb, you'll need the following:

    Many modern distro's use a /boot partition to store the booted kernel. Fedora, for example, will allocate 100MB to this partition which is more than ample. Generally anywhere between 10-100MB is a sensible size. Next, you'll need a linux root partition (labled "/"). This will store the complete OS and together with all applications. Again, size will depend on the space you have available and how much you wish to install. 5GB is probably a minimum starting point for modern distro's with a good representation of applications installed, 10GB would be better for trying out a distro and more if you have the available space. The root partition can be further sub-divided into partitions but there is no need to do so if you don't want to. The only other partition you'll need is a swap partition that is used like a page file in Windows to swap code from memory to hard disk. Generally it should be at least the size of your physical RAM and up to twice the size of your RAM depending how much memory you have installed and whether you run memory intensive applications and are likely to regularly run out of physical memory.

    Some discussions on this topic can be found here:

    http://forums.pcper.com/showthread.php?t=363102

    http://forums.pcper.com/showthread.php?t=362819

    ..

  6. #6
    Joined
    Jul 2001
    Location
    UK
    Age
    49
    Posts
    20,231

    Re: * * * * All New Linux Forum FAQ * * * *

    What filesystem should I use for Linux?



    Originally Posted by Bonso

    Linux uses its own and as per usual there are loads of them to choose from. The more popular choices that many distros default to are Ext2/Ext3 and ReiserFS. Linux can read and write to FAT32 filesystems (partitions) but only read NTFS with a maintained level of data integrety (ie without having you reach for your backup). I would recommend sticking with Ext3 or ReiserFS unless you need some of the specifics in for example XFS.


    Originally Posted by Ned Slider

    The Linux Ext3 filesystem is becoming the default filesystem for many Linux distros. Generally, new users are probably best advised to stick with the default choice of their chosen distro. An additional FAT32 partition should be used where a user wishes to share data between Windows and Linux on a dual boot system. For example, an NTFS partition for the Windows system, an Ext3 partition for the Linux system, and an additional FAT32 partition that is shared between both Windows and Linux systems.

    ..

  7. #7
    Joined
    Jul 2001
    Location
    UK
    Age
    49
    Posts
    20,231

    Re: * * * * All New Linux Forum FAQ * * * *

    Can I dual boot Windows and Linux?



    Originally Posted by Bonso
    Additions by Spankin Partier

    The easiest way to dual boot is to use a Linux bootloader. The major distros will do this for you as long as you install Windows first and then Linux. When you install Linux, pay attention to it as Linux doesn't label drives and partitions like Windows does. The master drive on the first IDE chain is called hda and the slave hdb. Primary partitions start on the number 1 and extended partitions start at 5. So hda6 would be the second extended partition on the master drive on the first IDE chain.

    ..

  8. #8
    Joined
    Jul 2001
    Location
    UK
    Age
    49
    Posts
    20,231

    Re: * * * * All New Linux Forum FAQ * * * *

    How do I boot between several Linux Distributions?



    Originally Posted by Saikee

    The lazy way is usually the "easiest" way.

    I recommend the hard drives to be pre-partitioned first. My favourite tool is the cfdisk. I give 5Gb to a Linux that comes in one CD. For a distro in multiple CD or DVD I allocate 10Gb. No need to format any of them.

    When the first Linux has Grub as its boot loader comes along put it into the MBR and amend its /boot/grub/menu.lst to add for every empty partition the following 3 lines

    Title empty partition in hda5
    Root (hd0,4)
    Chainloader +1

    Title empty partition in hda6
    Root (hd0,5)
    Chainloader +1

    Title empty partition in hda7
    Root (hd0,6)
    Chainloader +1

    and so on until all the empty partitions are included.

    When a new distro is received just install it into any of the empty partitions. When it comes to the location of its bootloader just tell the installer to place it in the root partition, i.e. not MBR. On reboot the new distro will be bootable at the designated partition. If everything works satisfactorily then go to amend the /boot/grub/menu.lst of the Grub in the MBR to replace the "empty partition" with the new distro's name.

    This scheme, of having distro entries in the boot menu prior to their installations, works for any Linux and BSD.

    Lilo checks every partition to see if it is bootable first and so it wouldn't implement unbootable entries, so if a user wants to be lazy sticks with Grub. If he/she really like to do work go with Windows's NTLRD.

    --------------Edited addition-----------------------

    For those realising the above to be equivalent to "How to multi-boot 100 systems in a nutshell" and decide to load up hundreds of Linux distros in their 300 or 400Gb hard disks here are some brickwalls in front of you. (If you see blood stains at head level on these walls you can tell some of them are mine!)

    (1) Most distros are not yet capable of crossing the 137Gb barrier. If their kernels can their boot loaders may not. The brave ones are Mandriva, Suse, Sam and Slax.

    (2) The Red Hat family of Linux don't seem to expect more than 16 partitions in a hard disk, regardless if it is an IDE or a Sata. You will have a job to ask them to help you to reach the higher partitions.

    (3) The current maximum number of partition permitted by Linux is 15 for a Sata and 63 for an IDE. I can reach the former but the only managed 60 partitions maximum for the latter. Also Linix is known to have a ceiling limit of 255 "raw devices" which I take it to mean partitions too, because a partition is named /dev/hda39 etc. If you want to investigate this limit please go ahead. I feel stupid enough to get this far.

    (4) Linux installable at beyond 137Gb but unchainloaderable may still be bootable by direct kernel address. That is to replace "chainloader +1" above with

    kernel /boot/kernel-2.6.12-i386 ro root=/dev/hdax
    initrd /boot/initrd-2.6.12-386

    where the two files after kernel and initrd are the relevant kernel and initrd files of that Linux. No need for the last statement if the Linux doesn't use initrd. The two are always stored in /boot partition.

    (5) A small number of old Linux distros are unable to accept partition number higher than 20.

    Suggest to print this page in toilet paper so that it can be used to soak blood if your head bangs against one of the above brickwalls.
    Last edited by Spankin Partier; 09-12-2005 at 05:44 PM.

  9. #9
    Joined
    Jul 2001
    Location
    UK
    Age
    49
    Posts
    20,231

    Re: * * * * All New Linux Forum FAQ * * * *

    How do I share files between Windows and Linux?



    Dual-booting:

    Originally Posted by Ned Slider

    If you are dual-booting, the simplist way is to set up a separate FAT32 partition to store files you wish to share between the two operating systems. Linux has built in read/write support for FAT32. The Linux kernel also has native support for reading NTFS partitions (although it's not enabled by default in Fedora). NTFS write support is also possible but extreamly risky and is best avoided.

    Please also see the section on mounting partitions.


    Networking:

    Originally Posted by Ned Slider

    The easiest way to share files between Linux and Windows over a network is you use Samba that supports Windows native filesharing. Samba has two components - a client and server. Use the client to connect to a Windows shared folder or the server if you wish to share files on your Linux machine (you'll need to open ports 137-139 and 445 in your firewall for a Samba server. See the section on iptables). Additionally, you could use Microsoft's Services for UNIX but be warned that it only supports Win2K, WinXP Professional and Win2K3 Server - it does not support Windows XP Home Edition, WinNT4 or Win9x.

    See this thread and links contained therein for some more info on Samba.

    ..

  10. #10
    Joined
    Jul 2001
    Location
    UK
    Age
    49
    Posts
    20,231

    Re: * * * * All New Linux Forum FAQ * * * *

    How do I mount a partition?



    Originally Posted by Ned Slider

    Linux needs to mount a partition before it can use it. Linux's own partitions will be automatically mounted at boot time, but any additional partitions must be mounted on to your filesystem before they can be used. Before you can mount a partition, you must create a location, or mount point, on your filesystem where the partition will be mounted. This is simply a matter of creating the directory or folder and traditionally this is done in /mnt.

    There are two ways to mount a partition or filesystem - manually using the mount command or automatically at boot time by adding the mount to your /etc/fstab file. For example, to manually mount a FAT32 partition hda5 at /mnt/fat, first create the directory /mnt/fat and then, as root, do:

    Code:
    mount -t vfat /dev/hda5 /mnt/fat
    and to unmount, use the umount command:

    Code:
    umount /mnt/fat
    An often more convenient method is to have your partitions automatically mounted at boot time, and this is done through the /etc/fstab file. Using our example above, we would add a line to /etc/fstab as follows (note: you need root privileges to edit /etc/fstab):

    Code:
    /dev/hda5      /mnt/fat      vfat      defaults   0 0
    More discussions on mounting partitions in /etc/fstab can be found here, here and here. A good guide covering mounts is available here.

    ..
    Last edited by Ned Slider; 03-21-2005 at 02:20 AM.

  11. #11
    Joined
    Jul 2001
    Location
    UK
    Age
    49
    Posts
    20,231

    Re: * * * * All New Linux Forum FAQ * * * *

    Linux Filesystem



    Originally Posted by Spankin Partier

    The Linux file structure is as organized as organized as a library. But until you learn the Dewy Decimal System, you'll never be able to find what you are looking for. So here's a quick 123 on the Linux filesystem.

    /bin - The common programs that make up Linux core commands are stored here.
    /boot - The Kernel and boot files.
    /dev - Device files are located here.
    /etc - All system wide configuration files.
    /home - User personal files and settings.
    /lib - Shared library used by the Kernel and basic Linux commands.
    /lost+found - Any files that have been determined to be damaged.
    /misc - Miscellaneous files.
    /mnt - Mountable file systems like CD-ROMs, Floppy Disks, USB Drives, and non Linux partitions.
    /proc - Directories and files that report system status.
    /root - Home directory for the Root user.
    /sbin - System administration programs are stored here.
    /tmp - Temporary files are placed here.
    /usr - Files that pertain to the local installation (See below)
    /var - All files that need to be changed often (variable files), like logs file and spool files are stored here.

    /usr/X11R6 - X is stored here.
    /usr/bin - Common Programs.
    /usr/etc - Configuration files.
    /usr/games - Games
    /usr/include - C header files
    /usr/lib - Shared libraries
    /usr/local - Other applications
    /usr/man - Manuals
    /usr/sbin - System administration programs
    /usr/share - Shared information
    /usr/src - Source code

    Each distribution of Linux will vary from this slightly. Some directories may be missing, and others will be added. But this is pretty much the standard layout. To learn more about the official Linux filesystem, click here.
    Last edited by Spankin Partier; 04-11-2005 at 09:02 PM.

  12. #12
    Joined
    Jul 2001
    Location
    UK
    Age
    49
    Posts
    20,231

    Re: * * * * All New Linux Forum FAQ * * * *

    Working with tar, gz and bz2 files



    Originally Posted by Ned Slider
    Additional contributions by Spankin Partier

    Tar files (sometimes called tarballs) are the Linux equivalent of Window's zip files except that they're not compressed. The tar (Tape Archiver) program is a really old UNIX command line utility originally developed for backing up to tape, but is still widely used today for the distribution of files in the Linux world. When compresion is required, the tar archive is subsequently compressed using either gzip or bzip2. Filenames will typically end in .tar, .tar.gz (or .tgz) or .tar.bz2 depending if they are uncompressed or compressed using gzip or bzip2, respectively. If you are creating very large archives, gzip is generally considered faster and bzip2 generally considered to offer better compression.

    Sooner or later you'll probably come across a tar file and will need to extract it. Here are the commands for extracting common tar formats:

    Code:
    tar xvf tarfile.tar
    tar xvzf tarfile.tar.gz
    tar xvjf tarfile.tar.bz2
    The switches are extract (x), verbose (v), gzipped (z), bzip2 (j) and filename (f). The function or operation to be performed, in this case extract (x), is usually the first switch and the f switch usually comes at the end and is immediately followed by the filename.

    Tar files can be similarly created using the create (c) switch in place of extract (x). Here's how we would create a tarfile of the contents of the /home/ned/temp directory, either as an uncompressed archive, or compressed using gzip or bzip2, respectively:

    Code:
    tar cvf tarfile.tar /home/ned/temp
    tar cvzf tarfile.tar.gz /home/ned/temp
    tar cvjf tarfile.tar.bz2 /home/ned/temp
    Now you know the difficult way to work with tar archives, we'll tell you the easy way. For KDE users, right clicking a tar archive and selecting open with archiving tool will open the file in Ark, the KDE equivalent of WinZip. From there you can extract your archive. (Perhaps a gnome user could provide details of a similar process in gnome). Alternatively, simply double clicking on a tar archive in KDE or konqueror will open the archive.

    As a side note, WinZip also supports tar and tar.gz files so you can share your tar files with Windows users too.

    ..
    Last edited by Ned Slider; 03-16-2005 at 11:28 PM.

  13. #13
    Joined
    Jul 2001
    Location
    UK
    Age
    49
    Posts
    20,231

    Re: * * * * All New Linux Forum FAQ * * * *

    What is the root or administrator account and how do I use it?



    Originally Posted by Ned Slider
    Additional contributions by Spankin Partier

    The root account is central to Linux's (and UNIX in general) security model and is one of the main reasons Linux is far less vulnerable to attack than Windows. Linux has a separate root (administrator) account that is only used for administrative tasks such as installing software or changing system configuation files. Each user has a separate user account for day to day usage. In Windows, you would probably have just made yourself a member of the administrators group but this is a bad thing to do. Under Linux, you simply become root whenever you need to accomplish a task that requires root privileges. The rest of the time you run as a normal restricted user.

    After first installing Linux, you are likely to come across a number of occasions when you will need root privileges, for installing some additional software or changing a system config file. The easiest way to do this is through the command line and the su command. Simply open a terminal window (shell), type su - and enter the root password:

    Code:
    [ned@jessie ned]$ su -
    Password:
    [root@jessie root]#
    Note: The final character at the command prompt has changed from $ to #. That's how Linux tells you that you are running as root.

    You now have root privileges (type exit to log out when you're done). The "-" symbol at the end of the command is an abreviation for -l or --login and makes the shell a login shell (see here for a more detailed explanation).

    If you need to run a command as root, you can now do so simply by typing it. But how would you edit a file that requires root privileges to open or edit? You can simply type the name of your favourite gui editor (such as kedit or gedit) to launch it as root and then do File > Open and browse to the file you need to edit, or if you know the location, you could launch your editor with the file ready for editing like so:

    Code:
    kedit /boot/grub/grub.conf
    What about file management? If you want to use your gui file manager to browse your hard disk as root, some distro's (such as Fedora) even have a menu option to run the file manager as super user (root). Alternatively, you can launch your file manager as root by typing the command to launch it (konqueror, for example in KDE). Now you can rename, copy and delete files as root from the comfort of a gui file manager until you become more familiar with the shell commands.

    Remember - always treat the root account with respect (you now have permissions to break as well as fix your system), only use the root account when you absolutely have to, always log off as soon as you've finished and now you should never need to log directly in to KDE or gnome as root again.

    Also see the section on how to secure your Linux box.

    ..
    Last edited by Ned Slider; 03-21-2005 at 02:21 AM.

  14. #14
    Joined
    Jul 2001
    Location
    UK
    Age
    49
    Posts
    20,231

    Re: * * * * All New Linux Forum FAQ * * * *

    Editing Files From The Command Line



    Originally Posted by Spankin Partier

    Help! I just lost my GUI and I need to change some configuration files to get it back. How do I edit them?

    In situations like this, all that is needed is a little knowledge of one or two text editors to get you by. I have found that vi (or vim) is a pretty universal tool on Linux distributions. Yet, vi can be really daunting to use until you get the hang of it. So here are some of the basic commands that are needed to get by with vi.

    To open a file, start vi with the following syntax:

    vi [/path/to/filename]

    NOTE: All system configuration files are protected. To edit them, you will first need root privilages. See What is the root or administrator account and how do I use it for further details.

    Once the file is open, use the arrow keys to navigate through the file. To switch to edit mode, press the [Insert] key. By pressing the [Insert] key again, you can switch from Insert mode to Replace (or type-over) mode. At this point, you can add or delete text as you would in any text editor.

    Once you are finished inserting/deleting text, you will want to get out of Insert/Replace mode. Do this by pressing the [Esc] key. You will notice that --INSERT-- or --REPLACE-- no longer appears at the bottom of the screen.

    To save your work, you will have to type the following command:

    :w

    Note both the colon and the lower case w. Vi uses the colon to indicate a command. In this case the command is 'write the changes to disk'. These commands can not be preformed while in insert or replace mode.

    To exit the program after saving your work, use the following command:

    :q

    This only works if there has not been and any changes since the last time the file has been saved. This prevents accidental data loss. But if you would like to abort the changes you have made and force vi to exit without saving any changes, type the following:

    :q!

    If you need help while editing a file, you can access the built in help system in vi by using this command:

    :h

    This will split the screen and show the help system. To exit the help, simply use the quit command :q to return back to your document.
    Last edited by Spankin Partier; 04-11-2005 at 09:15 PM.

  15. #15
    Joined
    Jul 2001
    Location
    UK
    Age
    49
    Posts
    20,231

    Re: * * * * All New Linux Forum FAQ * * * *

    Linux and viruses



    Originally Posted by Bonso

    Linux is not really affected by viruses and other malware common on other platforms, and if a Linux box carries a virus it is probably acting as a mail or file server moving infected files about that are intended for another OS. This does, however, not mean that there are no threats to a Linux box. If you would like run AV software on your Linux machine, these are some of the anti-virus vendors that offer AV solutions for the Linux platform. Keep in mind though that they are not intended to hunt down Linux viruses, but the somewhat more prevelent Windows versions.

    http://www.f-prot.com
    http://www.grisoft.com
    http://www.f-secure.com
    http://www.pandasoftware.com/download/linux/linux.asp

    ..

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •