Tag Archives: Ubuntu

Colourful man pages in Ubuntu


Linux man pages are the most important resource for a Linux freak. By default man pages are formatted using the ‘less’ utility. ‘less’ shows the man pages in black & white, something like this :

grayscale man pages

If you use ‘most’ utility to format man pages, you will get a properly colour-formatted man pages. Take a look at man pages configured on my system :

color man pages

Do you like this one ?? Read on how to configure ‘most’ as your man pages viewer.

Step 1: Install the package ‘most’

$ sudo aptitude install most

Step 2: Configure ‘most’ as your man page viewer using update-alternatives :

$ sudo update-alternatives --config pager

update-alternatives

Enter the number corresponding to /usr/bin/most , here in this screenshot its 5.

Yeah, its done. Nothing more to do !!

Have fun.

Let me know if you find any difficulty doing this.

P.S: This can be done in Fedora as well as other linux also. In Fedora I guess you will have to use the command  /usr/sbin/alternatives instead of update-alternatives as root. Somebody try out in Fedora and let me know.

How to force fsck (File System Check)


Ubuntu linux, by default performs an ‘fsck’ one every 30 times the file-system is mounted to make sure the hard disk has no errors.

Sometimes you may need to perform an ‘fsck’ during next boot. Here’s the solution -

Create a file /forcefsck without any contents. This can be simply accomplished by

$ sudo touch /forcefsck

The next time you bootup fsck will be performed on all the partitions of your hard drive.  Since the file /forcefsck is deleted during the bootup process, this will force ‘fsck’ just ones.

On the contrary, if you frequently turn off your machine, you may be annoyed by regular fsck done every 30 times filesystem is mounted.  So, you may sometime wish to disable fsck and boot up fast. This can be done by creating a file /fastboot

$ sudo touch /fastboot

This file is also deleted during the boot up. So this method disables fsck only once. To change the frequency of ‘fsck’ according to your need you may use a very good utility ‘tune2fs’.

Check out its man pages for more details.

P.S.: These methods are generic to all Linux distros, but I am not sure about the frequency.