Category: linux

Making an alias command permanent in unix/linux

You would love to read:

How to work with alias command in unix?

Finding a file with its name in unix/linux?


In order to make a alias shortcut permanent you need to make that entry into the .profile file of your home directory.

to find out the file go to your home directory and type
$ ls -latr

This command will show all hidden files (.profile is also a hidden file)finding .profile file

Then edit the file using vi editor i.e.
$ vi .profile

vi entry
Make the desired entries and save the file , same can be seen in below screenshots.

Then just restart your system , to let the .profile execute and make your shortcuts permanent 🙂 🙂

It can be quite interesting to work in linux through alias command , you can create some crazy names for big commands or just shorten some big paths to some memorable words.

Just use the alias command to do that:

SYNTAX:  $ alias myfolder=”cd /home/deepak/abcd/dd/erfd”

and now when you gonna type myfolder you will reach to the cd /home/deepak/abcd/dd/erfd path.

CONS: It reamins active till that session and so are temporary.

PROS: can be made permamnent for a unix /linux machine if the same whole command is added to the .profile file of a user and then a restart to execute that file and make our alias works forever 🙂


alias creation in unix

Looking for a way to find out a file in a unix/linux box , you just need the exact file name with proper case and that’s it .

Use below command and enoy!!

Find . -name “name_of_file.doc”

here . represents the loaction from where it will search , if not at all sure you can use from / too i.e.

Find / -name “name_of_file.doc”

What Does Verbose Option Means In A Linux Command?

he verbose option simply produces verbose output on your screen. it means that the program provides comments on the operation as they occur, so you will see real-time status of what the utility or program is doing to run the tasks or commands you sent

for example you know when you ping, you see the replies as they happen, well, that’s what it means, if you didn’t want to see the verbose, then the system would not show you the replies it got, it would just ping without you knowing. like in unix, in linux, if you dont get an error message, then that means the command work. but with verbose, you see what the command is doing

Run level 0 is the system halt condition. Nearly all modern X86 computers will power off automatically when run level 0 is reached. Older X86 computers, and various different architectures will remain powered on and display a message referring to the halt condition.

Run Level 1 is known as ‘single user’ mode. A more apt description would be ‘rescue’, or ‘trouble-shooting’ mode. In run level 1, no daemons (services) are started. Hopefully single user mode will allow you to fix whatever made the transition to rescue mode necessary.

(You can boot into single user mode typically by using your boot loader, lilo or grub, to add the word ‘single’ to the end of the kernel command line).

Run levels 2 through 5 are full multi-user mode and are the same in a default UserLinux (Debian) system. It is a common practise in other Linux distributions to use run level 3 for a text console login and run level 5 for a graphical login.

Run level 6 is used to signal system reboot. This is just like run level 0 except a reboot is issued at the end of the sequence instead of a power off.

In the interests of completeness, there is also a runlevel ‘S’ that the system uses on it’s way to another runlevel. Read the man page for the init command (“man init”) for more information, but you can safely skip this for all practical purposes.


Press the power button on your system, and after few moments you see the Linux login prompt.

Have you ever wondered what happens behind the scenes from the time you press the power button until the Linux login prompt appears?

The following are the 6 high level stages of a typical Linux boot process.


  • BIOS stands for Basic Input/Output System
  • Performs some system integrity checks
  • Searches, loads, and executes the boot loader program.
  • It looks for boot loader in floppy, cd-rom, or hard drive. You can press a key (typically F12 of F2, but it depends on your system) during the BIOS startup to change the boot sequence.
  • Once the boot loader program is detected and loaded into the memory, BIOS gives the control to it.
  • So, in simple terms BIOS loads and executes the MBR boot loader.

2. MBR

  • MBR stands for Master Boot Record.
  • It is located in the 1st sector of the bootable disk. Typically /dev/hda, or /dev/sda
  • MBR is less than 512 bytes in size. This has three components 1) primary boot loader info in 1st 446 bytes 2) partition table info in next 64 bytes 3) mbr validation check in last 2 bytes.
  • It contains information about GRUB (or LILO in old systems).
  • So, in simple terms MBR loads and executes the GRUB boot loader.


    • GRUB stands for Grand Unified Bootloader.
    • If you have multiple kernel images installed on your system, you can choose which one to be executed.
    • GRUB displays a splash screen, waits for few seconds, if you don’t enter anything, it loads the default kernel image as specified in the grub configuration file.
    • GRUB has the knowledge of the filesystem (the older Linux loader LILO didn’t understand filesystem).
    • Grub configuration file is /boot/grub/grub.conf (/etc/grub.conf is a link to this). The following is sample grub.conf of CentOS.
title CentOS (2.6.18-194.el5PAE)
          root (hd0,0)
          kernel /boot/vmlinuz-2.6.18-194.el5PAE ro root=LABEL=/
          initrd /boot/initrd-2.6.18-194.el5PAE.img
  • As you notice from the above info, it contains kernel and initrd image.
  • So, in simple terms GRUB just loads and executes Kernel and initrd images.

4. Kernel

  • Mounts the root file system as specified in the “root=” in grub.conf
  • Kernel executes the /sbin/init program
  • Since init was the 1st program to be executed by Linux Kernel, it has the process id (PID) of 1. Do a ‘ps -ef | grep init’ and check the pid.
  • initrd stands for Initial RAM Disk.
  • initrd is used by kernel as temporary root file system until kernel is booted and the real root file system is mounted. It also contains necessary drivers compiled inside, which helps it to access the hard drive partitions, and other hardware.

5. Init

  • Looks at the /etc/inittab file to decide the Linux run level.
  • Following are the available run levels
    • 0 – halt
    • 1 – Single user mode
    • 2 – Multiuser, without NFS
    • 3 – Full multiuser mode
    • 4 – unused
    • 5 – X11
    • 6 – reboot
  • Init identifies the default initlevel from /etc/inittab and uses that to load all appropriate program.
  • Execute ‘grep initdefault /etc/inittab’ on your system to identify the default run level
  • If you want to get into trouble, you can set the default run level to 0 or 6. Since you know what 0 and 6 means, probably you might not do that.
  • Typically you would set the default run level to either 3 or 5.

6. Runlevel programs

  • When the Linux system is booting up, you might see various services getting started. For example, it might say “starting sendmail …. OK”. Those are the runlevel programs, executed from the run level directory as defined by your run level.
  • Depending on your default init level setting, the system will execute the programs from one of the following directories.
    • Run level 0 – /etc/rc.d/rc0.d/
    • Run level 1 – /etc/rc.d/rc1.d/
    • Run level 2 – /etc/rc.d/rc2.d/
    • Run level 3 – /etc/rc.d/rc3.d/
    • Run level 4 – /etc/rc.d/rc4.d/
    • Run level 5 – /etc/rc.d/rc5.d/
    • Run level 6 – /etc/rc.d/rc6.d/
  • Please note that there are also symbolic links available for these directory under /etc directly. So, /etc/rc0.d is linked to /etc/rc.d/rc0.d.
  • Under the /etc/rc.d/rc*.d/ directories, you would see programs that start with S and K.
  • Programs starts with S are used during startup. S for startup.
  • Programs starts with K are used during shutdown. K for kill.
  • There are numbers right next to S and K in the program names. Those are the sequence number in which the programs should be started or killed.
  • For example, S12syslog is to start the syslog deamon, which has the sequence number of 12. S80sendmail is to start the sendmail daemon, which has the sequence number of 80. So, syslog program will be started before sendmail.

A Picture Say !

A Picture Say !

A Picture Say !

How to install VLC 2.0 in Ubuntu 11.10

The latest update of VLC is released with some major changes

  • Broadcom CrystalHD hardware decoding
  • New video and audio filters
  • Experimental BluRay support
  • Improvements to the MKV demuxer
  • SDI and HD-SDI card support for input on Linux
  • Minor tweaks to interface



Steps to install in Ubuntu 11.10 :

1. sudo add-apt-repository ppa:n-muench/vlc 

2. sudo apt-get update

3. sudo apt-get install vlc


Three desktop environment in one Operating System : Ubuntu 11.10

Unity :


Cinnamon :


Want to surf INTERNET privately ?? So use private browsing . In mozilla by pressing ctrl+shit+p you can open the private browsing window. It is tedious to do every time ctrl+shit+p ,so if you want to make default behavior of mozilla as private browsing , follow below steps :

Click to read more