EggXpert.com

TheManPages - Section 2 - Windows vs Linux

Published 19 March 08 11:12 PM | root 

Learning Linux

Linux has a reputation for being difficult to learn compared to Windows.  For many years this was true, as the main interface was a command prompt, supplemented only by primitive  GUI's.  However, today's Linux no longer deserves this reputation.  Modern desktop environments, such as KDE and Gnome, have made Linux just as easy as Windows in many ways.  These projects have gone through many years of testing for usability, and are constantly improving by conducting research and listening to user feedback.  Nowadays, learning Linux just takes time, just like trying to learn Windows for the first time.

Security in Linux

Linux places a much greater focus on security than Windows ever has.  The basic Linux security is based around the idea of users, groups and file permissions.  Every user of a Linux OS has a username, a password to log in, and a set of groups the user belongs to.  Every file/folder in Linux has three sets of three permissions, Read, Write, and eXecute (rwx).  The threes sets apply to the owner of the file, group access to the file, then everyone else.  These permissions are checked against the user's username and groups, controlling who is allowed to access files, and in what ways.  Typically, user access is confined to their home directory, where they have full control.  Outside of their home directory, users have little to no ability to change files.

The exception to these rules is called the 'root' user.  This is the administrator's account, which is allowed to do anything and everything.  The root user is not used for normal operation, only for system administration activities. Care should be taken that access to the root account is limited, so that others cannot cause accidental or malicious damage to your system.

This model helps make sure that only allowed people are allowed into the system, and only a select few of those can modify important files, while also making most viruses unable to seriously damage your system.  Rather than viruses, a greater threat in Linux security are 'rootkits' and security exploits which can allow unauthorized people to get access to your root account, and therefore full control of your computer.

This is very different from Windows.  When you use Windows, by default you have an administrator account only, and this is the account most people use in their daily tasks.  While Windows can be configured with a security model similar to what Linux does by default, but this is not common for home installations.

Installing Software and Updates, Intro to Package Managers

Installing software on Windows is a simple process.  All you need is to run an installer program from a CD you buy at a store or download from the internet, and the process is mostly handled for you.  Some of these programs are also capable of checking for updates online and upgrading themselves automatically.  Updates to the OS are even easier: click a check box and all your updates are downloaded and installed automatically from the internet.

Linux takes this a step further.  A Linux OS comes with a program called a 'package manager.'  This package manager provides a centralized place to manage all the software installed with the OS, as well as extra software you install later.  It connects to online 'repositories,' which contain hundreds, sometimes even thousands of software packages.  The package manager allows you to browse or search through these packages, installing or uninstalling as many as you like all at once.  Updates are also handled through the package manager.  You can set it up to automatically update your OS and all  your packages automatically as well.

Plus, the only time you will have to reboot your computer due to updates is when you upgrade your kernel.  Background services and other applications only need to be restarted, not requiring a reboot.  This is quite unlike Windows, where nearly every time you update your OS/programs, you have to reboot.

Filesystems, Structure and Files

Anyone who has used Windows will be used the idea that each drive is assigned a drive letter, e.g. your first hard drive is C:, second is D:, DVD drive is E:, floppy drives are A:, etc.  Linux does not use this idea.  Instead, one drive is designated as the / (read 'root').  All your other drives are then 'mounted', or attached, to subdirectories contained in the / partition.  This has the effect of making all your drives available under a single tree, instead of Windows where each drive is at the top of its own tree. It also doesn't limit the OS the amount of devices you can mount (in windows you can only use A-Z).

Linux does not have an equivalent to Window's Program Files directory, where programs are installed into there own self-contained subdirectory.  Instead, most programs are installed directly into directories called /bin and /usr/bin.  System administration programs are installed into similarly named directories, /sbin and /usr/sbin.  Shared libraries go into /lib and /usr/lib, and system configuration files live in /etc.  Every user has their own private directory under /home to store their own files, as well as personalized configuration. Since all your personalization is stored in your home directory, this allows easier migrations between two physically different machines.

 Just as in Windows, each drive in Linux has to be formatted with a filesystem before you can use it.  A filesystem defines a structure for storing files on a drive, as well as storing permissions and other attributes.  The most common filesystems in Windows are called FAT and NTFS.  Linux has many filesystems it can use, but the most common by far is called ext3.  The ext3 filesystem formats much quicker than FAT or NTFS, and never needs to be defragmented due to differences in the way data is stored.

Linux does not use file extensions to identify files as Windows does.  Windows knows a text file is a text file because the file ends with .txt.  Same for .mp3, .avi, and every other file.  Linux, however, identifies files by examining the contents of the file, so if you rename an mp3 with a .txt extension, Linux will still know it is an mp3 file.  Although the file extensions are unnecessary, many files will still have them because they make it easier for a user to identify file types.

Data is not the only use for files in Linux.  Linux treats everything as a file.  All your directories are files. Your hard drive is a file. Your video card card is a file, and so are your keyboard and mouse.  This is possible because Linux identifies files by examining them.  Just as Linux knows a text file by examining the contents, it knows what directories and devices are by examining them and treating them accordingly.  This allows interesting things like easy access to random data for encryption through the "random" device.  Unfortunately, this can also be a source of user frustration.  Since everything is a file, everything has permissions applied to it, which can cause problems like normal users being unable to use the sound card.

Customization and Configuration Files

Customization in Windows is generally very easy.  Pretty much all your options are available through the GUI.  Changing your desktop theme is a simple matter of selecting a new one in a configuration dialog.  Most Windows programs are the same way: open the program, and access a menu, and change things.

This is one area Linux lags behind Windows.  You have many more options, but they are more difficult to get to.  While the desktops like KDE and Gnome are easily configured similar to Windows, many other programs require you to open a text file and edit options there.  There are graphical programs available to make it easier to edit some of these config files, but they frequently do not provide access to all the options available.  Other programs have no graphical utility available at all, and you must edit the text file by hand. But with time comes better usability. There are a number of distributions (a term we will get into later) that attempt to address these problems.

Installation and Partitioning

This is another point where Linux lags behind Windows.  Windows computers typically come with a single drive with a single large partition to hold everything: OS,  programs, and files.

Several Linux distributions now have graphical installation programs  which make installing Linux much easier than it used to be.  These utilities will guide you through the installation, explain your options, and generally take care of you.  The interface is no longer the problem, partitioning is.

Partitioning a drive allows you to section off parts of a single drive to be used separately.  In Windows, a single drive typically has only a single partition, although the computer-savvy commonly recommend separate partitions for the OS and other data.

A typical Linux installation will have 3 partitions: A / partition, a /home partition to store users' personal files,  and a swap partition.  The / partition will contain the OS itself, and swap is used for virtual memory, just like a Windows swap file.  The separate /home partition allows for easier reinstallation or upgrades, because all the users' files can be kept and easily used in the new system.  However, you can have many more partitions than this, including /boot for files critical boot files like the Linux kernel, /tmp for temporary data, /var for running processes to store data, along with many more possibilities.  The installation program will include a utility that makes it easy to create partitions and identify mount points for them, but what is not clear is how many partitions you should create, and how large they should be because this can vary depending on what you use the computer for.

Why would you want partitions? Partitions help with security, easier backup/restores, and prevent runaway logs from taking up all your storage space.

The Switch and common issues

The four most common (real) problems people have when switching over to Linux from Windows are....

1. The Games
Windows has all the popular games, and for you gamers out there you are at a disadvantage. While Linux has a number of  games, most you probably haven't heard of. Some have had luck with getting window's based games to work on Linux box with an application called WINE, but only a few of the games and only after a lot of coaxing.

2. The Applications
All the programs that you are use to in Windows, there is most likely a second cousin to it in Linux. It may not be exactly what you had before, and it may not have the same features, but it usually will get the job done--and sometimes even better.

3. The Files
There are some file types that are difficult to import into Linux. Openoffice (a "second cousin" to Microsoft's Office Suite), while good, can sometimes interpret Microsoft type files incorrectly. This is due to the closed source nature of Microsoft, and some standards aren't known. Moving over to Linux can sometimes be painful at first, depending on all the files you may be keeping, but just remember it's a one time thing.

4. The Drivers
On the initial install, drivers can sometimes be hairy, especially if it's a new product. This is because you typically are dependent upon someone else to write the drivers for you, via modules. This is by far one of the biggest initial turn offs to window's users but a number of the popular distributions are getting really good at driver support.

Final Thoughts

Linux is free. Windows isn't. For most people, that is enough to at least take a look at it. For the skeptics out there, just know that Linux isn't meant to be like Windows. And because it's not as popular as Windows, it can sometimes take a bit more work to make it do what you want it to do--as appose to Windows. But because it is so open and customizable, it is more powerful than Windows could ever hope to be. It just requires some patience and sometimes a lot of Google searching.

 

TheManPages Team

 

Credits for this sections
Researcher: Sidicas, rdaniels, root
Writer: rdaniels
Editor: root 

Filed under:

Comments

# PapaHomer said on March 20, 2008 6:35 AM:

I've never seen so much useful information about Linux in one place as here on eggxpert.   Installing Linux is definitely on my to-do list.  I need to do a little more planning.   Thanks!

# PROACEX1 said on March 20, 2008 3:32 PM:

Nice post Root!

This is definantly worth putting in the Ask Root newsletter section...I also need to get the 32-Bit vs 64-Bit article together too... >_<

Yay Linux! :D

Respectfully,

PROACEX1

# PROACEX1 said on March 20, 2008 3:34 PM:

Most also give a great big thanks to the writer and the researchers, great job Sidicas and rdaniels!

Root, you're just the editor... :P

Respectfully,

PROACEX1

# root said on March 20, 2008 3:41 PM:

lol, none taken. They really did a great job so far.

# jerry42 said on March 20, 2008 4:30 PM:

Nice post. I like the way you guys lay out the info, I have been dabbling in Linux (Ubuntu & Knopmyth),but this helps me better understand the directory structure.

Thanks.

Jerry42

# rdaniels said on March 20, 2008 6:32 PM:

Thanks everyone!

Root, it looks like everything is going to plan thus far.

World Domination will be achieved!

# root said on March 20, 2008 7:02 PM:

*evil laugh*

They won't know what hit em Yes

# RjBass said on March 21, 2008 9:17 AM:

Nice post Root.  I needed some of that info for my own Linux exploring which I have to admit, is not progressing along very well.  I'm still looking for a simple to read, command line guide.  Something that gives the basic command, and what it does in alphabetical order.  My friends keep telling me they are out there, I just have to go find one.  

# root said on March 21, 2008 1:10 PM:

Heh. There are a lot of commands out there but for navigation you will need these:

pwd (print the working directory you are in... tells you were you are)

cd (change directory... moves you into another folder)

ls (list what's in the current directory)

mv (move command, you can use it to rename a file or cut it to a different location)

cp (copy command)

cat _filename_ | less (will output a text file for you into "less", which is a viewer. Use 'q' to quite the viewer, 'w' to page up and 'z' to page down as well as 'h' for the help)

Any command, for the most part, you can use the --help parameter and it will give you a simple list of available parameters. If it doesn't have the --help parameter available, you can always try "man _command_"

Here is a decent site:

http://www.oracle.com/technology/pub/articles/calish_file_commands.html

Here is a decent basic bash scripting site:

http://www.justlinux.com/nhf/Programming/Bash_Programming_Cheat_Sheet.html

Here is some keyboard shortcuts for Bash:

http://www.howtogeek.com/howto/ubuntu/keyboard-shortcuts-for-bash-command-shell-for-ubuntu-debian-suse-redhat-linux-etc/

In later sections, we will be covering all of these extensively.

# Freezrburn said on March 27, 2008 12:50 PM:

Great post!  You guys did an awesome job.  I am running Ubuntu @home and while some day to day basics are very easy to do I hope to one day understand what I'm doing in the rest of the system.  I look forward to reading your future work on Linux.

# DRoboto said on April 8, 2008 11:40 AM:

Thanks for the info.  I have been trying to switch over from the hated windows but it has been a slow process trying to learn enough to feel comfortable in linux.

Anonymous comments are disabled

About root

I currently live in Plano, Texas and work at an IT outsourcing company as a SAN Storage Administrator. You can say I'm one of those 'just out of college kids'.

Hobbies: writing, computer building, reading (usually computer books but I get around to SciFi/Fantasy once in a while), movies/tv, bars, IT security, and of course Eggxpert.

Not much of a Myspace/Facebook kind of guy. My top (dot com) sites I visit are Gmail, Eggxpert, Writing, and Digg.

In short, I'm just another guy with a computer and an internet connection.