≡ Menu

Linux

File locking is a mechanism which allows only one process to access a file at any specific time. By using file locking mechanism, many processes can read/write a single file in a safer way. In this article we’ll explore the different types of Linux file locking and understand their differences using an example program. We [...]

{ 7 comments }

Suppose we want to add some extra functionality in the Linux kernel. So the first idea that strikes the mind is to enhance the kernel by adding more code to it, compiling the code and getting the new kernel up. But this process has the following drawbacks among several others: The added code adds to [...]

{ 13 comments }

Introduction to Linux Threads – Part I

A thread of execution is often regarded as the smallest unit of processing that a scheduler works on. A process can have multiple threads of execution which are executed asynchronously. This asynchronous execution brings in the capability of each thread handling a particular work or service independently. Hence multiple threads running in a process handle [...]

{ 21 comments }

How to Setup VirtualBox Guest Additions and Network

In the previous article Install & Create Virtual Machine, we explained how to install VirtualBox and create a Guest machine in it. This article explains how to setup network for a guest machine and installing Guest Additions in a guest machine. Virtual Networking Once a guest machine is installed, the first step that everyone like [...]

{ 20 comments }

How to Setup Chroot SFTP in Linux (Allow Only SFTP, not SSH)

If you want to setup an account on your system that will be used only to transfer files (and not to ssh to the system), you should setup SFTP Chroot Jail as explained in this article. In a typical sftp scenario (when chroot sftp is not setup), if you use sftp, you can see root’s [...]

{ 83 comments }

In this article, we will start from a small explanation of process IDs and then we will quickly jump on to the practical aspects where-in we will discuss some process related C functions like fork(), execv() and wait() . Linux Processes Series: part 1, part 2, part 3 (this article). Process IDs Process IDs are the [...]

{ 10 comments }

In the 1st part of the Linux processes series of articles, we build up the understanding on Linux processes by discussing about the main() function, and environment related C functions. In this article, we will discuss about the memory layout of a process and the process terminating C functions. Linux Processes Series: part 1, part [...]

{ 8 comments }

How to Write Linux Init Scripts Based on LSB Init Standard

LSB stands for Linux Standard Base. LSB was started by Linux Foundation to reduce the difference between several Linux distributions, and thereby reducing the cost involved in porting between different distributions. Init scripts are one among them to be standardized. In this article, we will see how to write an Init script that conforms to [...]

{ 20 comments }