Linux and Windows Comparisons

One of the first things a refugee from Windows trying to transition to Linux does is look at the Linux tree structure to try to see “What would this be in Windows?”  Well, there is NO one-size-fits-all answer to that question.

Indeed, that kind of thinking acts as an impediment to understanding how Linux works.  It’s like trying to fit a square peg in a round hole.  Nevertheless, it’s human nature to attempt to put something we don’t understand into terms of something we DO understand or at least are familiar with.

So as much as we’re told that it doesn’t really enhance understanding, we STILL ask “What would this be in Windows?”  The rub really comes into play when the answer is “There is NO Windows analog.”, which is sometimes the case, or when it’s only partially true, and thus even more confusing.

If you take a look at the Linux file system shown here, you’ll see a lot of cryptic folder names that are anything but intuitive . . . like “opt”, “var” and “bin”.  Plus, one of the system folders is “usr”, which intuitively you may take to mean “user”, but it DOESN’T.  Though it DOES contain some user files, which further confuses the issue, it stands for Unix System Resources, a throwback to the old parent OS for Linux.

Now, before I go any further, let me point out that this is NOT an article claiming the superiority of one OS over all others.  Each has it’s advantages and disadvantages, and in my opinion there is NOT any one that is “better” than the rest.

It’s just a matter of personal preference, what you’re most comfortable with, and what works best FOR YOU.

 

 

But the “OS Wars” are perpetual, just like the “Browser Wars”.  There’s even a T-Shirt:

There are those that insist their OS is superior to ALL others (smug Linux users are particularly fond of this attitude):

I myself use Linux (Ubuntu), but am not about to say it’s superior to all others.  Right now it’s the best fit FOR ME, but if another OS comes along that fits me better, I’ll switch in a heartbeat.

So if you’re a Windows user and are comfortable there and have no plans to change . . . fine.  This article is not intended to entice you to switch if you’re fine where you’re at.

But for those that are thinking about switching, this may be of some help.

Now, you say “Wait a minute . . . wait a minute . . . if searching for a Windows analog impedes progress, then why are you pointing out where the Windows analogs are?  You’re contradicting yourself, aren’t you?”  Answer:  People are going to do this ANYWAY, so why not do it quickly and be done with it?  If the answers are given then one can say “Aha” (for whatever it’s worth) and get on with learning Linux all the faster.

What I mean is, spinning your wheels trying to figure out “What would this be in Windows?” is essentially an unproductive exercise.  Indeed, once you have that information . . . Now What?  Or “So What?”

So I’m going to try to answer “What would this be in Windows?”, you can have your “Aha” moment, put it to bed, and get on with it.

Look at it this way.  People who come to Linux as their first OS pick up on it much faster than those who already have used another OS, and it all makes sense to them without any comparisons.  If they were to try to switch to Windows, they would be asking “What’s the Linux analog for this?”  A lot of Windows manipulations wouldn’t make any sense to them because they would be comparing it to Linux where there may be no need to use that manipulation.  Well . . . the reverse is true also.

So what I’m going to do here is take ONLY SOME Linux system folders and point out SOME of what they would be in Windows.  The reason I say “ONLY SOME” is because a lot of Linux system folders are geeky explanations of concepts specific to the Linux root/system only.  In other words, I’m not going to weigh you down with information that may only be good for a trivia game and not much else.

For example, take the “/dev” directory:

Linux considers devices as files.  That “/dev” directory contains “special” files that tell Linux about the device.  It’s actually much more complicated than that but it is also information that you don’t need and is exactly what I’m talking about when I say “I’m not going to weigh you down with information that may only be good for a trivia game and not much else.”  (Well . . . that’s not really true, you’ll pick up the nuances of the Linux root folders eventually but first you need to make a smooth transition, and that’s what this article is about.)

So let’s jump into this and see what is common to both Linux and Windows, and more importantly what isn’t.

The first directory we’re going to take is the root, or “/”:

First, notice that Linux uses a FORWARD slash instead of the BACKWARD slash Windows uses.

In Linux, EVERYTHING is a subfolder of the root directory.

The root directory of Linux can be thought of as roughly analogous to C:\\ in Windows.  But here we’re already in confusing territory (which happens a lot and is the main reason I want to convince you to make your mind a blank slate and learn Linux as if it was the FIRST OS you ever were exposed to.)

Linux DOES not label drives with letters as Windows does.  A “D” partition in Windows would simply contain files listed under another subfolder in “/” in Linux.

For example, my “home” directory is on another partition:

In Linux, it’s “/home”  In Windows it would be “D:\\home”.  Confused?  Good, that’s the first step in convincing you that coming into Linux with preconceived notions from Windows about how an OS should behave and be organized is only going to hold you back.  You’ll be spending most of your time asking the pointless question “Why isn’t this like Windows?”  Sooner or later you’re going to come to the conclusion that understanding Linux has absolutely nothing to do with Windows, and you’ll stop asking that question and move on.

Hopefully, this article will speed up your learning experience.

Now let’s take the “/bin” directory.  It contains system essential binaries (programs) and scripts to run those programs, plus a few other system essential items.  These are programs that are absolutely essential for running the OS, but are NOT user programs like spreadsheets or word processors:

In Windows, it’s similar (but not exactly) to what you would find in C:\\Windows and C:\\Windows\\system32.

There is a BIG difference you might notice here.  You will see that “Executables” in Linux have NO file extension like .exe in Windows.  Actually, to be more precise and confuse you more, there are a few executables that DO have a file extension . . . like the “.deb” extension, which is used for installation routines.  But the “.deb” files are not to be found in the “/bin” folder.

Indeed, these “.deb” files are really download files, like a “setup.exe” would be in Windows, and are not stored anywhere unless you choose to do so.

Just as you wouldn’t mess around with any executables in C:\\Windows or C:\\Windows\\system32, you should not mess with the files in “/bin”.  (Well, you actually could since Linux is Open Source, but unless you’re an uber-geek I wouldn’t recommend it.)

OK, now let’s take a look at the “/boot” directory.  This is one of the few folders that IS intuitive.  It contains files that are essential to booting Linux, like the kernal and the boot menu if you maintain a dual boot system.

Incidentally, I’m using Ubuntu version 9.10 on my test machine (it’s up to 12.x now) and Windows XP in my VM, 9.10 for screenshots and XP for explanations.  So a little bit of this may look different to you, and if you’re on Windows 7 or 8 it may be even more different, but the idea remains the same.  In making the transition from Windows to Linux, DO NOT attempt to apply Windows concepts to Linux . . . you’ll be setting yourself up for confusion, frustration, and maybe even failure.

Now the “/etc” folder.  This contains SYSTEM configuration files, NOT user configuration files (which are located in the “/home/[user name]” folder.)

The “/lib” folder contains SYSTEM “library” files (plus a few other types that are geeky), those necessary to run the system binaries in the “/bin” folder, NOT user libraries (they are located in “/usr/lib”.)

Library files in Linux are similar, but not exactly the same as, .dll files in Windows.  The architecture is different and the Linux library files actually have the “.so” (shared object) extension.  There’s more to it than that, but I’m already in the “. . .weigh you down with information . . .” arena so I’ll cut this short.

“/lost+found” is for the storage of file fragments (doesn’t happen very often in Linux though) when a file recovery manipulation is executed.  Most of the time this folder is empty.

At this point, let’s cut to the chase . . . mostly because all but one of the folders in “/” are system folders that you wouldn’t want to mess with anyway.  The “/home” directory is where all the action is for you as an individual user and that’s most often where changes are made AND you can make changes, and indeed might want to.

For example, when Linux is first installed, the “/home” directory is essentially empty (not completely though) until you populate it with programs and your own unique configurations.

So for the rest of this discussion we’ll be looking at “/home/[user name]”.  My “/home”:

A coupla’ things on this and then I’ll make those useless Windows comparisons.

First, each user is assigned a home directory.  So it might be “/home/user1” and then “/home/user2” and on and on.  I am the only user on the machine, and I’ve redacted my user name.

Those “/home/[my user name]/bin” and “Bin 2” folders are of my own making and are NOT even remotely similar to “/bin” files in the root directory.  It just so happened that I chose “bin” for the folder names.  Basically, these folders are just dumping grounds for similar stuff I collected on the Internet that I couldn’t categorize anywhere else.

Now (scrolling down in the “/home/[my user name]” directory, right pane, you’ll see that some of the folders have a DOT first:

These are user-specific (mine) configuration files, and tell Linux just exactly how I want MY programs to behave and look when they start up.  Similar in some ways to the old .ini files in Windows or even the Windows Registry.  (Incidentally, Linux does NOT have a Registry.)

The beauty of this is that if my system fails and I have to reinstall (though Ubuntu is hard to break, I HAVE done it a few times . . . once on purpose just to see if I could recover, which I did successfully, and several times just because I’m such a klutz), you can recover your configs by just reinstalling the corresponding DOT file in your “/home/[user name]” directory.

I have some of those DOT files backed up on a USB stick.

So, for example, if my system crashed and I had to reinstall from scratch, I would simply reinstall the program and then install the backed up configuration file.

I have my Sun VM (“VirtualBox”), Thunderbird (email client), Teamviewer (a remote assistance program), Skype, Shutter (a screen capture utility) and a few other DOT/Configuration files backed up.

Recovery is very simple.  I don’t need Norton Ghost, Acronis True Image, or any of several commercial titles.  Indeed, there are built-in “tar” commands that will backup and RESTORE my entire system.

The Linux home directory contains some elements of C:\\Documents and Settings and C:\\Program Files, and the Windows Registry, and the Linux “/” directory contains some elements of C:\\Windows and the Windows Registry, and there are some elements in some places that have NO analog in Windows at all!

So, by now, I’m hoping you can see the futility of trying to look at Linux with a Windows mindset.  Again, as I said at the outset, it’s like trying to fit a square peg in a round hole.

If you want to make the transition from Windows to Linux, go into it with a clean slate . . . as best you can, forget about Windows comparisons.

In some places, Linux is similar to Windows, but most often it’s NOT.  The sooner that you recognize that it’s  a different OS and stop trying to see those Windows comparisons (often confusing) the faster and easier you’ll make the transition.

3 thoughts on “Linux and Windows Comparisons”

  1. So Bob, can you recommend any security software for Linux, Mindblower!

    1. ClamAV is an Open Source anti-virus program that you can install on Linux systems (and also available for Windows). There is also a Firewall program that can be installed in a Linux system. The main point with Linux is the structure of the operating system and file protection scheme is different than Windows and not as apt to be affected by the same security problems. I am not saying you can’t download some “freebie” Linux application from an untrusted source and you give it “root” privileges (“root” would be analogous to giving someone “administrator” privileges in Windows) which would allow that “untrusted” application to make undesired changes. However, this is not as easily done as can occur in Windows.
      BTW, I am a different Bob than the one who wrote the article.

  2. thenudehamster

    I’ve been using Ubuntu since 9.04 – I’m now up to 12.04 – and I learned a lot from this post, not least of which is to devolve my brain from Windows disease even more than I already have. Linux is not as simple as Windows in where it stores stuff – applications, data, settings, etc., and as ANYTHING can be made executable – even a document, it can get confusing. Thanks for a little clarification.

    Thanks too to the other Bob for the nugget on anti-virus and malware. Linux is certainly not as sensitive to self-installing stuff as Windows, as it generally needs a password to install anything, but given time someone will figure out a way around – especially if it can make them money.

    Still need to remember that no matter what OS you have, browser based malware and spyware is still dangerous.

Comments are closed.

Exit mobile version

WHY NOT SUBSCRIBE TO OUR NEWSLETTER?

Get great content like this delivered to your inbox!

It's free, convenient, and delivered right to your inbox! We do not spam and we will not share your address. Period!