Friday 17 August 2007

What is GRUB, it is the first thing you see When you boot Solaris, Redhat or other UNIX-like distro..

GRUB is currently available under the GNU General Public License as "free" software, free to share and change. Project was launched in line of creating a free 'boot loader'.


GRUB: GRUB orginated in 1995, when Enrich Boleyn was trying to boot the GNU Hurd with the University of Utaha's Mach 4. Enrich then began modifying the FreeBSD boot loader, so that it would understand Multiboot. He soon realized that it would be lot easier to write his own boot loader from scratch than to keep working on the FreeBSD boot loader, and so GRUB was born.

GRUB:(GRand Unified Bootloader), is a boot loader package from the GNU Project, it allows a user to have several different operating systems on their computer at once, and to choose which one to run when the computer starts. GRUB can be used to select from different kernel images available on a particular operating system's partitions, as well as to pass boot-time parameters to such kernels.


GRUBcan run on any operating system with a Multiboot kernel. It is predominantly used on Unix-like systems; the GNU operating system uses GNU GRUB as its boot loader, as do most general-purpose Linux distributions. Solaris has been able to boot using GRUB since version 10 (1/06 release).

GRUB: (Features)1. Basic funtions must be straightforwad for end-users.2. Rich functionality to support kernel experets and designers.3. Backward compatibility for booting FreeBSD, NetBSD, OpenBSD, and Linux . Proprietary kernels such as :a. DOS.b. Windows Nt.c. OS/2 ,
Are supported via a chain-loading fuction.

Courtesy:www.gnu.org

Wednesday 15 August 2007

Linux is a "KERNEL" not an Operating System :

Kerel(Linux) is a part of Operating System (GNU) :

For the past one year, i have been working with UNIX-like distros.., but i never give it a thought to know the difference between a "kernel" which is a linux and the Operating System which is a GNU, untill i came across a document by Richard Stallman, that corrected my "wrong" assumption of Linux as OS.

http://www.gnu.org/gnu/linux-and-gnu.html,


So, what is Linux:
Friends, Linux is just a "kernel", it can only function in the context of a complete operating system.( Kernal definition: The program in the system that allocates the machine's resources to the other programs that you run).

The "kernel" is an essential part of an operating system, but useless by itself; it can only function in the context of a complete operating system. Many users are not fully aware of the distinction between the kernel, which is Linux, and the whole system, which they also call “Linux”.


In simple layman words:
GNU an "UNIX-LIKE OS" was already created as a complete OS, with "Hurd" as a kernel in early 1990, but there were few problems with this kernel and it was still being developed, fortunately , it was during 1991, when "Linus Torvalds" wrote Linux (Free Unix like Kernel) and filled the last major gap, and that's all about it, Linux (kernel) together with the GNU system gave brith to a complete free Operating System called "GNU/Linux".

What is GNU:
If you are wonderfing what is "GNU", here is the information :GNU stands for “GNU's Not Unix. GNU is a project by community of people, conceived in 1983 as a way of bringing back the cooperative spirit that prevailed in the computing community in earlier days—to make cooperation possible once again by removing the obstacles to cooperation imposed by the owners of proprietary software, the main object was to create "FREE" software.

By "Free" it means:

Software that comes with permission for anyone to use, copy, and distribute, either verbatim or with modifications, either gratis or for a fee. In particular, this means that source code must be available. “If it's not source, it's not software.

Courtesy: Richard Stallman

Friday 10 August 2007

Love Linux not necessarily marry !

I am not undermining linux by that statement, but it's just a thought for all those who have never seen or experienced linux, there is a complete new world of Operating System which is Bug free, spyware free and virus free. It is not necessary that you swtich to linux based OS, but you can always give it a try, and see the difference yourself.


When I say love Linux, I actually meant, experience it, see the difference yourself, and then decide what you want to do, I think that's a fair statement . To being with, you can either have it installed on the other partition of your PC so that you continue to use the existing OS and yet get the taste of Linux. In case you do not want to part ways with your Hard disk for whatever reason, you can get a copy of VMWARE application (http://www.vmware.com/) installed on your system and run the virtual image of Linux, this is what i have been doing for past one year, this tool gives you the freedom to use/test different types of Linux distros.


Like most of us, i always feared of UNIX-like OS, b'cos of its resemblance with UNIX, and i always imagined UNIX administrators running through complex commands via command line interface , and i always asked myself, without any knowledge of commands, how am i going to find and run my favorite applications, how am i going to deal with listening to audio or watching movie, these were some of my fears when i thought of UNIX from a beginners point of view.

I googled and found lot of stuff about Linux, soon I got to know that, there are Desktop packages that gives you Desktop-Environment similar to Windows so that you can easily work through your Linux, A “desktop environment” can mean anything ranging from a simple window manager to a complete suite of desktop applications, such as KDE or GNOME.

So, Solaris / Redhat / Ubuntu.. all can have a desktop :) , for this article, we shall only concentrate on one such application called GNOME:

What is GNOME:
Acronym for GNU Network Object Model Environment. (Pronounced guh-nome.) GNOME is part of the GNU project and part of the free software, or open source, movement. GNOME is a Windows-like desktop system that works on UNIX and UNIX-like systems and is not dependent on any one window manager. The current version runs on Linux, FreeBSD, IRIX and Solaris. The main objective of GNOME is to provide a user-friendly suite of applications and an easy-to-use desktop.
http://en.wikipedia.org/wiki/GNOME

In case you want to work from command-line, no one is stopping you : Just open the "Terminal", and play with commands if your main purpose is to deal in commands. That's it, i installed redhat, and got familiar with the look of it, what is where etc, but i must say, its so quick and easy to work through commands, and it is not tough, its just a matter of getting use to, i googled to look for article on the web and found of millions of page dedicated to Linux forums where you can get direct help from other Linux users, i slowly started working with commands, and in the process, i learnt , how to "unzip" (gunzip) file in Linux, what is "Kernel" , "Directory structure" , "daemons (Programs) " ,"services", "Libraries" , "tar" , what is "package", how to move/ copy/ delete / edit / how to setup FTP etc . It was slow process, but i did not mind b'cos my Job did not depend on it, I was learning it as a hobby, which indeed made me more relax and patient and that helped me in digging further in to "UNIX commands".

Over the past year, since i first saw the Linux, i have worked on Redhat, Ubuntu and Solaris and believe me, most commands work the same on these different flavors, therefore handy UNIX commands will help you any day on any flavors. For those who are least interested in commands, and just looking for more reliable, bug free environment and yet wants to retain the user friendly features of Windows can always work with window managers provided by KDE/GNOME.

I still consider myself a novice here, but that does not mean complexity on the Linux side , i just like to be like that, Linux is a journey for me not a destination , discovering virus free environment where my PC not only works faster than before it even runs similar applications like Office (word, excel, power-point) which i have been use to for ages. Further, you never know when this extra bit of skill will come handy at your current job space, or even lend you a better job than the one you currently have. So, why shy away, go ahead and befriend Linux.

We all feel good, when we work through command line, don't we ;) , even though same can be achieved via GUI, because that lifts our confidence in the command-line world . On this point let me introduce you to what is called :Terminal, command line, Shell etc.


The command line is also known as the terminal or the shell. People also call it a terminal window, or a shell prompt, or a command prompt.

Terminal window = command prompt = shell , its one and the same.Running a command, means typing something at the command prompt then pressing the ENTER key to execute the command.

Let's take a look at some of the basic commands that are the most useful:
1. View directory contents with 'ls'
'ls' command, the purpose of this command is to list the files that are in the current directory. At the command prompt, type in 'ls' without the quotes. Then press the ENTER key. You will see a list of files that are in the current directory. Let's look at an example of how to use this command:
user@linux~> ls

2. Make a directory with 'mkdir'How can we create a directory? There is a command called 'mkdir' that is used forthis. You use this command using this as a pattern:
mkdir [insert directory name here]

3. Remove a directory with 'rmdir'Once we have made a directory, can we remove it? Yes. We use the 'rmdir'command. This command is similar to the 'mkdir' command in regards to how to useit:
rmdir [directory you want to remove]
You just replace the "[directory you want to remove]" with the actual name of the directory you want to remove. For example:user@linux:~> rmdir myfiles

4. Change to a directory with 'cd'
Let's say that we have just created a directory called 'myfiles'. How do we then go into that directory? This is what the 'cd' command is for. It is used to "c"hange"d"irectories. This is how we will use this command:
cd [directory name]

How do we get back out of the directory? Instead of providing a directory name,we just put in two dots for the name. This just means, "I want to leave the directorythat I am currently in." This is what using the command looks like:user@linux:~/myfiles> cd ..

5.What directory am I in? Using 'pwd'
How do we know what directory we are in? There is a very simple command forthis. It is called 'pwd'. That just means "p"resent "w"orking "d"irectory. You use itlike this:
pwd

And it tells you what directory you are in. Using this command will help youknow if you are in the right place.

6. Copying files with 'cp'
Now that we know some commands for working with directories, let's look atsome ways to work with files. To begin with, we will look at copying a file. Thecommand 'cp' will do this for us. Its usage is thus:
cp [source file] [destination file]

You just replace "[source file]" with the file you want to copy. You replace the"[destination file]" with the place you want that file copied to. For example, if I hada file called 'mybooks.txt' and I wanted to make a copy of it called 'somebooks.txt', Icould run this command:
user@linux:~> cp mybooks.txt somebooks.txt

7. Moving files with 'mv'
If you want to move a file instead of copy it, you can use 'mv'. The syntax ofhow to use this command is very similar to the 'cp' command:
mv [source file] [destination file]

Replace "[source file]" with the name of the file you want moved. Replace "[destination file]" with the filename you want it moved to. You may notice that you can also use this command to rename a file, "moving" it from one filename to another. Example:user@linux:~> mv myfile.txt yourfile.txt

8. Deleting files with 'rm'
What about if we want to delete a file? This is the purpose of 'rm'. Thiscommand will permanently remove a file, so be careful with it. The way you use this is as follows:
rm [file to delete]

Again, use caution with this command. Its effects are permanent. Here is anexample:user@linux:~> rm myfile.txt

9. Viewing text files with 'cat'
Many files in Linux are text files. How do we view the contents of such textfiles? If the file is relatively small (its contents won't fill up more than one screen),we can use the 'cat' command. This command will just output the contents of the filestraight to the screen. Its usage is as follows:

cat [filename to display]

10. Viewing text files with 'less'
What if the file is too long to fit on one page? If it is a really big file, it may justdump large amounts of text to your screen. This will make it scroll up way fasterthan you can read it. Is there a solution to this problem? You bet. It is the 'less'command. This is how you use it:less [filename to display]

11. What time is it? What is the date? Using 'date'One very easy command is called 'date'. This displays the current date and time.Use this command as follows:

date

In addition to these commands, Sometimes, you will runinto a situation where you may need some help learning how to use a particular command. Fortunately, there is a help system built into Linux which can assist you with this. It is the 'man' command, which displays help on using other commands.

Using 'man' to find help

To use 'man', the following is the syntax:man [command]

Saturday 4 August 2007

Installing Samba on Solaris:

Samba is a useful program to install if your Solaris machine is networked with other machines running Windows. It enables the Solaris system to appear in Network Neighborhood on Windows, thus enabling simple drag-and-drop transfer of files between the systems. Samba also enables the Solaris system to print to printers attached to a Windows system.

Samba is supplied in source form and you need to compile it. This isn't difficult! Before doing so, you need to have installed the g(un)zip program and a C compiler. All of these are freely downloadable from the Net and instructions for installing C and gzip are here.

Step by Step procedure:
http://www.kempston.net/solaris/samba.html

The source code of Samba is available from:
http://samba.org/

Friday 3 August 2007

What is Telnet and SSH?

What is Telnet and SSH?
Telnet and SSH allows you to access your shell account.

Are there any differences between TELNET and SSH?
TELNET and SSH has long been employed by end-users and system administers to remotely control his or her servers. The key differences is that TELNET establishes a plain text connection while SSH, or Secure Shell, uses an encrypted connection so no one can ears drop on what data is being received or sent.

If you need to connect to the web server hosting your web site then SSH is the better option of the two since security is always a major concern, particularly, for businesses. Also, you do not want to legally liable for any damage that may occur from your web hosting account being used for illegal activities.

Why SSH?
When you telnet to a machine and, say, type your password, every keypress of your password is relayed across the Internet to our server in cleartext. This means that if some nefarious person on one of the routers through which the information passes sniffed the packets (the Internet equivalent of "tapping" a phoneline), then they'd suddenly know your password, letter for letter!
With SSH, the information is encrypted. So when you type your password, each letter is "scrambled" before it's sent over the Internet, and decoded at the other end. The encryption method is such that, if someone in between the servers stumbled upon the information, they'd just see a jumbled noise.

As you might imagine, this increases your security significantly.

Port (Ftp): 20 & 21
Port (SSH): 22
Port (Telnet): 23

Where can I get an SSH client? (For Windows Platforms)
Putty is a small but fully featured Windows SSH and telnet client. http://support.positive-internet.com/software.php
UNIX:
1. Command for SSH ?
ssh user@host

2. Can I run backups over ssh?
Yes. The easiest possible way to do this is:
# tar cvf - ssh user@host "dd of=/dev/tape"

3. Can I use ssh to communicate across a firewall?
Yes. All you need is an open port on the firewall and the sshd or sshd2 listening on the other side. Most people do this on port 22 (the standard port for Secure Shell), but if you have a BOFH, you can also tunnel through another open port through the firewall (I'm sure all those system admins love me now :-) by running a daemon on the remote side on a port that's allowed through a firewall, like SSL (port 443).

Set up the remote daemon running sshd on port 443:
# sshd -p 443

Then, on your local system, open a connection on port 443:
$ ssh -p 443 remotehost.example.org

You can also use Secure Shell to tunnel insecure traffic like POP, IMAP, and others through the firewall as well.