Open Source Articles

Page 57 of 123

How to list containers in Docker?

Raunak Jain
Raunak Jain
Updated on 17-Mar-2026 14K+ Views

Managing multiple Docker containers in a single host machine through a single command line can become tough. Hence, it’s better to know the Docker commands to manage containers the best possible way. Docker provides us with many command line tools and utilities to manage containers. In this article, we will discuss how to list Docker containers through multiple ways. We will also look at how to filter the list output to get the desired results. Listing Docker Containers Predominantly, there are two major commands that you can use to display a list of all containers βˆ’ ...

Read More

How to list images in Docker?

Raunak Jain
Raunak Jain
Updated on 17-Mar-2026 7K+ Views

Docker provides comprehensive commands to manage Docker objects including images, containers, volumes, and networks. When working with Docker extensively, you may accumulate numerous images on your system. Listing and managing these images efficiently becomes crucial for system organization and resource management. This article explores various methods to list Docker images using different commands and options to filter, format, and display image information according to your specific requirements. Basic Docker Image Listing Commands Docker provides two primary commands for listing images, both yielding identical results: docker image ls [OPTIONS] [REPOSITORY[:TAG]] docker images [OPTIONS] ...

Read More

How to remove old Docker containers?

Raunak Jain
Raunak Jain
Updated on 17-Mar-2026 769 Views

Docker allows you to remove old and stale containers that are no longer needed. You can use the docker rm or docker container rm commands to accomplish this. However, before removing containers, ensure that none are actively running, as Docker will throw an error for running containers. There is a workaround for this βˆ’ you can remove Docker containers forcefully using the --force option. The Docker remove commands allow you to remove one or more containers together by specifying their container IDs or names. If you want to delete all Docker containers simultaneously, you can achieve this using sub-commands. ...

Read More

Vagrant vs Docker for creating an isolated environment

Raunak Jain
Raunak Jain
Updated on 17-Mar-2026 444 Views

Vagrant is a software tool that allows you to create and manage virtual machines that replicate specific environments exactly as needed. Vagrant enables you to test applications in controlled environments by mirroring the operating system and all appropriate configurations through complete virtualization. Docker is a containerization platform that lets you package applications into lightweight containers, creating isolated microenvironments for deployment without running a full virtual machine. Each container provides a separate, isolated environment containing only the necessary application components. Both tools help developers, testers, and DevOps engineers reduce debugging time by ensuring consistent environments across development, testing, and ...

Read More

What is the difference between CMD and ENTRYPOINT in a Dockerfile?

Raunak Jain
Raunak Jain
Updated on 17-Mar-2026 3K+ Views

Docker containers are built using Dockerfiles which contain step-by-step instructions to define the container environment. Among the various Dockerfile instructions, CMD and ENTRYPOINT are two critical commands that define what processes run inside containers. While they appear similar, they have distinct behaviors and use cases. Before exploring their differences, it's important to understand the two forms of writing instructions in Dockerfiles: Shell Form vs Executable Form Shell Form In shell form, the command is processed by a shell (/bin/sh -c). This allows shell features like variable expansion and command substitution. INSTRUCTION command param1 param2 ...

Read More

What is the difference between the 'COPY' and 'ADD' commands in a Dockerfile?

Raunak Jain
Raunak Jain
Updated on 17-Mar-2026 669 Views

When you create a Dockerfile, you can use two different commands to build your context. Building a context means including the files and directories that you want from your local machine, to be in your container when it's created. These files may be directories in your local machine, a URL from which you want to download files, or a compressed tarball file that you want to include as it is or after extracting the tarball file. We can use two different instructions to add the files from the build context in the local machine to the Docker container. These ...

Read More

Resetting a Root Password in Linux without External Media

Prateek Jangid
Prateek Jangid
Updated on 17-Mar-2026 607 Views

Resetting a root password in Linux is a critical system recovery technique that allows administrators to regain access to their system without external media. This method works by temporarily modifying the boot process to gain direct root shell access. We'll demonstrate this using CentOS 8.2, but these procedures work with most Linux distributions, though some Debian-based systems may require slight modifications. Prerequisites Physical access to the Linux server (cannot be performed remotely over a network) Basic familiarity with the Linux command line environment Ability to work quickly during the boot process Step-by-Step Password Recovery Process ...

Read More

Array Operations in Linux bash

Mukul Latiyan
Mukul Latiyan
Updated on 17-Mar-2026 939 Views

Bash scripts are one of the most convenient approaches for automating command line processes. They help us perform multiple operations in a simpler and more understandable manner, allowing us to accomplish tasks similar to other programming languages. Arrays in bash provide a powerful way to store and manipulate collections of data elements. The syntax of bash can be tricky at first, but this tutorial will explain the essential array operations step by step. We'll explore how to create, access, and manipulate arrays using practical examples that you can run directly in your terminal. How to Create and Execute ...

Read More

How to Run a Command Multiple Times in Linux?

Mukul Latiyan
Mukul Latiyan
Updated on 17-Mar-2026 9K+ Views

There are scenarios where you would want to run a particular command for N number of times. In normal programming, this can be done with the help of loop constructs available in that programming language. In Linux bash, we have loops and other methods to repeat commands N number of times efficiently. In this tutorial, we will explore different bash techniques that allow us to run a certain command multiple times using loops, functions, and command-line utilities. Creating and Running Bash Scripts Before exploring the methods, let's understand how to create and execute bash scripts. On Linux ...

Read More

How to Repeat Your Last Command in Linux?

Mukul Latiyan
Mukul Latiyan
Updated on 17-Mar-2026 7K+ Views

Linux terminal allows us to execute a variety of commands, and often we need to repeat a previously executed command. There are several efficient methods to recall and re-execute the last command without retyping it completely. For demonstration purposes, let's assume we previously ran the command ls -ltr and now want to repeat it using various methods available in Linux. Using Arrow Keys The most basic approach is to press the UP arrow key on your keyboard. This retrieves the last command from your command history, allowing you to press Enter to execute it again or modify ...

Read More
Showing 561–570 of 1,225 articles
« Prev 1 55 56 57 58 59 123 Next »
Advertisements