Tag: Linux

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

Linux – Remote Debugging With GDB

Embedded Linux development is a complex task. You need tools on the target and the host and its important to setup everything so we can build and debug easily. Let go over the process. You can do it yourself , just build an Embedded Linux system with QEMU Building For The Target To build code […]

Read more

Embedded Linux – Working with QT

Qt is a great framework for building cross-platform applications. It provides a set of classes to wrap almost any OS service and you can write your application once and compile and deploy it many. Qt is also a great choice for embedded Linux system. If you need GUI, Qt is the fastest way. Write your code […]

Read more

Building Embedded Linux System with Qemu

In my Embedded Linux courses, I’m using Qemu to simulate a Linux system. Qemu simulates many boards including hardware, interrupts, networking and more. In this tutorial, I’ll cover the steps to build a complete system including kernel, filesystem, and application Qemu – Building from source You can install binary version but it is better to […]

Read more

10 Things You Can Only Do With GDB

Debugging is a complex task. Most of the work time, developers spend on debugging and it is important to be familiar with many debugging tools In Linux, the native debugger is GDB and it is command line based and looks ugly and primitive. Many developers , especially those who moved from windows and worked with tools like […]

Read more

Linux – fork system call and its pitfalls

To create a child process in Linux/Unix , you can use clone(2) or fork(2). We use clone(2) is to implement multithreading and namespaces. We use fork(2) to create a “real” (child) process, i.e. separate address space and resources In this post i will cover fork, its patterns and its pitfalls Lets start with a simple […]

Read more