Sei sulla pagina 1di 9

A /g/uide to Linux

Version 0.9-pre Contents


1 What is Linux? 2 Is Linux Right for You? 3 Which Distribution Should I Choose? 4 Getting Started 5 The Terminal 6 The Package Manager 7 Giving Back 8 Troubleshooting/Miscellaneous 8.1 Installation . . . . . . . . . . . 8.2 Windows Solutions . . . . . . . 8.3 64-bit vs. 32-bit . . . . . . . . 8.4 Linux is not Windows . . . . . 8.5 Problem Solving . . . . . . . . 1 2 2 4 4 5 5 5 5 6 7 7 8 9 9

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

9 Helpful Links and additional reading 10 Credits/Copyright

What is Linux?

The term Linux is used in several dierent ways. Linux is sometimes used as the name of a kernel initially written and still maintained by Linus Torvalds. Its also used as a general term for operating systems that use the Linux kernel and the GNU userspace, although there are operating systems that use GNU without Linux and Linux without GNU. For the purposes of the guide, the second meaning will be used. Enough about the name, what is Linux? Linux is a Unix-like operating system that consists primarily or completely of Free and Open Source Software (also known as FOSS). Unix-like means that it follows the same design principles as the UNIX operating system that was developed by Bell Labs. To grossly oversimplify it, the main idea is that everything is a le. Other operating systems following this design include FreeBSD, Solaris, Mac OS X, HP-UX, and AIX. Free and Open Source Software means two things: It is free to be distributed, and the source code is available for any developers to modify and redistribute. This allows for easier cooperation between dierent projects, prevents vendor lock-in, and allows developers with diering viewpoints to fork without losing compatibility with each other. Finally, there is a very important point to note for Windows users. Linux is NOT Windows. Many things function in a dierent way because Linux is not designed to be a Windows substitute. Projects of that nature exist in the form of FreeDOS and ReactOS

Is Linux Right for You?

While Linux is a great solution for many people, some cant make the transition at this time and that is ne. Jumping into Linux when its not the right t for you can leave you hostile towards Linux, so only make the switch if you are willing. If you fall somewhere in between, Wubi or a Virtual Machines might be an option (for more details, see the Installation section). Reasons why you may have a problem transitioning to Linux: You play high-end PC games on a regular basis You need to use specic program(s) for work, school, or personal usage that do not have a viable Linux alternative You dont have the time to learn or troubleshoot a new system Your primary computer is shared or used for critical work Your hardware is currently unsupported or requires too much conguration for your time or level of experience Reasons to choose Linux: Most Linux distributions have native package managers, which make installation, removal, and upgrading of software easy and secure A wide collection of desktop environments and window managers are available to choose from Linux is easy to customize to t your individual needs You want an operating system that consists of free software You like to learn new things You have an interest in programming and like the availability of source code in the tools you use daily

Which Distribution Should I Choose?

The open nature of Linux has led to a myriad of dierent variations to choose from. However, the variety of choices can be quite daunting for new users. This guide will provide a brief overview of the most popular distributions (also called distros by many linux users). You can nd more information at their respective websites, www.distrowatch.org , or use an interactive chooser at http://www.zegeniestudios.net/ldc/ or http://polishlinux.org/choose/quiz/. Notes on terms: Rolling release: software in the repositories is upgraded to newer versions on a regular basis, meaning there are no explicitly dened versions of the distribution. This keeps the user up to date, but there is a larger risk of breaking the system. Point release: software in the repositories is only upgraded for bug xes and security patches, with some newer software being available through backporting. This has an advantage of further testing for stability, but leaves the software dated. LiveCD/LiveDVD/LiveUSB: An operating system that can be booted directly from a CD, DVD, or USB. This requires no conguration or installation, and is very helpful for system recovery or testing your hardware. These discs typically allow for installation to a hard drive as well.

Name Diculty LiveCD

Ubuntu Beginner Yes Point; every 6 months, exRelease Model tended support release every 2 years A Debian-based distribution developed and supported by Canonical which aims to provide a simple, easy to use, operating system. Related Distros Debian, Mint, Knoppix Name Diculty LiveCD Release Model Mint Beginner Yes Point; correlated Ubuntu releases with

Name Diculty LiveCD Release Model

Fedora Intermediate Yes Point; about every 6 months

A community driven distribution based on Red Hat that aims to be on the leading edge. Related Distros Name Diculty LiveCD RHEL, CentOS

An Ubuntu-based distribution aimed at making codecs more easily available and providing the user with eye candy. Related Distros Ubuntu, Debian, Knoppix Name Diculty LiveCD Release Model Mandriva Beginner Yes Point; about every 6 months

Debian Intermediate Yes Point release about every 2 Release Model years; Rolling release of unstable branch A community driven distribution that provides a stable experience of supports for many dierent architectures. Known for support of free software. Related Distros Ubuntu, Mint, Knoppix Name Diculty LiveCD Release Model Slackware Advanced No Point; One to two releases per year

A distribution backed by the French Mandriva company that aims to be easy to use. Related Distros Name Diculty LiveCD Release Model OpenSUSE Beginner Yes Point; One to two releases per year

One of the earliest distributions, aims to be simple in design and Unix-like. Related Distros Name Diculty LiveCD Release Model Zenwalk, SLAX Arch Advanced No Rolling

A distrubution by Novell that aims to provide the user with an easy install and the centralized graphical setup tools of YaST. Related Distros SUSE Linux Name Diculty LiveCD Release Model Puppy Beginner Yes

A user-centric distribution that aims to give users up-to-date software and easily control their system. Related Distros Chakra Name Diculty LiveCD Gentoo Expert Yes Rolling

Point; about one release a Release Model s year

A lightweight distro intended for quick live usage or old or weak hardware. Related Distros

A distribution aimed at giving the user convenient tools to have complete control of their system to optimize it as they see t. Related Distros Sabayon

Getting Started

If youve already decided that you want to try Linux and have decided which distribution is the best t for you, the next step is installation. Mainstream distros have installation discs that can be bought or downloaded for free. You will typically have a choice of a direct download from the distros or a bittorrent download. There will often be a range of installation media to choose from, varying from a very small image for a network based install to a robust set of repositories spanning several DVDs. Make sure you select the proper disc for download. If you are running Windows on the computer you will install Linux on and intend to keep it (which is advised for new Linux users), its a good idea to defragment your hard drive to make partitioning easier. There are also LiveCDs that may be a better choice for users who want a casual introduction to Linux without serious risks. If you encounter any problems, see the troubleshooting section or your distros documentation 1. Download the disc image 2. Burn the image to a physical disc 3. Place disc in tray and reboot 4. Follow installation instructions and consult your distros documentation (for advanced help with partitioning, see Troubleshooting/Miscellaneous) 5. Reboot your computer when installation is complete 6. Choose Linux in the bootloader

The Terminal

One thing that often discourages new Linux users is being instructed to type a command. It is for many a realm of the unknown, which can be discomforting. While they are a useful tool, The purpose of this section is to give the user a basic understanding of how terminal commands work. Lets say theres a command called foo. The rst thing you will likely want to do is enter one of the three following commands: foo --help foo -h man foo These will bring up a brief description of the syntax and options. Commands will typically consist of three things, the program name, ags, and les. Heres an example with the copy command, cp. cp -u folder/files/file1 folder/backups/backup1 In this example, cp is the command, -u is a ag, and folder/files/file1 is the source le, and folder/backup/backup1 is the target le. The source le will be copied to the location of the target le. -u is a ag for update and will only replace the target le if the source le is newer. The key to eective usage of the terminal is not in memorization of all the commands and ags, but rather in seeing the patterns and grasping the underlying concepts. Another important thing to note is the commands needed to perform administrative tasks. They are su and sudo. su will ask you for your password and give your root privileges (root is another word for the administrator) for subsequent commands. sudo will give you root privileges for a single command and prompt you to enter your password. It is advised that you use root privileges only when needed, as you can harm your computer through irresponsible use of root.

The Package Manager

One major dierence with Linux distributions is that they almost all have a centralized package manager. Many package managers handle dependencies to ensure you have everything you need to run a program. Most of the time, if a program is available in the package manager, it will be the simplest solution, although you can do it yourself if you have advanced needs. Depending on your needs, many distros have both graphical and command line prompts, so choose the best option for you.

Giving Back

If youve found that you enjoy Linux and free software, there are several ways to give back to help improve Linux. You can donate to or buy support from one of your favorite projects, you can report bugs, try out beta versions of software, and oer suggestions. You can give technical support and guidance to others, seed torrents of free software, and share free software with our friends. If you have the necessary skills, you can contribute code or help in translation to other languages.

8
8.1

Troubleshooting/Miscellaneous
Installation

If your computer starts as normal after inserting the installation disc, your BIOS may not be set to boot from a CD/DVD. Press F2 (the key or key combination may be slightly dierent for your computer, so if the specic key doesnt appear onscreen during startup, check for further details of your manufacturer and model) at startup to access the BIOS. Navigate through the menus and set your CD/DVD drive in a higher priority than your hard drive. 8.1.1 Wubi

Wubi allows you to install Ubuntu within a Windows partition. It makes installation somewhat safer to your Windows partition, but has a set of peculiarities, the most noticeable being that performance degrades if the Windows install is fragmented or full. Additionally, if your Windows partition fails, your Ubuntu is lost as well. 8.1.2 Virtual Machines

This is a viable option for those who are interested but cant risk compromising a critical system. It has the drawbacks of reduced performance and additional strain on system resources, although the installation process is generally simpler since there are limited amounts of hardware being emulated. VirtualBox and VMware are both well supported VMs. 8.1.3 Unetbootin/LiveCDs

LiveCDs allow you to boot Linux without installing anything. Knoppix is one of the most popular and robust LiveCDs, although many installation discs also function as LiveCDs. There are also LiveCDs for specic tasks such as music (dyne:bolic) and science (Quantian). A program called Unetbootin allows users to make LiveUSBs from many popular distros.

8.1.4

Macs

The installation process is somewhat dierent on Macs. You can use Boot Camp on an Intel Mac, and there is documentation of the specics on the internet. If you have a PPC Mac, you will need to use dierent installation media. Debian, Yellow Dog Linux, and Fedora all have support for PPC.

8.2

Windows Solutions

Many Linux users may nd themselves still in need of Windows-only software. There are various solutions with dierent strengths and weaknesses. 8.2.1 Dual Booting

Leaving a Windows install on the same hard drive is a common solution and fairly easy to set up. The biggest advantage is that all of your Windows applications will still run, but you will need to reboot to use them. You can also install Windows on a computer with Linux already installed, but this tends to cause complications with the bootloader (Windows installation will overwrite the Master Boot Record). During the installation process, options for partitioning will come up. Shrink the Windows partition, and create partition(s) for Linux is the freed space (If you dont know what you need, two partitions, one for the root directory and a smaller on for swap space would be a safe bet). Most distributions should either load GRUB or LILO automatically after installation is completed. Most distros have NTFS-3G installed by default, but if it isnt you should be able to get it through your package manager or build from source For Windows to access your Linux les, you will need to download Ext2IFS. If this solutions sounds dicult for you but you would still like to dual boot, the above Wubi solution may be a good option for you. 8.2.2 WINE/CrossOver/Cedega

WINE is an ongoing project to allow Windows programs to run on Linux via a compatibility layer. This lets you run apps without restarting and minimal overhead. Because this project involves reverse engineering, applications work to varying degrees (some work with comparable performance to Windows, some work signicantly worse, and some dont functional completely or at all). Two commercial variants exist, one specically for gaming, called Cedega, and another called CrossOver has a stable version targeted at oce users and a more experimental build aimed at gaming. Crossover contributes their code back towards WINE while Cedega does not and does not use code written since WINE changed to the LGPL. You can check an applications compatibility at the WINE AppDB. 8.2.3 Virtual Machines

Allows you to run an operating system inside a window. Its more reliable than WINE and doesnt require rebooting, but it does take additional resources and hardware acceleration is not fully supported Additionally, installation media is required. Popular virtualization software includes VirtualBox (freely available in most repositories) and various products by VMware.

8.3

64-bit vs. 32-bit

Many distros oer the choice of an install based on the x86 64 architecture in addition to the x86 architecture. If you are using an x86 64 processor (Anything currently oered by AMD and Intel that isnt on netbooks should be x86 64), then running a 64-bit release. x86 64 oers support for more RAM, some architectural improvements, and increased performance in some applications. Because of the free and open nature of Linux, most of the software has been ported to x86 64 and many other architectures, and 32-bit software can run with the appropriate libraries, although there may be certain obstacles. Proprietary software, such as Java, Flash, and certain hardware drivers were once a serious obstacle to x86 64 adoption, but Java has been ported, and a FOSS version exists. An alpha release of Adobe Flash 10 for x86 64 exists, although it is currently not available from Adobe (although you may be able to nd a mirror of it still around). Regarding hardware drivers, testing with a LiveCD is generally a good idea for nding out if your hardware is supported.

8.4

Linux is not Windows

Linux is dierent from Windows in many ways, and understanding these dierences can make for a much better transition. One major dierence is the lesystem layout and the way installed programs are placed in this layout. In most cases, all of the les from an installed program will not be in the same directory, but will instead be placed in dierent directories based upon their function. The Linux Foundation maintains the standard for the layout and goes into far greater detail, called the Filesystem Hierarchy Standard, explained below: / - the root directory /bin - basic binaries that must be available in single user mode /boot - the kernel and other les needed for booting the OS /dev - devices /etc - system-level conguration les /etc/opt - system-level conguration les for opt /home - home directories, which contain user les and user level conguration les /lib - basic libraries needed by /bin and /sbin /media - mount point for removable media /mnt - mount point for temporarily mounted lesystems /opt - optional software, often used for software installed outside of a distributions repositories /proc - virtual lesystem with kernel status and processes as les /root - root users home directory /sbin - system binaries that must be available in single user mode /tmp - temporary les /usr - secondary lesystem for multi-user software /usr/bin - multi-user binaries /usr/include - standard headers /usr/bin - libraries for /usr/bin and /usr/sbin /usr/share - architecture independent les such as images /usr/src - source code /usr/local - tertiary lesystem for les specic to a host machine, such as compiled code /var - les expected to change often in the normal course of usage, such as log les /var/log - log les

Another big dierence is the way le permissions are handled. Linux uses a system called Unix permissions, in which a le has settings for reading, writing, and executing an owner, a group it belongs to, and everyone else. These are often represented in two forms, explained below: Symbolic form: A string of ten characters is used. The rst character indicates the type of le with a directory indicated by d, a symbolic link to another le by l, a socket by s, or a normal le by -. This is followed by three sets of three characters. The sets represent the permissions of the owning user, owning group, and anyone outside of these. Within the three letter sets, an r, w or x indicates that the le can be read, written to, or executed respectively, with an - indicating that a certain permission is not granted. Octal form: Three numbers ranging from 0 to 7. Starting with 0, the number is modied by whether a le can be read (+4), written to (+2), or executed (+1). Every number has a unique result: Read Write Execute Symbolic Form ----x -w-wx r-r-x rwrwx Octal Form 0 1 2 3 4 5 6 7

Examples of le permissions -rw-rw-rw- 777 A le that is readable, writable and executable to all. drw-r----- 640 A directory that is readable and writable to the owner, readable to the group, with no permission given to everyone else. -r--r--r-- 444 A le that is read-only to all

8.5

Problem Solving

If you need help for a specic problem, you should do the following steps in order: 8.5.1 1. RTFM

Many problems have solutions easily available to you through man pages or in the release notes of the distro or applications release notes or FAQ/Help section. If the help here is over your head, you should seek help elsewhere. 8.5.2 Google it.

Using a search engine will often return a relevant answer. Good terms to include in your search are Linux, your distros name, and the application or hardware that is giving you trouble. 8.5.3 Go to the forums

Try going to your distros or programs forums for help. These forums are designed for help, and if you can show that youve made an earnest eort on your own, they will typically be helpful. Asking smart questions will prove generally prove more fruitful in getting a helpful reply, so reading (or at least skimming Eric S. Raymonds How To Ask Questions The Smart Way is highly advised.

8.5.4

Ask a friend

If you have friends that use Linux or friends that are generally computer literate, they are a good resource for assistance. They will have patience with you, and can help you in a more direct way. 8.5.5 Linux User Groups

These are groups of Linux users that gather on some kind of regular basis. They can be helpful to new users, but they meet on their time instead of yours and the nearest LUG may be too far away. You can nd a LUG here.

Helpful Links and additional reading

You may nd the following links to be helpful sources of information relating to Linux and FOSS. The Cathedal and the Bazaar - An essay on the FOSS development, particularly on decentralized projects How To Become A Hacker How To Ask Questions The Smart Way Phoronix - FOSS hardware news and benchmarks Free Software Foundation Open Source Initiative Linux kernel archives The GNU project freedesktop.org Linux Foundation Distrowatch - A site on Linux distributions and other FOSS operating systems Groklaw - A FOSS legal blog Linux is not Windows

10

Credits/Copyright

Last modied 2010-09-04. Maintained by King Neckbeard. Send revisions, suggestion, questions, and complaints to neckbeard.king@gmail.com along with how you would like to be accredited. Additional contributers: sirobvious !CfagJg.fuc, Install !GENToOO59, various anonymous members of /g/ This work is licensed under the Creative Commons Attribution-Share Alike 3.0 Unported License. To view a copy of this license, visit http://creativecommons.org/licenses/by-sa/3.0/ or send a letter to Creative Commons, 171 Second Street, Suite 300, San Francisco, California, 94105, USA. Eective two years from the last modied date, I, the copyright holder of this work, hereby release it into the public domain. This applies worldwide. In case this is not legally possible, I grant any entity the right to use this work for any purpose, without any conditions, unless such conditions are required by law.
A Made using L TEX

Potrebbero piacerti anche