Free eBook – Linux 101 Hacks

Written by BinnyVA on February 15, 2009 – 11:09 pm -

Linux 101 Hacks eBook

Ramesh, who blogs at The Geek Stuff have released a free eBook ‘Linux 101 Hacks‘. Go download it – if you haven’t done it already.

About the Book

There are total of 101 hacks in this book that will help you build a strong foundation in Linux. All the hacks in this book are explained with appropriate Linux command examples that are easy to follow.

Its kinda like my txt site on Linux Commands – except for the fact that the explanation on the book is much better than my site.

Here is a copy-paste of the table of contents for the book.

Table of Contents

Chapter 1: Powerful CD Command Hacks

  • Hack 1. Use CD PATH to define the base directory for cd command
  • Hack 2. Use cd alias to navigate up the directory effectively
  • Hack 3. Perform mkdir and cd using a single command
  • Hack 4. Use “cd -” to toggle between the last two directories
  • Hack 5. Use dirs, pushd and popd to manipulate directory stack
  • Hack 6. Use “shopt -s cdspell” to automatically correct mistyped directory names on cd

Chapter 2: Date Manipulation

  • Hack 7. Set System Date and Time
  • Hack 8. Set Hardware Date and Time
  • Hack 9. Display Current Date and Time in a Specific Format
  • Hack 10. Display Past Date and Time
  • Hack 11. Display Future Date and Time

Chapter 3: SSH Client Commands

  • Hack 12. Identify SSH Client Version
  • Hack 13. Login to Remote Host using SSH
  • Hack 14. Debug SSH Client Session
  • Hack 15. Toggle SSH Session using SSH Escape Character
  • Hack 16. SSH Session Statistics using SSH Escape Character

Chapter 4: Essential Linux Commands

  • Hack 17. Grep Command
  • Hack 18. Find Command
  • Hack 19. Suppress Standard Output and Error Message
  • Hack 20. Join Command
  • Hack 21. Change the Case
  • Hack 22. Xargs Command
  • Hack 23. Sort Command
  • Hack 24. Uniq Command
  • Hack 25. Cut Command
  • Hack 26. Stat Command
  • Hack 27. Diff Command
  • Hack 28. Display total connect time of users

Chapter 5: PS1, PS2, PS3, PS4 and PROMPT_COMMAND

  • Hack 29. PS1 – Default Interaction Prompt
  • Hack 30. PS2 – Continuation Interactive Prompt
  • Hack 31. PS3 – Prompt used by “select” inside shell script
  • Hack 32. PS4 – Used by “set -x” to prefix tracing output

Chapter 6: Colorful and Functional Shell Prompt Using PS1

  • Hack 34. Display username, hostname and current working directory in the prompt
  • Hack 35. Display current time in the prompt
  • Hack 36. Display output of any command in the prompt
  • Hack 37. Change foreground color of the prompt
  • Hack 38. Change background color of the prompt
  • Hack 39. Display multiple colors in the prompt
  • Hack 40. Change the prompt color using tput
  • Hack 41. Create your own prompt using the available codes for PS1 variable
  • Hack 42. Use bash shell function inside PS1 variable
  • Hack 43. Use shell script inside PS1 variable

Chapter 7: Archive and Compression

  • Hack 44. Zip command basics
  • Hack 45. Advanced compression using zip command
  • Hack 46. Password Protection of Zip files
  • Hack 47. Validate a zip archive
  • Hack 48. Tar Command Basics
  • Hack 49. Combine gzip, bzip2 with tar

Chapter 8: Command Line History

  • Hack 50. Display TIMESTAMP in history using HISTTIMEFORMAT
  • Hack 51. Search the history using Control+R
  • Hack 52. Repeat previous command quickly using 4 different methods
  • Hack 53. Execute a specific command from history
  • Hack 54. Execute previous command that starts with a specific word
  • Hack 55. Control the total number of lines in the history using HISTSIZE
  • Hack 56. Change the history file name using HISTFILE
  • Hack 57. Eliminate the continuous repeated entry from history using HISTCONTROL
  • Hack 58. Erase duplicates across the whole history using HISTCONTROL
  • Hack 59. Force history not to remember a particular command using HISTCONTROL
  • Hack 60. Clear all the previous history using option -c
  • Hack 61. Substitute words from history commands
  • Hack 62. Substitute a specific argument for a specific command
  • Hack 63. Disable the usage of history using HISTSIZE
  • Hack 64. Ignore specific commands from the history using HISTIGNORE

Chapter 9: System Administration Tasks

  • Hack 65. Partition using fdisk
  • Hack 66. Format a partition using mke2fsk
  • Hack 67. Mount the partition
  • Hack 68. Fine tune the partition using tune2fs
  • Hack 69. Create a swap file system.
  • Hack 70. Create a new user
  • Hack 71. Create a new group and assign to an user
  • Hack 72. Setup SSH passwordless login in OpenSSH
  • Hack 73. Use ssh-copy-id along with ssh-agent
  • Hack 74. Crontab
  • Hack 75. Safe Reboot Of Linux Using Magic SysRq Key

Chapter 10: Apachectl and Httpd Examples

  • Hack 76. Pass different httpd.conf filename to apachectl
  • Hack 77. Use a temporary DocumentRoot without modifying httpd.conf
  • Hack 78. Increase the Log Level temporarily
  • Hack 79. Display the modules inside Apache
  • Hack 80. Show all accepted directives inside httpd.conf
  • Hack 81. Validate the httpd.conf after making changes
  • Hack 82. Display the httpd build parameters
  • Hack 83. Load a specific module only on demand

Chapter 11: Bash Scripting

  • Hack 84. Execution Sequence of .bash_* files
  • Hack 85. How to generate random number in bash shell
  • Hack 86. Debug a shell script
  • Hack 87. Quoting
  • Hack 88. Read data file fields inside a shell script

Chapter 12: System Monitoring and Performance

  • Hack 89. Free command
  • Hack 90. Top Command
  • Hack 91. Ps Command
  • Hack 92. Df Command
  • Hack 93. Kill Command
  • Hack 94. Du Command
  • Hack 95. lsof commands.
  • Hack 96. Sar Command
  • Hack 97. vmstat Command
  • Hack 98. Netstat Command
  • Hack 99. Sysctl Command
  • Hack 100. Nice Command
  • Hack 101. Renice Command

About the Author

Ramesh Natarajan is the blogger behind The Geek Stuff. To know more about him and the site, take a look at the about page.

This is what he has to say about himself…

My name is Ramesh Natarajan. I live in Los Angeles, California. I have been adding 1’s and 0 ’s for more than 15 years in the IT industry. I am very much interested in anything that runs on electricity. I have done intensive programming on several languages and C is my favorite. I have done lot of work on the infrastructure side in Linux system administration, DBA, Hardware and Storage (EMC).

Tags: , , , ,
Posted in Command Line, News, Reviews | 5 Comments »

Freedom Walk in Cochin

Written by BinnyVA on October 29, 2008 – 12:48 am -

Freedom Walk is an initiative to promote Free software by walking across Kerala. Here is a description about their walk in their own terms…

Freedom walk is a project aimed at spreading the message of ‘Freedom in Society’, ‘Freedom from Environmental Issues’, and ‘Freedom in Software’ and to promote activism around these freedoms. As part of this mobilization campaign a team of volunteers are going to walk from Kasargode to Trivandrum and organize seminars and talks on these freedoms at educational institutions and non profit organizations.

Additionally we hope to connect with people and organizations who share our vision and to work together for our common cause. We are also planning to launch a collaboration platform for such individuals and organizations to help them to work together and also to harness the power of the web to improve their efficiency.

For all you international readers(readers outside India), you may have heard of our state Kerala with respect to linux and free software. Our government switched from Windows to Linux in all government schools.


Today the group – Anoop John, Cherry and Sooraj – reached Cochin – my city. So me and a few guys from our local LUG group decided to join them. We walked across the city stopping at collages and some institutions to present our case. It was a great experience – but I have to admit – my legs are in a bad shape right now.

More Details

More details on today’s walk will be posted on ILug Cochin site.

Some organizations that were involved…

More details and photos available at the Freedom Walk website

Tags: , , , , , , ,
Posted in News | 3 Comments »

WFTL Bytes

Written by BinnyVA on October 21, 2008 – 11:42 pm -

WFTL Bytes “your occasiodaily FOSS and Linux news show” is a video podcast by Marcel Gagné. Go see it – it is Good – Good with a capital ‘G’. WFTL Bytes does for Linux what Zero Punctuation does for gaming.

This is WFTL(pronounced ‘Wuftal’) has to say about itself…

This is WFTL Bytes!, your occasiodaily FOSS news show featuring the latest Linux and FOSS news with your host, Marcel Gagné. WFTL Bytes! is a fast, fun, occasionally a bit goofy, but always informative look at technology news and events as seen from a free and open source software perspective. This includes Linux and everything that that orbits it. Watch! Enjoy! Comment on the stories. I want to know what you think and what you’ve got to say, either about the show in general, the topics covered, of the stories themselves. Tell your friends, relatives, co-workers . . . tell everybody!

WFTL Bytes does for Linux what Zero Punctuation does for gaming

A Demo

Here is a couple of episodes to get a feel of the show…

That’s it folks, go subscribe to WFTL Bytes and check out Marcel’s latest press hat. Bye.

Seriously, I’m done. Bye.

Tags: , , ,
Posted in News, Opinion, Reviews, Video | 1 Comment »

Firefox 3 Review

Written by BinnyVA on July 1, 2008 – 10:58 pm -

Firefox Logo

I have been a Firefox 3 user from day 1. So I thought it might be a good time to write a review. Some positive and negative points about it…

The Negative Stuff

Stability Issues

I am having some random crashes – this could be a problem with my setup. I have not heard about such a problem on other sites. Anyway, these crashes give no warning. One minute, you are browsing smoothly and the next minute you are looking at the desktop – the browser have gone away. Fortunately, Firefox has a session saver – so if you restart Firefox after a crash, the tabs you had earlier will be waiting for you.

Go Button

Firefox 3 removed the ‘Go’ button to the right of address bar. I want it back – fortunately, you can get it back using a userChrome.css hack…

Go to the profile folder of firefox. In Linux, it should be in some folder like /home/username/.mozilla/firefox/[random id].default/chrome/

Create a new file called userChrome.css and put this line in it…

#urlbar[pageproxystate="valid"] > #urlbar-icons > #go-button {
	visibility: visible !important;

Flash Problem

This should be a Linux only problem – and I think the flash plugin is the one that should take the blame. When I visit some pages with embedded flash, a new gnome window open up. It does nothing – just hangs around the screen. Do any of you guys have this problem?

The Positive Stuff

Awesome bar is, well, awesome

The new address bar is just great. It saves a lot of time. Its a very good feature – and I predict that other browsers will follow firefox lead and add this feature too.

FUEL Library

You users will not find this useful – but for us add-on developers, this is great. FUEL a javascript library that makes it much more easier to create XUL plugins for firefox.

Better Bookmarking System

Firefox 3’s bookmarking system is much better than the earlier one. It learned a lot from – now it supports tagging.

Looks Better

In addition to better color and font handling, the looks of some HTML elements have been improved(example, the dropdown/combo box). Also dragging have been improved – just try to drag an image or a link and you will see what I mean. You can see the item you are dragging along with the cursor instead of a generic icon.

So what are your opinions about the new Firefox?

Tags: , , , ,
Posted in Applications, News | 8 Comments »

Fedora 9(Sulphur) Released

Written by BinnyVA on May 13, 2008 – 11:33 pm -

Fedora 9 has been released – I have been waiting for this. For those of you who don’t know, Fedora is my distro of choice. I have been using Fedora since Fedora Core 3. And I will be upgrading to the latest release as soon as I get my hands on it.

Fedora 9 Launch

I have started the download – but I have a 256kbps internet connection – and it will take around 4 days for the download to complete. After the install, I will write a review on it. I can’t wait to see the new KDE!

I have began a process of backing up my data so that nothing will be lost during the upgrade. No matter how careful I am, I always manage to loose something in the upgrade. Yeah, I know – Murphy’s Law. I hate Murphy. I am waiting to see what I loose this time. Last time it was my database. Luckily I was able to restore it from my backup – but the data entered after the backup was lost.

Fedora 9 Links

Fedora and Me: A History

All Posts in the Fedora Category

Tags: , , , ,
Posted in Distros, Fedora, News | 5 Comments »

Frees – Hard Disk Drives Free Space Viewer

Written by BinnyVA on April 6, 2008 – 1:43 am -

I am taking a break from the regular MP3 Players Series for a special announcement. The first stable version of Frees has been released. Frees is a GUI tool that shows the Hard Disk space usage. It is written in Python using the GTK2 framework. This will only work in linux as it depends on the ‘df’ command. Frees just parses the output of df and shows it in a graphical format.


Frees Screenshot


Simple/Easy to use

Frees features a very simple interface. Granted, some of the columns like Device, Type and Mount Point may sound a bit geeky – but hey, you are using Linux. Its supposed to be geeky.

Ability to Remove Drives from the List

There may be some drives that you want to hide in the list. Like, say you have a 10 mb /boot partition – you have no user-level use for that. In Frees you can hide that partition in the list. Go to Preferences > Drives and check off the drive you want to hide.

Shows Total Space

The last item in the list is the ‘Total’ row. It shows the total space of your harddisk. Note that this shows the total of all mounted drives – so it may not be an accurate measure of your total HDD space.



There is an alternative to this program – KDiskFree. Its a KDE App…

KDiskFree displays the available file devices (hard drive partitions, floppy and CD drives, etc.) along with information on their capacity, free space, type and mount point. It also allows you to mount and unmount drives and view them in a file manager.

I was not all that satisfied with KDiskFree – that’s why I created Frees. These are the advantages Frees has over KDiskFree…

  • KDiskFree cannot hide drives in the list.
  • KDiskFree includes mounted images, CD ROM/DVD ROM devices as list items. Frees ignores these items.
  • KDiskFree does not show the file system types for all drives – many are shown as ‘?’
  • Frees have the ‘Total HDD Space’ feature – KDiskFree does not have that.

But KDiskFree has one advantage over Frees – you can mount drives from within the application. You cannot do that in Frees.

df Command

The other alternative to Frees is the ‘df’ command. Here is the man entry for df…

df displays the amount of disk space available on the file system containing each file name argument. If no file name is given, the space available on all currently mounted file systems is shown.

df is not ‘user friendly’ in the classical sense of the term – its a terminal application. Unlike KDiskFree, I do not consider df to be a competition to Frees. As a matter of fact, Frees uses df command internally to get the space usage data.

Frees Links

Now, your job is to download this application and try it out. Send me any bugs you find and your suggestions.

Tags: , , , , , , , , ,
Posted in Applications, Gnome, News | 5 Comments »

Fedora 7 Released

Written by BinnyVA on May 31, 2007 – 10:30 pm -

Fedora Logo

The latest version of the popular Fedora Distribution was released today. From this release onwards, the word ‘Core’ is taken out of the name. Take the Fedora 7 Tour for more information about the latest release.

Fedora is a Linux-based operating system that showcases the latest in free and open source software. Fedora is always free for anyone to use, modify, and distribute. It is built by people across the globe who work together as a community: the Fedora Project.

Some Stats

  • Linux kernel 2.6.21
  • GNOME 2.18
  • KDE 3.5.6
  • Xorg 7.3


I would recommend that you use the torrent for downloading it. When Fedora 6 was released, the servers became inaccessible due to heavy traffic.


Posted in Distros, Fedora, News | 1 Comment »

“The Sorry State of the Open Source Today” : A Report

Written by BinnyVA on April 16, 2007 – 10:22 pm -

Posted in News | No Comments »

Debian Etch Released

Written by BinnyVA on April 9, 2007 – 2:45 am -


After a long delay and many problems, the debian team has finally released the fourth version of this very popular distro. Named Debian Etch, this new release will have a lot of new features like a new Graphical Installer, many new applications, etc.

Using a now fully integrated installation process, Debian GNU/Linux 4.0 comes with out-of-the-box support for encrypted partitions. This release introduces a newly developed graphical frontend to the installation system supporting scripts using composed characters and complex languages; the installation system for Debian GNU/Linux has now been translated to 58 languages.

I have been waiting for this for some time. I will review this distro as soon as I get my hands on it – that is after we have downloaded it. The guys in my local LUG group(ILug-Cochin) are going to be very exited :-)

Posted in Debian, News | 1 Comment »