Monday, November 1, 2010

mkdir -p

To create the hierarchy of directory we can use the mkdir command with the -p option. For eg. check the below mentioned directory structure we have three different level of directories.

os
|-- linux
| |-- debian
| |-- fedora
| `-- ubuntu
`-- unix
|-- aix
|-- bsd
`-- mac

The command to create the above mentioned directory structure as follows.

$ mkdir -p os/{linux/{debian,fedora,ubuntu},unix/{aix,bsd,mac}}

Changing the user login shell

To change the user login shell permentently, we can use chsh command.

Example:

[ravi@localhost ~]$ chsh
Changing shell for ravi.
New shell [/bin/bash]: /bin/ksh
Shell changed.

Password less login.

Just like to windows, the linux users want to login to the box with out entering the password every time they login. This could be accomplished by removing the password for the user. Do login to the box as the root and remove the password for the user.

$ passwd -d

Example:
$ password -d ravi #this would remove the password for the user ravi.

X Server Configuring

It was a week before I thought of tweaking the X's configuration in the netbook with the Fedora installation, I was trying out the xrandr command ended up corrupting my X settings.

The netbook started loading with default vesa driver, Its fails to detected the projector and I was getting more and more troubles as the day passes. I want to put it straight, by setting it back to the original configuration. It took almost a week to figure it out what was the fix. The solution was damn simple probe for the devices and write an new xorg.conf file and replace the old one with the default [vesa] driver, it was that's simple.

Following steps helped me in deriving the solution.

Step 1: Boot the box in the Runlevel 3

Step 2: probe for devices and write an new xorg.conf
$ X -configure

here:
-configure probe for devices and write an xorg.conf
The above command would generate a new xorg.conf file in the name xorg.conf.new

Step 3: Replace the existing xorg.conf with the generated one, kindly don't forget to rename the xorg.conf.new to xorg.conf while you copy to /etc filesystem.

Step 4: Restart the box or change the runlevel to 5 and the check the X system again it would load with the best resolution available for your configuration.

Thanks.