Linux and You - A newbie's guide to the world of OSS and GNU.
v1.0 - Biomechanica 2009

Why hello there reader. If you're reading this thread, chances are you're considering to switch to Linux or have recently made the switch. In this guide, I hope to smooth up the transition to your new OS by explaining some concepts and helping you on your way software-wise.
First of all, I know there is already a guide similar to this one, found here. However, I feel this is more like reference guide, with some links to relevant information and terminology. This guide, however, summarizes all you need to know to get started with Linux. It explains the basic concepts without you needing to plow through tons of links, all of which could be found by googling for a few minutes. I therefore recommend reading this thread first and then using the other thread as a reference guide. Not to mention the fact that guide was stolen from another site... pretty sad, isn't it?

Note that this guide is mainly aimed towards people switching from Windows to Linux, as I do not have enough experience with Mac OS to make a proper comparison. There will be some tech-related talk but this can easily be skipped if you're not interested. Also, I won't really go into the history of Linux, if you are interested in this just Google around and you'll find all you need. The practical aspect of Linux is what really matters to you as a (future) user. Therefore emphasis will be on getting Linux up and running and getting you used to it as fast as possible.
This guide is aimed at new users, sure you can compile your own kernel from scratch and build everything around that, but let's just leave that to more experienced users. Also, don't turn this thread into an OS-based flame war; no one cares what OS you prefer. If you're happy with Windows or Mac OS and don't want to switch to Linux, then by all means: do not make the switch, but don't annoy us with it.

It is also far from complete, as it's just a basic reference guide. If you find any incorrect information in this guide or would like to contribute, please notify me over PM.
This also applies from any mistakes I've made with regards to spelling and/or grammar. After all, English is not my native language.
You will receive credit for any contributions.

Without further ado, let's get to business... :)

Table of Contents
1. What exactly is Linux?
2. Pros and Cons as opposed to Windows.
3. Picking a Distro.
4. Installation.
5. The Console and You.
6. Alternatives to Windows Applications.
7. Conclusion.

1. What exactly is 'Linux'?
----------------------------------------
Linux itself is just a kernel. A kernel is the central piece of software in a modern operating system. It handles low level interaction between hardware and software, meaning it's essentially a bridge between your hard- and software:. Hardware (CPU, Memory, peripherals etc) --> Kernel --> Application (Text editor, web browser etc).
However, the term Linux is generally used to refer to UNIX-like OS'es running on the Linux-kernel. These OS'es share the same core (the Linux-Kernel) but differ in the software they ship with. This selection of software is what makes up the actual OS. These distributions of the Linux kernel are called "distro's" and picking the right distro for your needs is the first step into the world of Linux. More on that in part 3.



2. Pros and Cons as opposed to Windows.
----------------------------------------
Pros:



  • CHOICE: Linux offers you more options than any Mac OS or Windows. This is because everything is open to you as a user: if you want, you can change every single aspect ofyour system. EVERY SINGLE ASPECT - so not just some fancy window borders or fonts, but the actual low-level stuff as well. You could theoretically rewrite the kernel to suit your every need. The only limiting factor is here is how much time and effort you are willing to sacrifice to learn everything you need to know and to get it all working. One of the more interesting aspects of this form of customization is the fact you can always be on the cutting edge of computer science if you want to. For instance, Linux was the first OS to fully support 64 bit CPU's. All the new ideas and concepts are first tested on Linux, Apple and Microsoft just filter out what they consider to be the best ideas for their operating systems and implement them. Note that whatever may be best for them might not necessarily be best for you as an individual. Linux offers you the choice to do whatever you want with your OS, whereas Microsoft and Apple limit you to their choices.
  • STABILITY: Linux is know for it's stability. Though this is also dependent on the stability of the software you intend to run on your OS, it's safe to say the Linux kernel is one of the most robust pieces of software out there, with thousands of contributors (re)reading the code and checking it for errors. All bugs are shallow when you've got thousands of people looking for them and helping to fix them.
  • SECURITY: Due to the open nature of Linux, bugs are easily found and patched, before malicious hackers can exploit them to gain access to your system. Though 0day exploits will always be around, the Linux community generally delivers patches at a much quicker pace than MS or Apple ever could. Linux only has a relatively small user base compared to Windows and Mac OS, making it a less attractive target to the aforementioned hackers. Access is controlled through a versatile system made up of user ID's and groups, that allow the admin of a box to tune file permissions in such a way users get the access they need while still keeping things they shouldn't touch out of reach, without actually limiting the end user. All this makes for a very secure OS.
  • FREE: Linux is Open Source; it's free. Spare an exception or two, all software, including the distro and kernel themselves, is free. This means you don't have to worry about backdoored/trojaned installers or fakes as you can get all the content from the actual developers for free.
  • COMPATIBILITY: Linux runs on just about all hardware, so if you've got an old PC lying around, why not install Linux?
Cons:

  • CHOICE: Ironically, this pro is also a con. The wealth of choices can be daunting to new or non-technical users, though the complexity of your OS is also dependent on the distro you pick. Ubuntu is know for it's user friendly approach, whereas only the real techies will choose a distro like Slackware.
  • LINUX != WINDOWS: Though this one seems painfully obvious, a lot of people forget Linux is different from Windows and therefore some things are done differently. You WILL need to invest some time to really get everything you want out of Linux. How much time this is depends on how much you want to get out of it. You will need to get used to using some different apps and using the command shell every once in a while.
  • VENDOR SUPPORT: Or rather, the lack of it. This means support for the latest and greatest hardware can often be slower to reach Linux as the vendor doesn't want to give out too much technical details to the community and/or decides not to release Linux-specific drivers. This means the community has to figure out how exactly the hardware works and code their own drivers. This may seem to contradict the compatibility-pro, but once hardware is supported, it's supported. This means Linux will run on both brand new as ancient hardware, however you may to wait for the community to come up with a fix for some hardware. This is especially true for wifi-adapters and laptop hardware in general.



3. Picking a Distro.
----------------------------------------
So this is where it all really begins...
A distro is essentially nothing more than a software bundle with the Linux-kernel, possibly along with some custom patches as to improve security, performance and/or usability for the end user. Different distro's offer different Linux experiences; some are aimed at power users or to be used as servers, others might be geared towards more novice users or people who want a small file server to be used at home. The distro you choose depends on your needs and experience, thus making it a very personal choice. The top ten most used Linux distro's can be found here @ Distrowatch.com. Apart from CentOS, which is a server distro at heart, all of these distributions are aimed at desktop users, thus making them the most relevant choices for us as end users wanting to install them on our main PCs.

Out of these ten distro's, I'd personally say Ubuntu, openSUSE and Linux Mint are the best choices for Linux newbies. These are purely aimed at desktop users and are known to be user friendly.

  • Ubuntu (Ubuntu Home Page | Ubuntu)
    This distro is probably the most user friendly Linux distribution around. It describes itself as 'Linux for human beings', a fitting description I must say. Ubuntu features a rich library of software and comes with software like OpenOffice.org and Firefox. This will all feel very familiar if you're used to Firefox or Microsoft Office (or OpenOffice) on Windows. All configurations can be managed through GUI applications, limiting the need to use the command shell. Apt-get and it's GUI-frontend aptitude make it extremely easy to (un)install and manage software. Want to install scrot, a console based screenshot application? It's easy as typing 'apt-get install scrot' in a terminal, or looking up scrot in aptitude.
    Ubuntu relies heavily on the use of sudo, which temporarily gives a user root privileges (roughly comparable to SYSTEM/Administrator on Windows) and lacks an actual root account by default. This means users won't spend any time as root unless necessary, thus limiting the chance of accidentally installing malicious software as root.
    Ubuntu comes in different flavours, depending on the desktop environment this also means you'll get some slightly different software. The three most important ones are Ubuntu, Kubuntu and Xubuntu.
    Ubuntu itself ships with the Gnome desktop environment, which gets you all the basic Gnome software like Gedit and gnome-terminal. It also features Metacity, an easy to use and easy to configure window manager.
    Kubuntu ships with the KDE desktop environment, which is generally considered to resemble Windows the most. Of course, this also means it'll ship with the KDE software suite, meaning you'll get software like Amarok, KTorrent and Konqueror preinstalled.
    Last but not least, we've got Xubuntu, which uses the XFcd desktop environment, making for a light-weight distribution for older or slower machines.
    Another reason Ubuntu might interest you is the Wubi project: Wubi - Ubuntu Installer for Windows. Wubi allows you to install Ubuntu as you would with any other Windows application. It's installed onto a virtual drive, which is essentially just one big file on your hard disk, meaning you won't have to partition your PC: no chance of losing data.
    The default Windows bootloader is modified, so you get the option of booting into Ubuntu or Windows when you boot your PC.
    One of Ubuntu strongest assets however is it's community, which is probably the most active and friendly community around, providing excellent and fast support to users in need of assistance.

  • openSUSE (openSUSE.org)
    Most of the above also applies for openSUSE, but what sets this distro apart is the excellent YaST administration tool. YaST makes it incredibly easy to configure and maintain your system through a graphical interface. Everything from your firewall to user related settings is controlled through YaST.
    It has a broad repository of software packages which are installed and maintained through ZYpp. You can choose between a Gnome and KDE version and there's also a commercial enterprise edition.

  • Linux Mint (Main Page - Linux Mint)
    Linux Mint is based on Ubuntu but adds a few very handy applications for increased usability. These so called 'mint tools' offer things like mintDesktop, which allows you to easily configure your desktop, mintInstall, a very user friendly graphical packet manager and mintUpdate which allows you to easily keep track of updates for your software.
    Linux Mint comes with Gnome by default, but there are also so-called 'community editions' that ship with different desktop environments. However, these generally lag behind the regular branch and often lack some of the mint tools.
Note that you can, of course, always install any desktop environment or window manager you want, regardless of your distro. If software you require is not available through your packet manager, you can always compile it from the source code. This is a very straight forward process which I'll explain in part 5. Also, note that application from one desktop manager can run on other ones as well, for instance Gedit will work fine on KDE and Amarok will run just as well on Gnome as it does on KDE.



4. Installation.
----------------------------------------
So you've picked a distro and now it's time for the install. I will not hold your hand through the entire installation process, as this is self explanatory and in a lesser degree dependant on your distro. I will however try to answer the most common questions.

Q: Should I get a full installer of a net based installer?
A: I personally prefer net based installers. These are smaller to download and download the required files from the internet after which they can be installed. If you're on a decent connection and select a proper mirror, this can be done in no-time. Full installers have all required files already present on the disk, but are larger as a result.
In the end, however, it's largely a matter of personal preference.

Q: What are Live CD's?
A: Live CD's are CD's that will boot into a (sometimes fully featured) Desktop environment, running purely from the installation medium - your hard disk remains untouched. This allows you to test the distro prior to install.

Q: Are there other ways to test a distro without needing to install it on my hard disk?
A: Yes, apart from live CD's you can also install them on so-called virtual machines. Look into software like VMWare and Virtual Box. This way you can install an OS within your current OS on a virtual partition without the need to make any changes to your hard drive.

Q: I want to have a dual boot installation so I can still boot into Windows when necessary, how do I achieve this?
A: Well, this is fairly straight forward. Most installerrs will recognise other operating systems on your partitions and automatically add entries to them in the GRUB boot menu.
When you boot your PC, you will then be presented with the aforementioned GRUB boot menu. From here, you can choose which OS to boot, whether that's Windows, Mac OS or Linux.

Q: OH NOES! I have to partition my hard drive, what now? Am I at risk of losing data?
A: Depends - it's best to partition empty or unused partitions. You will lose all data on a partition if it's being partitioned. If you only have one partition or a partition that's used but has some free space left that you want to use, you will have to resize the existing partition. This will clear up space the partitioner can then use for Linux.
Theoretically, you do not have to lose any data in this process, but if you resize a partition to a size smaller than the space currently in use on that particular partition, it will most likely get corrupted.
I personally prefer to be safe and use a GUI application like GParted (available in most Gnome based distributions) on a Live CD to partition
my drive prior to the install.

Q: Should I just use one big partition or should I use several smaller partitions?
A: It's generally recommended for new users to just go with one big partition, but having a couple of smaller partitions has it's advantages. For instance, you could have a separate partition for the /home/-directory, which holds all user profiles, meaning you can access your user profile in different distro's and you won't lose it when you install
a new distro.
Generally, something like the following layout is recommended for a generous install:
Code:
/ (root of the file system) : +- 2 gigs
/tmp  (temporary files) : +- 2 gigs
/var (holds mail and logs etc)  : 3+ gigs
/usr (holds most executables) : 8+ gigs
/home  (holds user profiles) : remainder.
Q: How can I configure my GRUB boot menu?
A: Your bootmenu resides in /boot/grub under the name menu.lst. You can use your favorite text editor to edit it. Note: you will need root privileges to save your changes.



5. The Linux Console and You.
----------------------------------------
A lot of Linux' strength and flexibility comes from the console. Depending on what distro you pick, chances are you'll spend quite some time using it. You will most certainly have to become quite familiar with it to become a power user. Here, I will explain the most commonly used commands.


  • cd - Change directory
    'cd' Allows you to change directories. The syntax is self explanatory: cd <directory name>. For instance, cd /etc will take you to the /etc directory. 'cd ~' Will take you to your home directory (normally /home/<username>) and cd .. allows you to go up one dir. For instance:
    Code:
    [user@host:/var/www]$ cd ../../
    [user@host:/]$ cd etc
    [user@host:/etc]$ cd ~
    [user@host:~]$
  • ls - List files
    'ls' Will list all the files in your current directory unless a different directory is given as an argument (e.g ls <directory name>). Options that might come in handy are -l, which will list all the files in a list like structure, also showing user permissions and other important information, and the -a option which will also show hidden files.
    For instance:
    Code:
    [user@host:~/Desktop/test]$ ls
    test1.txt  test2.txt
    [user@host:~/Desktop/test]$ ls -l
    total 0
    -rw-r--r-- 1 username username 0 2009-11-21 15:48 test1.txt
    -rw-r--r-- 1 username username 0 2009-11-21 15:48 test2.txt
    [user@host:~/Desktop/test]$ ls -al
    total 8
    drwxr-xr-x 2 username username 4096 2009-11-21 15:48 .
    drwxr-xr-x 4 username username 4096 2009-11-21 15:48 ..
    -rw-r--r-- 1 username username    0 2009-11-21 15:48 .hidden_test.txt
    -rw-r--r-- 1 username username    0 2009-11-21 15:48 test1.txt
    -rw-r--r-- 1 username username    0 2009-11-21 15:48 test2.txt
  • cp - Copy files
    'cp' Allows you to copy file A to file B with the following syntax: cp fileA fileB. This comes in very handy when making backups.
  • mv - Move files
    'mv' Is used to move files and rename them. For instance, mv test1.txt newtest.txt would rename test1.txt to newtest.txt. mv filename /tmp would move the file 'filename' to the /tmp directory.
  • rm - Remove files
    'rm' enables you to remove files. Be careful though, removed files are permanently removed! Commonly used options are -r for recursive deletion, this will also delete directories, and -f for force delete, this will skip the usual confirmation prompt prior to deleting a file. Be extremely careful when using -r and -f together, for instance a command like rm -rf / will delete your entire filesystem.
  • clear - clear the current screen
    'clear' Will simply scroll down your terminal so all of the text shown earlier disappears, effectively leaving you with a 'clean' command prompt.
  • chmod/chown/chgrp - Manage file permissions
    These commands are used for managing file permissions. 'chmod' Allows you to change the file mode, thus configuring what permissions users have considering a specific file (read, write or execute permissions or a combination of these). 'chown' Allows you to change a file's owner and 'chgrp' it's group.
    For more information on Linux file permissions, I recommend this article: Understanding Linux file permissions.
  • make - Execute the make file in the current directory
    When compiling software from it's source, make is your best friend. It automates the entire process through a single command.
    Generally, you will first have to run a configuration script, checking if you have all the right dependencies. This is normally done through './configure' (assuming you are in the right directory).
    Once this has been done, a so-called make file is created, containing all commands regarding how each file should be compiled.
    This is run using 'make', often followed by 'make install' to place the executables in the /usr/local/bin directory so they can be executed right from the command shell without first going to the folder they're in.
  • ps/kill/killall - Manage processes
    'ps' is comparable to the the task manager on Windows. It will list all running processes. Commonly used arguments are -a, -u and -x. -a Will make sure processes by all users are shown, -u sorts the processes by user and -x lifts the BSD-style "must have a tty" restriction; this essentially means all processes that otherwise would not be shown are still shown.
    As you can see the processes all have their own PID (Process ID), show in the first column of your output. You can kill a process by typing 'kill <pid>' (e.g kill 31337) or 'killall <process name>' (e.g killall firefox-bin).
  • cat - Read file
    'cat' will simply read the contents of the file you specify and spits it out to the terminal, for instance 'cat /etc/passwd' will show you the contents of /etc/passwd.
  • tar - Manage file archives
    Most Linux-specific downloads, like source code or .rpm files will be packaged in a so-called tar-ball.
    A tar-ball is file that has been archived with tar, often compressed using gzip compression, resulting in a .tar.gz file.
    To create a tar archive, use the -c switch, like so: 'tar -c /directory/to/tar --file="archive_name.tar"', to untar a tar archive use -x for extract. I personally like to use this in combination with -v for verbose output (not vendetta! :P) and -r for recursively untarring all directories, like so: 'tar -xvf <archive.tar>'. For .tar.gz archives, the same syntax applies, with the addition of the -z switch. For instance 'tar -cz /directory/* --file="archive.tar.gz"' and 'tar -xvfz archive.tar.gz'.
  • grep - filter output
    Oh how I love grep. Grep allows you to filter output. For instance, 'cat file.txt | grep test' will show only the lines in file.txt that contain the word 'test'.
    As you can see, I chose to pipe the output of 'cat' to 'grep' using |, this is the same as executing 'grep file.txt'. Common options include -i and -v. '-i' Will filter without distinguishing character case. So 'TeSt' is the same as 'test' or 'TEST'. '-v' will invert the search, meaning it will exclude the search term from the results. So 'cat file.txt | grep -v test' will show all lines that don't contain the text 'test'.
All of these commands have more options than the ones mentioned here. Type 'man <command>' or 'info <command>' for more information regarding a command.
It's good to know 'man' Holds a lot of information. For instance, it can be used to retrieve information about C functions, a command like 'man printf' will show you a manual page explaining the syntax and usage of printf(), 'man ascii' will present you with an ascii chart and 'man 7 signal' will show all signals you can send to a process.



6. Alternatives to Windows Applications.
----------------------------------------
Obviously, you want to be able to do everything you could do on Windows on your new Linux install as well.
Linux offers alternatives for just about every single piece of software on Windows, but it can be hard to find the one you need. Therefore, I'll try to give a number of commonly used alternatives which you can try. Note that, as always with Linux, there are too many options to mention, so it pays to look around for other applications if the ones in this list don't fit your needs. For more information, look them up on Wikipedia. The reason I don't personally give you information is the fact I have not personally used all the applications on this list.

Music players:

  • Amarok
  • Banshee Music Player
  • Rhythmbox
  • GMPC (Gnome Music Player Client)
  • XMMS (X Multimedia System)
  • Audacious
Movie players:

  • VLC Media Player
  • MPlayer
  • Totem
  • Kaffeine
  • Xine
Web Browsers:

  • Firefox (Iceweasel on Debian)
  • Opera
  • Konqueror
  • Lynx (text-based, mainly for web developers)
Email clients:

  • Thunderbird
  • Evolution
  • Pine (Console based)

Torrent clients:

  • Transmission
  • Azureus
  • qBitTorrent
  • Deluge
  • rTorrent

Text editors:

  • Gedit
  • KWrite
  • Nano (Console based)
  • Vi(m) (Console based)
  • Pico (Console based)

Word processors:

  • OpenOffice.org Write
  • AbiWord
  • KWord
Note that the OpenOffice.org suite offers alternatives to just about all software from the Microsoft Office suite.
Instant Messengers:

  • Pidgin
  • Emesene
  • aMSN
IRC Clients:

  • XChat
  • Konversation
  • BitchX (Console based)
  • IRSSI (Console based)

Image Editing:

  • GIMP
  • XPaint

Video Editing:

  • Avidemux
  • Cinelerra
  • Kdenlive
  • LiVes

Anti Virus/Spyware/Malware:
You don't need any ;D Unless you start manually installing random files as root, you have little to worry about.
A lot of Linux AV software is actually aimed at protecting Windows users by filtering email attachments and such.
However, there are convential AV programs for Linux:
  • ClamAV
  • AVG
There are no real alternatives however to programs like Photoshop, iTunes or After Effects. I personally use(d) Photoshop quite a bit and still use iTunes for my iPhone.
For that reason, I have always kept a virtual machine.
WINE (WineHQ - Run Windows applications on Linux, BSD, Solaris and Mac OS X) can run a lot of Windows software natively and can help you out in some cases. I got Steam and a smaller applications such as uTorrent running through WINE without any noticable impact on the performance.
However, don't expect the latest and greatest games to run perfectly. In the end, Linux is not suited as a gaming platform.



7. Conclusion.
----------------------------------------
There you go. This should surely help you get going in the world of Linux. Linux is all about exploration and seeing what you can and cannot do. So by all means: EXPLORE AND EXPERIMENT and you will see just how powerful of an OS it truly is. Especially for programmers, the switch to Linux pays off. It's all about doing what you want, with no limits and endless possibilities: and that's why I love Linux.
For additional information, Wikipedia and Google never fail. If you feel I'm missing some vital stuff, PM me or post in this thread, you will be credited.
~ Biomechanica