When you execute the Docker pull command or Docker run command, the daemon first checks for a similar image in the local machine by comparing the digests of the image. If it finds a match, then it's not required to search the registry for the image and the daemon can simply create a copy of the already existing image. However, if a copy is not found, it starts pulling it from the registry. The same is the case when you try to build images using a Dockerfile. We all know that Docker images are multi-layered files containing multiple image ... Read More
Processes executing concurrently in an operating system can be classified as independent processes or cooperating processes. An independent process cannot affect or be affected by other processes in the system and does not share data with any other process. A cooperating process can affect or be affected by other processes and shares data with them. Why Process Cooperation is Important Operating systems provide environments that support process cooperation for several key reasons: Information sharing − Multiple users may need concurrent access to the same information, such as shared files or databases. Computation speedup − Tasks can ... Read More
TCP/IP ports are communication endpoints used by applications to connect and exchange data over networks. In Linux systems, sometimes a specific port may be occupied by a running process or application, preventing other services from binding to it. This situation requires freeing up the port by properly identifying and stopping the process using it. This article explains how to identify processes using specific ports and demonstrates various methods to free up TCP/IP ports on Linux systems using common command-line tools. Identifying Processes Using Ports Before freeing a port, you must first identify which process is using it. ... Read More
The watch command in Linux is a powerful tool that allows you to execute a program periodically, showing output in fullscreen. This command runs the specified command repeatedly, displaying its output and errors. By default, the specified command runs every two seconds and watch runs until interrupted. In this article, we will explore the various options and uses of the watch command. Syntax The basic syntax of the watch command is − watch [options] command Common Options Option Description -d, --differences Highlights differences between successive updates ... Read More
When you run an application inside a Docker Container, by default it has access to all the root privileges. You might have noticed that when you open an Ubuntu Docker Container bash, you are logged in as the root user by default. This can prove to be a major security concern for your application. Any unauthorized access can compromise the entire container along with all the files and applications running inside it. Hence, it becomes very important to perform operations as a non-root user wherever possible. In this article, we will discuss two methods to run Docker containers as ... Read More
To synchronize cached writes to persistent storage, we use the sync command in the Linux operating system. This command ensures that data stored in memory buffers is written to disk, preventing data loss during unexpected shutdowns or system crashes. The sync command synchronizes file data between volatile memory (RAM) and persistent storage devices like hard drives or SSDs. When applications write data, it is initially stored in kernel buffers for performance reasons. The sync command forces these buffers to be written to disk immediately. How File System Buffers Work Linux uses a write-back caching strategy where data ... Read More
Beowulf clusters are high-performance computing systems built from commodity hardware − normal, identical computers connected through a local area network (LAN). These clusters use specialized software to distribute processing tasks across multiple nodes, creating a cost-effective parallel processing unit from standard personal computers. The concept originated in 1994 when Thomas Sterling and Donald Becker built the first Beowulf cluster at NASA. The name "Beowulf" was borrowed from the famous Old English epic poem, and has since become synonymous with clusters built from commodity hardware running open-source software. Beowulf Cluster Architecture ... Read More
Are you new to Linux or Ubuntu? Do you want to know which version of Linux distribution is currently installed on your machine? This article explains various methods to identify your Linux distribution version and kernel information using simple command-line tools. Method 1: Using /etc/*-release Files The most comprehensive way to get distribution information is by examining the release files. Use the following command − $ cat /etc/*-release The sample output should be like this − DISTRIB_ID=Ubuntu DISTRIB_RELEASE=16.04 DISTRIB_CODENAME=xenial DISTRIB_DESCRIPTION="Ubuntu 16.04.1 LTS" NAME="Ubuntu" VERSION="16.04.1 LTS (Xenial Xerus)" ID=ubuntu ID_LIKE=debian PRETTY_NAME="Ubuntu 16.04.1 LTS" ... Read More
Here documents and here strings are powerful Bash features that allow users to pass multi-line input to commands without using external files. These redirection mechanisms are essential for shell scripting, enabling clean and readable code for tasks involving multi-line text processing, configuration generation, and command automation. What is a Here Document? A here document (heredoc) is a type of input redirection that allows you to specify multiple lines of input for a command using the
Ubuntu is one of the most popular and widely used Linux distributions. It is known for its simplicity, reliability, and performance. However, like any other operating system, Ubuntu is not immune to overheating issues. Overheating can lead to a number of problems, such as decreased performance, system crashes, and even hardware damage. Therefore, it is important to monitor the temperature of your CPU and GPU regularly to prevent such issues from occurring. lm-sensors lm-sensors is a command-line tool that allows you to monitor temperature, voltage, and fan speed of your CPU, GPU, and other system components. It is ... Read More
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Economics & Finance