≡ Menu

How to Write Your Own Linux Kernel Module with a Simple Example

What are kernel modules?

Kernel modules are piece of code, that can be loaded and unloaded from kernel on demand.

Kernel modules offers an easy way to extend the functionality of the base kernel without having to rebuild or recompile the kernel again. Most of the drivers are implemented as a Linux kernel modules. When those drivers are not needed, we can unload only that specific driver, which will reduce the kernel image size.

The kernel modules will have a .ko extension. On a normal linux system, the kernel modules will reside inside /lib/modules/<kernel_version>/kernel/ directory.
[continue reading…]

Happy 5th Birthday to The Geek Stuff

TGS is 5 years old now.

To celebrate this occasion my daughter Diya thought it is appropriate to throw a birthday party to her special stuffed toy friend.

She has named her friend “Penguine”.

Of all the stuffed toys, Daddy is always proud when the girls play with Penguine.
[continue reading…]

A process is nothing but a running instance of a program. It is also defined as a program in action.

The concept of a process is fundamental concept of a Linux system. Processes can spawn other processes, kill other processes, communicate with other processes and much more.

In this tutorial, we will discuss life cycle of a process and touch base on various aspects that a process goes through in its life cycle.
[continue reading…]

Lists in Python language can be compared to arrays in Java but they are different in many other aspects. Lists are used in almost every program written in Python. In this tutorial we will understand Python lists through practical examples.

We will cover the following in this article :

  • How to define a list
  • How to add elements to a list
  • How access sub lists
  • How to search within lists
  • How to delete elements from a list
  • Operators and lists

[continue reading…]

How to View and Change DELL Server BIOS Settings

From DELL BIOS, you can view and changes several system settings. If you’ve not played around with these BIOS settings, just go to your system BIOS, view these settings to understand what they means.

For most part, you don’t have to change any of these default settings.
[continue reading…]

How to Compile Linux Kernel from Source to Build Custom Kernel

Linux kernel is the life force of all Linux family of operating systems including Ubuntu, CentOS, and Fedora.

For most part, you don’t need to compile the kernel, as it is installed by default when you install the OS. Also, when there is a critical update done to the kernel, you can use yum, or apt-get to update the kernel on your Linux system.
[continue reading…]

How to Write C++ Virtual Functions with Examples

In C++, base class and derived class is a popular example of a concept that mirrors real life hierarchy.

Apart from that there are several small but really useful concepts that are specially designed to keep the code simple and make life easier for a C++ programmer.

One such concept is C++ virtual functions.

In this tutorial, we will understand virtual functions concept in detail through C++ code examples.
[continue reading…]

How to Force Install a Perl Module using CPAN

On an ongoing basis, I’ll be answering some of the questions asked by TGS readers. If you have any questions, use the contact form to get in touch with me.

The following question is from one of the regular readers of TGS.

Question: I’m trying to install a perl module using CPAN, and it displays “make test had returned bad status, won’t install without force”. How do I force install this CPAN module?
[continue reading…]