Wednesday, October 14, 2009

Friday, June 13, 2008

Linux Technical Days: Day1 - What is Linux?

What is Linux?

Linux is the name usually given to any Unix-like computer operating system that uses the Linux kernel. Linux is one of the most prominent examples of free software and open source development: typically all underlying source code can be freely modified, used, and redistributed by anyone. The name "Linux" comes from the Linux kernel, started in 1991 by Linus Torvalds. The system's utilities and libraries usually come from the GNU operating system, announced in 1983 by Richard Stallman. The GNU contribution is the basis for the alternative name GNU/Linux.

Linux history:

The Unix operating system was widely adopted, copied and modified by academic institutions and businesses. By 1990 most universities had Unix systems and computer science students were exposed to them. Many of them wanted to run Unix on their own computers as well. Unfortunately, by that time, Unix had become commercial and rather expensive. About the only cheap option was Minix, a limited Unix-like system written by Andrew Tanenbaum for teaching purposes. The GNU Project, started in 1984, had the goal of creating a "complete Unix-compatible software system" made entirely of free software. In 1985, Richard Stallman created the Free Software Foundation and developed the GNU General Public License (GNU GPL). Many of the programs required in an OS (such as libraries, compilers, text editors, a Unix shell, and a windowing system) were completed by the early 1990s, although low level elements such as device drivers, daemons, and the kernel were stalled and incomplete. Into this scene came Linux, in October, 1991. Linus Torvalds, the author, had used Unix at the University of Helsinki, and wanted something similar on his PC at home. Since the commercial alternatives were way too expensive, he started out with Minix, but wanted something better and soon started to write his own operating system. After its first release, it soon attracted the attention of several other hackers. While Linux initially was not really useful except as a toy, it soon gathered enough features to be interesting even for people uninterested in operating system development. During 1992 and 1993, the Linux kernel gathered all the necessary features it required to work as a replacement for Unix workstations, including TCP/IP networking and a graphical windowing system (the X Window System). Linux also received plenty of industry attention, and several small companies were started to develop and distribute Linux. Dozens of user groups were founded, and the Linux Journal magazine started to appear in early 1994. Version 1.0 of the Linux kernel was released in March, 1994. Since then, the kernel has gone through many development cycles, each culminating in a stable version. Each development cycle has taken a year or three, and has involved redesigning and rewriting large parts of the kernel to deal with changes in hardware (for example, new ways to connect peripherals, such as USB) and to meet increased speed requirements as people apply Linux to larger and larger systems (or smaller and smaller ones: embedded Linux is becoming a hot topic). From a marketing and political point of view, after the 1.0 release the next huge step happened in 1997, when Netscape decided to release their web browser as free software (the term 'open source' was created for this). This was the occasion that first brought free software to the attention of the whole computing world for the time. It has taken years of work since then, but free software (whether called that or open source) has become not only generally accepted but also often the preferred choice for many applications.

Why to use Linux?

  • Freedom: Linux and most of its software are distributed under the GNU Public License or a similar license; licenses that allow anyone to modify the internal code of the software to fit their individual needs or to provide improvements. So those software are owned by anybody as he respects the license.
  • Price: many Linux distribution comes free of charge and can be downloaded freely from the internet. Also most software used for Linux comes free of charge.
  • Security:
    • Well-done administration of a computer with Linux allows for a very secure multi-user workstation.
    • Viruses are less of a threat now. The system setup of a Linux system does not allow a virus to act.
  • Transparent: With Linux, you can always find out what the system is doing, and why. All configuration files are in plain text. Linux will do what you ask it for, no more, no less. It doesn't do magic stuff behind your back.
  • Born on the Internet: Linux has been network enabled since the very beginning. Networking and Internet tools are built into the system. Linux is the leading operating system for Internet servers.
  • Standards: Linux itself and many common applications follow open standards. This means an update on one system will not make other systems obsolete.
  • Linux is configurable: Linux is a true multi-user operating system. Each user can have his or her own individual configuration all on one computer.

Linux distributions:

As Linux is a free open source software, many communities and companies started to build system based on Linux. This communities customizes and creates software that is shipped with these systems. This combination of Linux kernel, GNU tools and community created software is called a distribution. A distribution gives the user the ability to manage and configure the system easily as it add tools that automates those operations. There are many distributions on the Internet which are in a competition to offers the best. More about available distributions and their ranks by users are available at http://distrowatch.com. You can choose the distribution which you like and download it directly and legally from its official site and start right ahead after burning you distribution CD. It is preferred to try a Live CD before installing the system on your hard disk. Live CD is a CD that contains a fully running Linux OS that runs directly from the CD without installing or altering any files on your hard disk and without any risk.

Refernces

http://en.wikipedia.org/wiki/Linux http://liw.iki.fi/liw/texts/linux-the-big-picture.html http://distrowatch.com http://www.tuxmagazine.com/node/1000117

Sunday, April 27, 2008

My Timer Label Swing Component

For sometime I wanted to create a swing component and for some business issues I wanted to calculate time I worked to calculate my payments. So I created a program that counts time in milliseconds. Then I wanted to create the same program with more features and thought if some other programs may need such component. Here comes the idea of extending Java Swing JLabel component to have the time counter then use it whenever possible and distribute it for other developers.

You can download the component from the link: http://www.4shared.com/file/45525258/ea7339d0/TimerLabel.html

NetBeans is recommended for development. You can add the component by adding it to the palette of swing by using the palette manager the "Add from jar" and select my jar file which contains TimerLabel class which represents the component.

The component contains three main functions:
  • start(): which starts the timer.
  • pause(): pause the running timer.
  • reset() resets the timer to zero state.
you can find further documentation in doc folder.

Wednesday, April 16, 2008

Slow Linux Internet? Here is a solution

Some distribution such as Debian etch enable IPv6 by default (I don't know why to use IPv6 now). This may cause the internet connection to slow down as the system searches for IPv6 first and most of internet connections uses IPv4 (which is the appropriate one).

To fix this problem you need to edit file /etc/modprobe.d/aliases to disable IPv6 support. Edit the file and search for the line:

alias net-pf-10 ipv6
and edit it to be:
alias net-pf-10 off #ipv6

Then reboot your machine to enable new settings and enjoy flawless speed.

Sunday, April 22, 2007

My own distro screenshots


This is some screen shots for my own Linux distribution which I've built from scratch.

Tuesday, April 10, 2007

How to think like a computer scientist

This is a series of books for different programing languages including C++, python and Java. It is a very good series that focuses on how the programmer should think including using different data structures and developing methods. the series' books could be found at:
C++: http://ibiblio.org/obp/thinkCS/cpp/english/dist/thinkCScpp.html.tgz
Python: http://ibiblio.org/obp/thinkCS/python/english2e.tgz
Java: http://ibiblio.org/obp/thinkCS/java/english/dist_v4.0/thinkapjava.pdf

Wednesday, April 4, 2007

A lot of java examples

http://www.exampledepot.com/

This site offers a lot of Java examples on almost every class of J2SE. It includes also HowTOs to perform different tasks using thse classes I hope you Enjoy it.