Wednesday 3 September 2014

What is Open Source ?


Something which is open to all , free to all .
open source refers to a program in which the source code is available to the people for use and/or modification from its original design.
We can view , modify and generate new source codes , can also create our own applications .

There are different Operating systems which support open source softwares .
First on this list are Linux and Unix.

Linux :

  • It can be freely distributed, downloaded freely, distributed through magazines, Books etc. There are priced versions for Linux also, but they are normally cheaper than Windows.
  • Everyone. From home users to developers and computer enthusiasts alike.
  • Linux kernel is developed by the community.
  • Linux can be installed on a wide variety of computer hardware, ranging from mobile phones, tablet computers to mainframes and supercomputers.
  • Linux is developed by Open Source development i.e. through sharing and collaboration of code and features through forums etc and it is distributed by various vendors.
  • Linux typically provides two GUIs, KDE and Gnome. But there are millions of alternatives such as LXDE, Xfce, Unity, Mate, twm, ect.
  • The File system it supports are Ext2, Ext3, Ext4, Jfs, ReiserFS, Xfs, Btrfs, FAT, FAT32, NTFS
  • Text Mode Interface : BASH (Bourne Again SHell) is the Linux default shell. It can support multiple command interpreters.
  • Since it is open to all , so it has had about 60-100 viruses listed till date. None of them actively spreading nowadays
  • Advantage is threat detection and solution is very fast, as Linux is mainly community driven and whenever any Linux user posts any kind of threat, several developers start working on it from different parts of the world
  • Examples are : Ubuntu, Fedora, Red Hat, Debian, Archlinux, Android etc.

UNIX :

  • An operating system that is very popular in universities, companies, big enterprises etc.
  • Different flavors of Unix have different cost structures according to vendors
  • Unix operating systems were developed mainly for mainframes, servers and workstations except OSX, Which is designed for everyone. The Unix environment and the client-server program model were essential elements in the development of the Internet
  • Three bigest distributions are Solaris (Oracle), AIX (IBM) & HP-UX Hewlett Packard. And Apple Makes OSX, an unix based os..
  • The UNIX operating system is used in internet servers, workstations & PCs. Backbone of the majority of finance infastructure and many 24x365 high availability solutions.
  • Initially Unix was a command based OS, but later a GUI was created called Common Desktop Environment. Most distributions now ship with Gnome.
  • File Systems : jfs, gpfs, hfs, hfs+, ufs, xfs, zfs format
  • Text Mode : Originally the Bourne Shell. Now it's compatible with many others including BASH, Korn & C.
  • It is not always free , but some free for development use (Solaris) but support is available for a price.
  • It is little more secured that Linux . A rough estimate of UNIX viruses is between 85 -120 viruses reported till date.
  • Since all the source code is not open and because of the proprietary nature of the original Unix, users have to wait for a while, to get the proper bug fixing patch. But these are not as common.
  • Examples : OS X, Solaris, All Linux 
For shell Commands , refer : https://wiki.debian.org/ShellCommands


Basic Terminologies :

1 KERNEL :
It is the brain of the linux operating system . It controls the hardware and makes the hardware interact with the applications .

2. DISTRIBUTION :
Also called Distro is a collection of programs combined with Linux kernel to build the Linux OS .

3. BOOT LOADER :
Program that boots the operating system .
eg : GRUB and ISOLINUX

4.FILE SYSTEM :
Methos for storing the files in an organised way
ext3 , ext4 , fat , xfs , butrfs , ntfs
distribution:

5.X-WINDOWS SYSTEM:
 Provides the tool-kit and protocol to build the interface (gui)

6.DESKTOP INTERFACE :
GNOME , kde , Xfce , fluxbox

7.COMMAND LINE :
bash , tcsh , zsh

Booting system :

What happens when we turn on the system ?

The control goes to BIOS(Basic Input Output System) which is a software program on the ROM chip placed on the motherboard of your system.

This BIOS checks whether all the hardware is fine or not , performs POST operation (power on self test). If yes , it then proceeds ahead .

Now the control goes to Boot Loader , there are two different stages here
1 . MBR ie Master Boot Record , it is the first sector in the hard disk , 512 byte size , it checks for the bootable partition . next , it then searches for second boot loader ie grub .

2nd stage , the second boot loader ie grub resides in /boot .
The splash screen is displayed which allows us to choose the OS we want , hence it then loads the kernel of that OS into the RAM. And hence passes the control to it .

init program user : /sbin , is the first program which later allows different programs on the system to keep t running .Near the end of the boot process,  init starts a number of text-mode login prompts (done by a program called getty). These enable you to type your username, followed by your password.

X-Windows system is the last process of booting.

GNOME Desktop Environment


GNOME is a popular desktop environment with an easy to use graphical user interface. It is bundled as the default desktop environment for many distributions including Red Hat Enterprise Linux, Fedora, CentOS, SUSE Linux Enterprise, and Debian. GNOME has menu-based navigation and is sometimes an easy transition for at least some Windows users. However, as you'll see, the look and feel can be quite different across distributions, even if they are all using GNOME.
Another common desktop environment very important in the history of Linux and also widely used is KDE, which is used by default in openSUSE.
Other alternatives for a desktop environment include Unity (from Ubuntu, based on GNOME), Xfce, and LXDE. Most desktop environments follow a similar structure to GNOME.


Network Time Protocol allows you to set the date and time via Internet servers.
shutdown -h now : power off
halt            : power off
poweroff       :power off
shutdown -r : reboots the system

Documentation Sources, e.g. https://www.gentoo.org/doc/en/



Keyboard Shortcut Task
CTRL-L Clears the screen
CTRL-D Exits the current shell
CTRL-Z Puts the current process into suspended background
CTRL-C Kills the current process
CTRL-H Works the same as backspace
CTRL-A Goes to the beginning of the line
CTRL-W Deletes the word before the cursor
CTRL-U Deletes from beginning of line to cursor position
CTRL-E Goes to the end of the line
Tab Auto-completes files, directories, and binaries