☰ Menu

difference


It's time to make the big switch from your Windows or Mac OS operating system.
Mac OS uses a UNIX core. Your switch from Mac OS to Linux will be relatively smooth.
It's the Windows users who will need some adjusting. In this tutorial will introduce the Linux OS and compare it with Windows.

In this tutorial will introduce the Linux OS and compare it with Windows.

Windows Vs. Linux File System

In Microsoft Windows, files are stored in folders on different data drives like C: D: E:
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. 

Types of Files

In Linux and UNIX, everything is a file. Directories are files, files are files, and devices like Printer, mouse, keyboard etc.are files.
Let's look into the File types in more detail.

General Files

General Files also called as Ordinary files. They can contain image, video, program 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.
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: File Name Convention

In Windows, you cannot have 2 files with the same name in the same folder. See below -
Linux Vs Windows
While in Linux, you can have 2 files with the same name in the same directory, provided they use different cases.
Linux Vs Windows

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 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

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. Below are important Linux Directories and a short description of what they contain.
Linux Vs Windows
These are most striking differences between Linux and other Operating Systems.  There are more variations you will observe when switching to Linux and we will discuss them as we move along in our tutorials.

Windows Vs. Linux: Key Differences

Windows Linux
Windows uses different data drives like C: D: E to stored files and folders. Unix/Linux uses a tree like a hierarchical file system.
Windows has different drives like C: D: E There are no drives in Linux
Hard drives, CD-ROMs, printers are considered as devices Peripherals 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) Guest There are 3 types of user account types 1) Regular, 2) Root and 3) Service Account
Administrator user has all administrative privileges of computers. Root user is the super user and has all administrative privileges.
In Windows, you cannot have 2 files with the same name in the same folder Linux file naming convention is case sensitive. Thus, sample and SAMPLE are 2 different files in Linux/Unix operating system.
In windows, My Documents is default home directory. For every user /home/username directory is created which is called his home directory.

Introduction to linux OS

LINUX =



What is an Operating System?
Every time you switch on your computer, you see a screen where you can perform different activities like write, browse the internet or watch a video. What is it that makes the computer hardware work like that? How does the processor on your computer know that you are asking it to run a mp3 file?
Well, it is the operating system or the kernel which does this work. A kernel is a program at the heart of any operating system that takes care of fundamental stuff, like letting hardware communicate with software.
So, to work on your computer, you need an Operating System(OS). In fact, you are using one as you read this on your computer. Now, you may have used popular OS's like Windows, Apple OS X but here we will learn what Linux is and what benefits it offers over other OS choices.


 LINUX is an open source operating system. Linux is community-developed and open source operating system for computers, servers, mainframes, embedded devices, and mobile devices. It is supported on nearly every major computer platforms including SPARC, ARM and, x86 building it as one of the most extensively supported operating systems.



What is Linux?


Just like Windows, iOS, and Mac OS, Linux is an operating system. In fact, one of the most popular platforms on the planet, Android, is powered by the Linux operating system. An operating system is software that manages all of the hardware resources associated with your desktop or laptop. To put it simply, the operating system manages the communication between your software and your hardware. Without the operating system (OS), the software wouldn?t function.
The Linux operating system comprises several different pieces:
  1. Bootloader –  The software that manages the boot process of your computer. For most users, this will simply be a splash screen that pops up and eventually goes away to boot into the operating system.
  2. Kernel – This is the one piece of the whole that is actually called ?Linux?. The kernel is the core of the system and manages the CPU, memory, and peripheral devices. The kernel is the lowest level of the OS.
  3. Init system – This is a sub-system that bootstraps the user space and is charged with controlling daemons. One of the most widely used init systems is systemd? which also happens to be one of the most controversial. It is the init system that manages the boot process, once the initial booting is handed over from the bootloader (i.e., GRUB or GRand Unified Bootloader).
  4. Daemons – These are background services (printing, sound, scheduling, etc.) that either start up during boot or after you log into the desktop.
  5. Graphical server – This is the sub-system that displays the graphics on your monitor. It is commonly referred to as the X server or just X.
  6. Desktop environment – This is the piece that the users actually interact with. There are many desktop environments to choose from (GNOME, Cinnamon, Mate, Pantheon, Enlightenment, KDE, Xfce, etc.). Each desktop environment includes built-in applications (such as file managers, configuration tools, web browsers, and games).
  7. Applications – Desktop environments do not offer the full array of apps. Just like Windows and macOS, Linux offers thousands upon thousands of high-quality software titles that can be easily found and installed. Most modern Linux distributions (more on this below) include App Store-like tools that centralize and simplify application installation. For example, Ubuntu Linux has the Ubuntu Software Center (a rebrand of GNOME Software? Figure 1) which allows you to quickly search among the thousands of apps and install them from one centralized location.

Why use Linux?

This is the one question that most people ask. Why bother learning a completely different computing environment, when the operating system that ships with most desktops, laptops, and servers works just fine?
To answer that question, I would pose another question. Does that operating system you?re currently using really work ?just fine?? Or, do you find yourself battling obstacles like viruses, malware, slow downs, crashes, costly repairs, and licensing fees?
If you struggle with the above, Linux might be the perfect platform for you. Linux has evolved into one of the most reliable computer ecosystems on the planet. Combine that reliability with zero cost of entry and you have the perfect solution for a desktop platform.
That’s right, zero cost of entry… as in free. You can install Linux on as many computers as you like without paying a cent for software or server licensing.
Let’s take a look at the cost of a Linux server in comparison to Windows Server 2016. The price of the Windows Server 2016 Standard edition is $882.00 USD (purchased directly from Microsoft). That doesn’t include Client Access License (CALs) and licenses for other software you may need to run (such as a database, a web server, mail server, etc.). For example, a single user CAL, for Windows Server 2016, costs $38.00. If you need to add 10 users, for example, that’s $388.00 more dollars for server software licensing.  With the Linux server, it?s all free and easy to install. In fact, installing a full-blown web server (that includes a database server), is just a few clicks or commands away (take a look at ?Easy LAMP Server Installation? to get an idea how simple it can be).
If zero cost isn’t enough to win you over? what about having an operating system that will work, trouble free, for as long as you use it? I’ve used Linux for nearly 20 years (as both a desktop and server platform) and have not had any issues with ransomware, malware, or viruses. Linux is generally far less vulnerable to such attacks. As for server reboots, they’re only necessary if the kernel is updated. It is not out of the ordinary for a Linux server to go years without being rebooted. If you follow the regular recommended updates, stability and dependability are practically assured.

Open source

Linux is also distributed under an open source license. Open source follows these key tenants:
  • The freedom to run the program, for any purpose.
  • The freedom to study how the program works, and change it to make it do what you wish.
  • The freedom to redistribute copies so you can help your neighbor.
  • The freedom to distribute copies of your modified versions to others.
These points are crucial to understanding the community that works together to create the Linux platform. Without a doubt, Linux is an operating system that is ?by the people, for the people?. These tenants are also a main factor in why many people choose Linux. It?s about freedom and freedom of use and freedom of choice.

What is a “distribution?”

Linux has a number of different versions to suit any type of user. From new users to hard-core users, you’ll find a “flavor” of Linux to match your needs. These versions are called distributions (or, in the short form, “distros”). Nearly every distribution of Linux can be downloaded for free, burned onto disk (or USB thumb drive), and installed (on as many machines as you like).
Popular Linux distributions include:
  • LINUX MINT
  • MANJARO
  • DEBIAN
  • UBUNTU
  • ANTERGOS
  • SOLUS
  • FEDORA
  • ELEMENTARY OS
  • OPENSUSE
Each distribution has a different take on the desktop. Some opt for very modern user interfaces (such as GNOME and Elementary OS’s Pantheon), whereas others stick with a more traditional desktop environment (openSUSE uses KDE).
You can check out the top 100 distributions on the Distrowatch.
And don’t think the server has been left behind. For this arena, you can turn to:
  • Red Hat Enterprise Linux
  • Ubuntu Server
  • Centos
  • SUSE Enterprise Linux
Some of the above server distributions are free (such as Ubuntu Server and CentOS) and some have an associated price (such as Red Hat Enterprise Linux and SUSE Enterprise Linux). Those with an associated price also include support.

Which distribution is right for you?

Which distribution you use will depend on the answer to three simple questions:
  • How skilled of a computer user are you?
  • Do you prefer a modern or a standard desktop interface?
  • Server or desktop?
If your computer skills are fairly basic, you’ll want to stick with a newbie-friendly distribution such as Linux Mint, Ubuntu (Figure 3), Elementary OS or Deepin. If your skill set extends into the above-average range, you could go with a distribution like Debian or Fedora. If, however, you’ve pretty much mastered the craft of computer and system administration, use a distribution like Gentoo. If you really want a challenge, you can build your very own Linux distribution, with the help of Linux From Scratch.
If you’re looking for a server-only distribution, you will also want to decide if you need a desktop interface, or if you want to do this via command-line only. The Ubuntu Server does not install a GUI interface. This means two things your server won’t be bogged down loading graphics and you’ll need to have a solid understanding of the Linux command line. However, you can install a GUI package on top of the Ubuntu Server with a single command like sudo apt-get install ubuntu-desktop. System administrators will also want to view a distribution with regards to features. Do you want a server-specific distribution that will offer you, out of the box, everything you need for your server? If so, CentOS might be the best choice. Or, do you want to take a desktop distribution and add the pieces as you need them? If so, Debian or Ubuntu Linux might serve you well.

I am asked to Learn Unix? Then why Linux?

UNIX is called the mother of operating systems which laid out the foundation to Linux. Unix is designed mainly for mainframes and is in enterprises and universities. While Linux is fast becoming a household name for computer users, developers, and server environment. You may have to pay for a Unix kernel while in Linux it is free.

But, the commands used on both the operating systems are usually the same. There is not much difference between UNIX and Linux. Though they might seem different, at the core, they are essentially the same. Since Linux is a clone of UNIX. So learning one is same as learning another.


OS DEVELOPMENT INTRODUCTION

INTRODUCTION TO OS DEVELOPMENT



There aren’t really any development fields more challenging than operating system (OS) development. It is the “great pinnacle of programming.”
Few programmers ever attempt to build an OS and many of those who do make the attempt never produce a functioning system.
However, if you do make it all the way to the finish line and produce a functional operating system, you will have joined an elite group of top-flight programmers.


What is an Operating System?

The earliest computers did not have operating systems.
Every program that ran on these early systems had to include all of the code necessary to run the computer, communicate with connected hardware, and perform the computation the program was actually intended to perform. This situation meant that even simple programs were complex.
As computer systems diversified and became more complex and powerful, it became increasingly impractical to write programs that functioned as both an operating system and a useful application.
In response, individual mainframe computer owners began to develop system software that made it easier to write and run programs and operating systems were born.
An operating system (OS) is software that manages computer hardware and system resources and provides the tools that applications need to operate. The birth of operating systems meant that programs no longer had to be written to control the entire scope of computer operation.
Instead, computer applications could be written to be run by the operating system while the operating system worried about computer resources and connected peripheral equipment such as printers and punched paper card readers.

A Brief History of Operating Systems

The first operating system was created by General Motors in 1956 to run a single IBM mainframe computer. Other IBM mainframe owners followed suit and created their own operating systems.
As you can imagine, the earliest operating systems varied wildly from one computer to the next, and while they did make it easier to write programs, they did not allow programs to be used on more than one mainframe without a complete rewrite.
In the 1960s, IBM was the first computer manufacturer to take on the task of operating system development and began distributing operating systems with their computers.
However, IBM wasn’t the only vendor creating operating systems during this time. Control Data Corporation, Computer Sciences Corporation, Burroughs Corporation, GE, Digital Equipment Corporation, and Xerox all released mainframe operating systems in the 1960s as well.
In the late 1960s, the first version of the Unix operating system was developed. Written in C, and freely available during it’s earliest years, Unix was easily ported to new systems and rapidly achieved broad acceptance.
Many modern operating systems, including Apple OS X and all Linux flavors, trace their roots back to Unix.
Microsoft Windows was developed in response to a request from IBM for an operating system to run its range of personal computers.
The first OS built by Microsoft wasn’t called Windows, it was called MS-DOS and was built in 1981 by purchasing the 86-DOS operating system from Seattle Computer Products and modifying it to meet IBM’s requirements.
The name Windows was first used in 1985 when a graphical user interface was created and paired with MS-DOS.
Apple OS X, Microsoft Windows, and the various forms of Linux (including Android) now command the vast majority of the modern operating system market.

The Parts of an Operating System

Operating systems are built out of two main parts:
  • The kernel;
  • System programs.
The kernel is the heart of the operating system. It is the first program loaded when the computer starts up, it manages computer resources, and it handles requests from system programs and applications.
System programs run on top of the kernel. They aren’t used to perform useful work, instead, they are the programs necessary to connect the kernel to user applications and peripheral devices. Device drivers, file systems, networking programs, and system utilities like disk defragmeters are all examples of system programs.
Application programs aren’t part of the operating system and are the programs used to perform useful work. Word processing applications, browsers, and media player are common types of application programs. Application programs are managed and enabled by the kernel, and use system programs to access computer periphery devices and hardware.

What You Need to Know

The list of things you need to know before you attempt to undertake operating system development is very long. The three most important things you need to master prior to jumping into OS development are:
  • Basic computer science knowledge;
  • Computer programming theory and best-practices;
  • Low-level and a high-level programming languages.