Tag: Linux

Introduction To Network Filters – Linux

One of the great advantages of Linux is its networking features. Many networking products such as routers, switches  are based on Embedded Linux operating system. Linux is open source so you can see and change the code (under the licensing limitations) and fit it to your needs. Network filtering is a great infrastructure in Linux […]

Read more

Linux Kernel Development – Creating a Proc file and Interfacing With User Space

On The first post we built a Simple Kernel Module with init and exit functions and covered the basic concepts in kernel programming Next, We added a Kernel Module Parameters to configure the kernel module data In this post, We will create the first interface to user space application using procfs (/proc) file Proc File […]

Read more

Linux Kernel Development – Kernel Module Parameters

In the previous post , I covered the basics of kernel development with a simple example of loadable kernel module that has only init and exit functions. In this post we will add a parameters to the module. Using the parameters, you can access the module global variables while loading the module and on runtime […]

Read more

Linux Kernel Development and Writing a Simple Kernel Module

This post is the first post in linux kernel series. Writing code to run in the kernel is different from user application. While developing in the kernel, you don’t write code from scratch, you need to implement one or more interfaces and register your implementation within the a kernel subsystem. Kernel Interfaces The kernel is […]

Read more

Makefiles Tutorial

GNU Make is key utility in building applications.It is available on any operating systems. Its main purpose is to determine automatically which pieces of a program need to be recompiled, and issue the commands to build them While working with open source project, Make is the common tool because almost any IDE can work with […]

Read more

Useful Tools That You Can Find On Any Linux Distribution

Linux users, even beginners are familiar with the simple file utilities like ls, rm, cp etc. If you look at /bin directory in any linux distribution , you will find many tools that can help on a daily use. In this post, I will cover some interesting tools.   The purpose of this post is […]

Read more

Understanding Awk – Practical Guide

After covering sed in details , its also good to know awk (gawk) – a programmable stream editor Awk helps with manipulating of structured data and generating reports. awk is actually a programming language with syntax similar to C. awk Uses three ‘blocks’ of instructions: BEGIN, main loop and END and it uses similar principle of line […]

Read more

Linux – IO Multiplexing – Select vs Poll vs Epoll

One basic concept of Linux (actually Unix) is the rule that everything in Unix/Linux is a file. Each process has a table of file descriptors that point to files, sockets, devices and other operating system objects. Typical system that works with many IO sources has an initializaion phase and then enter some kind of standby […]

Read more

Linux – Writing a Simple Container App with Namespaces

One of the building blocks to implement containers is Linux namespaces. Namespaces control what a process can see. It can be the processes IDs, mount points, network adapters and more. To use namespaces we call the clone(2) system call. Creating a child process – fork vs clone To create a new process in Linux, we can […]

Read more

Understanding sed – Practical Guide

Sed is a powerful stream editor, typically used for editing large amounts of data by providing a simple command. Sed is also used for sophisticated searches, where the Regular Expressions are used. You can use sed to: Automate editing actions to be performed on one or more files Simplify the task of performing the same edit […]

Read more