Monday, 22 August 2011

Directories present in Linux Operating system


1.     Bin: provides binary libraries ie. All the library files required for execution of a program. It also creates links for the various programs which are installed in the system.

2.       Boot: this directory contains the various boot related files for eg the the configurations of boot loaders like(GRUB and lilo),kernel files(that form the core of linux).

3.       Cdrom:this is a directory in which the cd rom is mounted.

4.       Dev: this directory contains the basic configuration files for devices and their respective drivers which are used when various devices are called by the system programs.

5.       etc : This is the most important directory in the linux file system hierarchy. It consist of all the files required for for a software to run ie all the source files whjch are required during execution are present here. It consist of all the system related configuration files like login information, os informations , etc.

6.       Home: this the user directory where all user personalised files are stored by default.

7.       Lib: this consist of all the library files which are used during system calls by kernel. This also consist of kernel and other system call programs that may be required by the operating system.

8.       Mnt: It is the default directory where all the removable and non removable media including extra cd roms are mounted.

9.       Opt: Opt is reserved for additional software you install; although, most providers don’t use it. This is kind of like ‘Program Files‘ for linux.

10.   proc :Proc is a special virtual directory like /dev that contains process information. It contains runtime system info like: system memory, devices mounted, hardware configuration, etc.

11.         srv:  Srv is a serve folder. It holds site specific data to be served by the system for protocols such as, ftp, rsync, www, cvs etc. To be compliant distributions include this folder but I have not seen it used much.

12.   sbin: Sbin is similar to /bin with the exception that these ready to run binaries are reserved for root users. That is they typically will only work when executed by root or sudo. Examples would include:
·         mke2fs
·         ifconfig
·         fdisk
 tmp: Tmp is a temporary storage folder. Anything that is to be temporarily stored goes here. It is recommended that you don’t delete these manually. If you want to delete them you usually add this to boot up or shutdown procedure since they can contain useful information for programs that are already running.

14.   Usr: Usr houses all the binaries, documentation, libraries, and header files for all the user applications. Most user binaries will be installed into this folder making this one of the largest folders in the Linux directory.
15.   Var This stands for variable. This stores all the files that vary as the system runs. Things like log files, backups, mail, cache, etc..

Run Levels in Linux Operating system


Linux utilizes what is called "runlevels". A runlevel is a software configuration of the system that allows only a selected group of processes to exist. Init can run the system in one of eight runlevels. These runlevels are 0-6 and S or s. The system runs in only one of these runlevels at a time. Typically these runlevels are used for different purposes. Runlevels 0, 1, and 6 are reserved. For Redhat Linux version 6, the runlevels are:








0
-
halt
1
-
Single user mode
2
-
Multiuser, without NFS (The same as 3, if you don't have networking)
3
-
Full multiuser mode
4
-
unused
5
-
X11
6
-
Reboot

1.      level 0 : to halt the system, it reboots the systems again and again after login in
2.      level1 :single user mode, this is a special mode in which only one use ie the super user mode in which limited system based linux commands work.
3.      level2-level5 : this is the multi user mode in which the system works at its full potential with all the command set that it supports
4.      level 6 : entering into this level reboots the system.

Wednesday, 17 August 2011

How to change root password with out login in

This could be easily done using single user mode of linux.

1.To boot into single user mode change any entry of grub that boots ubuntu
2. Go to the kernel line and add single at the end of it.
3. Now boot from it.
4. Once it boots to change root password
Passwd root
5. Change password and enjoy

Sunday, 31 July 2011

simple way to install ubuntu 11.04

First of all ensure u have at least 20 GB of space free in ur hardisk(free means unallocated memory)

Once u do that reboot ur system and boot the ubuntu cd from the boot option or change boot preferences from the BIOS.

Once your BIOS is configured to boot from CD first, if you have Ubuntu in the drive, you should see the splash screen with a ubuntu written on it. Ubuntu will take a couple of minutes to load up. Just be patient.

Select your preferred language.
If you have at least 512 MB of RAM, you may want to select Try Ubuntu, as it will allow you to do other things (check your email, browse the web) while you're installing Ubuntu.
If you have only 256 MB or 384 MB of RAM, you should select Install Ubuntu. This will give you the same installation screens you see below, but you won't have the rest of the Ubuntu live session running as well.
Select your language.
There is a new option in the Ubuntu 11.04 and 10.10 installers that asks if you want to install closed source third-party software for MP3 playback and Flash, for example. I would strongly suggest—unless you know who Richard Stallman is—that you check (or tick) this option.
If you want to install Ubuntu next to Windows so you can choose which operating system you want at boot-up, select the first option. As mentioned before, do this only if you don't anticipate even a small possiblity of returning exclusively to Windows. A traditional dual-boot can be undone but it's not easy.
This is how u do it go to advanced option
Now make four partitions out of 20 gb free partition(if u have free space in extended partition choose partition type as logical)
One for boot with
Mount point as /boot
Filetype as Ext3
And size 300 MB
Next for root (where all system files are stored)
Mount point as /
Filetype as Ext3
And size 7 GB
Then for home directory( where ur main data is stored)
Mount point /home
Filetype Ext3
And size 9GB
Then for swap(ie for memory requirements)
No mount point
File type swap
Size 4 GB
While Ubuntu is preparing files to copy over for installation, it'll ask you some questions. They're self-explanatory.
Eventually, the installation will finish (the whole thing can take anywhere between 15 minutes and an hour, depending on the speed of your computer). You can either Continue Testing if you want to shutdown your computer or Restart Now if you want to restart your computer.
Either way, Ubuntu will eject your CD (or prompt you for when to remove your USB stick, if you used UNetBootIn instead of a CD burning program). The next time you boot up, you should have a working Ubuntu installation!

Saturday, 30 July 2011

Making a backup of your Linux distribution using Remastersys (described for Ubuntu)

  1.  Open Ubuntu software Center 
  2. Select software sources from the edit menu 
     3.  Add the below repository in the software source
          deb http://www.geekconnection.org/remastersys/repository remastersys/ 
     4.       Close the software sources. 
     5.       The Ubuntu Software center will automatically refresh the list 
     6.       Now type in “remastersys” and select install 
     7.       After it installs open it from the menu it would be in administration 
     8.       If it is not found make it visible from the edit menu option when u right click on start menu 
     9.       Now got to customize option and set all the values as per ur requirements like name and all that 
     10.   Now select make a data backup and make a iso of the whole system 
     11.   This will create an iso for u 
     12.   Make a bootable pen drive using ubuntu startup disk creator 
     13.   And enjoy your new bootable pen drive contains your current state of your distribution

Friday, 29 July 2011

Installing Softwares in Ubuntu


There are several ways of doing so
1.       Through ubuntu software center
a.       Search for the repositories(these are the locations where packages are present) in google.
b.      Add the repository in the software sources that is present in Edit -> Software sources.
c.       Copy the repository in the sources list.
d.      Update the software sources.
e.      Now type in the software name in the search box of the software sources.
f.        Click on install button and your software is installed.
g.       If u don’t see your software go to start menu right click on it , go to edit menu and check in the software from there.
2.       Through the Terminal using apt get
a.       Repeat the steps a to d from the previous steps.
b.      Now go to terminal.
c.        Now write the following code
apt-get install <package name>
d.      For resolving dependencies

apt-get install -f <package name>

e.      And your software is installed.
3.       Through terminal using debian packages (having extension .deb)
a.        Repeat the steps a to d from the previous steps.
b.      Now go to terminal.
c.        Now write the following code
dpkg install <package name>
d.      If it shows dependencies for the software(ie. Some more supporting file like lib files are need use this statement instead

dpkg install –f <package name>

e.      And your software is installed.
4.       Through terminal but using source files
a.       Download the source files from the net
b.      Most softwares  come with a readme file which defines the kind of commands it supports
c.       These are few set of commands
                                                               i.      Make
1.       Go to the source directory
2.       Then type in the following commands
make
make install

                                                             ii.      Cmake
1.       Go to the source directory
2.       Then type in this command
cmake

Monday, 25 July 2011

Share Ur Ubuntu Desktop using Remote desktop using VNC

Remote Desktop will only work if there’s a GNOME login session.Leaving your computer with an unattended GNOME login session is not secure and not recommended.
Some Tips
1) You can lock your screen using System--->Quit

Once you click on quit you should see the following screen here you need to select lockscreen

2) switch off your monitor when computer is left unattended
Configuring Remote Desktop
First you need to go to System -> Preferences -> Remote Desktop

Once it opens you should see the following screen

In the above screen you need to configure remote desktop preferences for sharing and security
For Sharing
you need to tick the box next to the following two options
Allow other users to view your desktop
Allow other users to control your desktop
For Security
you need to tick the box next to the following two options
Ask you for confirmation (If you tick this option some one need to click on allow from remote desktop once it connected if you don’t want you can untick this option)
Require the user to enter this password:
Password: Specify the password

Connecting from Ubuntu Machine
Open your terminal from Applications--->Accessories--->Terminal and enter the following command
vncviewer -fullscreen 192.168.2.23:0
now you should see the following message asking for password enter the password after complete success you can see VNC authentication succeeded message and starting remote desktop
VNC viewer version 3.3.7 - built Jul 4 2006 10:04:48
Copyright (C) 2002-2003 RealVNC Ltd.
Copyright (C) 1994-2000 AT&T Laboratories Cambridge.
See http://www.realvnc.com for information on VNC.
VNC server supports protocol version 3.7 (viewer 3.3)
Password:
VNC authentication succeeded
If you want to quit vncviewer
Press ‘F8′ and select Quit viewer
Connecting from Windows machine
If you are trying to connect from your windows machine you need to install vncviewer of your choice i have installed from here http://www.realvnc.com/download.html.Install this program once you install this you can opem from start--->All programs--->RealVNC--->VNC Viewer 4--->Run VNC Viewer once it opens you should see the following screen here enter the remotemachine ipaddress:0 format and click ok

Now it will prompt for password enter your password and click ok

Now on the remote machine you should see the following screen asking for permission to allow this connection you need to click on allow this will comeup only if you tick “Ask you for confirmation” option under sharing

Once it connected you should see the remote machine desktop.