What is the Difference Between Linux and Windows

Today, We will know the difference between Linux and Windows OS. Before going into more depth about their structure and core functionality, Most of the end-users are working on Windows OS. Now Linux OS is also a user-friendly GUI. Generally, Linux OS is open source and free i.e no license is required to use Linux OS and Windows OS required a license to use. When we compare file systems in Windows and Linux, in Microsoft Windows, files are stored in folders on different data drives like C: D: E: Read: Microsoft Windows vs. Linux File System

But, in Linux, files are ordered in a tree structure starting with the root directory.

This root directory can be considered as the start of the file system, and it further branches out various other subdirectories. The root is denoted with a forward slash ‘/’.

A general tree file system on your UNIX may look like this.

Linux file structure

The Main Difference

  • Linux is an open source operating system so user can change source code as per requirement whereas Windows OS is a commercial operating system so user doesn’t have access to source code.
  • Linux is very well secure as it is easy to detect bugs and fix whereas Windows has a huge user base, so it becomes a target of hackers to attack windows system.
  • Comparing Windows file system vs Linux file system, Linux runs faster even with older hardware whereas Windows are slower compared to Linux.
  • Linux peripherals like hard drives, CD-ROMs, printers are considered files whereas Windows, hard drives, CD-ROMs, printers are considered as devices
  • Linux files are ordered in a tree structure starting with the root directory whereas in Windows, files are stored in folders on different data drives like C: D: E:
  • In Linux you can have 2 files with the same name in the same directory while in Windows, you cannot have 2 files with the same name in the same folder.
  • In Linux you would find the system and program files in different directories whereas in Windows, system and program files are usually saved in C: drive.

Types of Files

In Linux and UNIX, everything is a file. Directories are files, files are files, and devices like printers, mice, keyboards, etc. are files.

Let’s look into the File types in more detail.

General Files

General Files are also called Ordinary files. They can contain images, videos, programs, or simply text. They can be in ASCII or a Binary format. These are the most commonly used files by Linux Users.

Directory Files

These files are a warehouse for other file types. You can have a directory file within a directory (sub-directory). You can take them as ‘Folders’ found in Windows operating system.

Device Files:

In MS Windows, devices like Printers, CD-ROM, and hard drives are represented as drive letters like G: H:. In Linux, there are represented as files. For example, if the first SATA hard drive had three primary partitions, they would be named and numbered as /dev/sda1, /dev/sda2, and /dev/sda3.

Note: All device files reside in the directory /dev/

All the above file types (including devices) have permissions, which allow a user to read, edit or execute (run) them. This is a powerful Linux/Unix feature. Access restrictions can be applied for different kinds of users, by changing permissions.

Windows Vs. Linux: Users

There are 3 types of users in Linux.

  1. Regular
  2. Administrative(root)
  3. Service

Regular User

A regular user account is created for you when you install Ubuntu on your system. All your files and folders are stored in /home/ which is your home directory. As a regular user, you do not have access to directories of other users.

Root User

Other than your regular account another user account called root is created at the time of installation. The root account is a superuser who can access restricted files, install software, and has administrative privileges. Whenever you want to install software, make changes to system files or perform any administrative task on Linux; you need to log in as a root user. Otherwise, for general tasks like playing music and browsing the internet, you can use your regular account.

Service user

Linux is widely used as a Server Operating System. Services such as Apache, Squid, email, etc. have their own individual service accounts. Having service accounts increases the security of your computer. Linux can allow or deny access to various resources depending on the service.

Note:

  1. You will not see service accounts in Ubuntu Desktop version.
  2. Regular accounts are called standard accounts in Ubuntu Desktop

In Windows, there are 4 types of user account types.

  1. Administrator
  2. Standard
  3. Child
  4. Guest

Windows Vs. Linux: HOME Directory

For every user in Linux, a directory is created as /home/

Consider, a regular user account “Tom”. He can store his personal files and directories in the directory “/home/tom”. He can’t save files outside his user directory and does not have access to directories of other users. For instance, he cannot access the directory “/home/jerry” of another user account” Jerry”.

The concept is similar to C:\Documents and Settings in Windows.

When you boot the Linux operating system, your user directory (from the above example /home/tom) is the default working directory. Hence the directory “/home/tom is also called the Home directory which is a misnomer.

The working directory can be changed using some commands which we will learn later.

Windows Vs. Linux: Other Directories

Comparing Windows vs Linux for other directories, in Windows, System and Program files are usually saved in C: drive. But, in Linux, you would find the system and program files in different directories. For example, the boot files are stored in the /boot directory, and program and software files can be found under /bin, device files in /dev.

Summary of Difference between Window and Linux

Windows Vs. Linux:

Here is the main difference between Windows and Linux:

WindowsLinux
Windows uses different data drives like C: D: E to stored files and folders.Unix/Linux uses a tree-like hierarchical file system.
Windows has different drives like C: D: EThere are no drives in Linux
Hard drives, CD-ROMs, printers are considered as devicesPeripherals like hard drives, CD-ROMs, printers are also considered files in Linux/Unix
There are 4 types of user account types 1) Administrator, 2) Standard, 3) Child, 4) GuestThere are 3 types of user account types 1) Regular, 2) Root and 3) Service Account
Administrator user has all administrative privileges of computers.The root user is the superuser and has all administrative privileges.
In Windows, you cannot have 2 files with the same name in the same folderLinux file naming convention is case-sensitive. Thus, sample and SAMPLE are 2 different files in Linux/Unix operating system.
In windows, My Documents is the default home directory.For every user /home/username directory is created which is called his home directory.
Summary of Difference between Windows and Linux

Leave a Reply