Monday, November 26, 2012

HOW TO add color to root vi ?

I usually prefer vi over gedit or others, but whenever I use vi as root , it doesnt show any color. Here is a way to set color right in vi as root.

Open your bashrc file:
#vi /root/.bashrc
and add this line
alias vi='vim'

then run #source /root/.bashrc

You can also test which vi you are using by running "which vi" both as root and normal user.

remember $ is for normal mode and # is for super user mode.
All done !!

Sunday, July 22, 2012

New To Linux ?

I have seen many who tried their hands on linux and end up back to windows. Many students who got stuck up with the question How will I do this in Linux? which is best distro ? where to get help ? So I decided this will help those who want to try their hands on linux and who are looking for doing everything with linux. First thing first, you can use any distribution that you want Ubuntu, Sabayon, Centos, Mint, OpenSuse, Fedora etc. these are just few out of a big list, you can check and get information about all this at Distrowatch. But my personal advice, if you are a programmer or engineering student then try with fedora else for everyone else try ubuntu. Now, you can get the installation instructions through web or through the home pages of distribution. Here are some places where you can get all the information and answers to your 'how to ' questions. There are some forums also where you can browse the solutions to common porblems and also ask some new Fedora Forum Ubuntu Forum Linux Forum Linux Questions And if you are looking to find the alternatives for your windows softwares then try this Alternative to Open Site Solutions Open Source As Alternatives If you are looking for reasons why you should switch to linux then try this Why Linux is Better ? you can also google out for videos, Usually, every linux distros has their own repositories from where you can install the packages but there is one more great place to look for some great softwares like SourceForge For now thats all ! Please comment with more links and description so that many others get benefit ;) Knowledge belongs to all, Follow opensource !

Saturday, April 28, 2012

How To stop and enable firewall ?

Sometimes, when we are running some socket program, by connecting our machine to other machine, we face the problem of firewall. If the port is blocked, then we will not be able to transmit and receive, on the other hand both the codes will work fine with localhost (
In such cases, you can disable the firewall on temporary basis and permanent basis both. There are other options also like allowing tcp/udp connection on specific port, but I prefer this one:

$service iptables stop

to renable:

$service iptables start

To make it permanent:

$chkconfig iptables off
$service iptables stop

Wednesday, April 25, 2012

How to add Colors to GIT

The easiest way:

$git config color.ui true

All set and done

How to install Chromium browser on fedora

Step 1: Download the .repo file

Step 2: copy the repo file in /etc/yum.repos.d/
$cp fedora-chromium-stable.repo /etc/yum.repos.d/

Step 3: run the following command with root access or sudo
$yum install chromium

All done.

Tuesday, April 24, 2012

How to restore / reinstall grub

If you install another operating system and by mistake you messed up, and you now feel that restoring the grub is a good option OR you install some thing, and found some operating system missing on system boot, then here are the steps to restore the grub:

Step 1: open a terminal, and gain root access, you can also use "sudo"

Step 2: run $os-probe
this will give you all the operating system present on your machine.

Step 3: $grub2-mkconfig -o /boot/grubX/grub.cfg
replace X with the version of grub you are having , in some cases it is grub and grub2 depending upon the different operating system you installed

Step 4: $grub2-install /dev/sda
this will install grub in MBR (Master Boot Record)

Use the above commands at your own risk, they always works for me. (triple boot: fedora 17B, Debby Sqeeze, and Windows 7)

Monday, April 23, 2012

How to Switch from GDM to KDM ?

Step 1: create a file "desktop"
Step 2: In "desktop" put this:
save the file.
Step 3: copy the file in "\etc\sysconfig"
For this, open the terminal and run "sudo cp desktop /etc/sysconfig"
or su and then copy.
Step 4: reboot

Posted from GScribble.