How to install Docker on Amazon Linux 2

To install Docker on an Amazon Linux 2 EC2 instance, you can use the following steps: Connect to your EC2 instance via SSH. Update the package index by running the following command: sudo yum update -y Add the Docker repository to your system by running the following command: sudo amazon-linux-extras install docker Install Docker by … Read more

CentOS / RHEL: dnf Command Reinstall Package

You can reinstall a package on a system running CentOS or RHEL using the dnf command. The dnf command is a package manager for RPM-based Linux distributions, such as CentOS and RHEL. Here’s an example of how to reinstall a package using the dnf command: sudo dnf reinstall package_name This command will reinstall the package … Read more

How to search multiple directories with find command

The “find” command is a powerful command-line utility that can be used to search for files and directories in one or more directories. Here’s an example of how to search for files with the “.txt” extension in the directories “/home/user/dir1” and “/home/user/dir2”: find /home/user/dir1 /home/user/dir2 -name “*.txt” This command uses the “find” command with the … Read more

How to install sshpass on macOS / OS X

sshpass is a command-line utility that allows you to provide a password for an SSH login on the command-line, rather than being prompted for it interactively. Here’s an example of how to install sshpass on macOS/OS X: Install Homebrew: The easiest way to install sshpass on macOS/OS X is by using the package manager Homebrew. … Read more

How to stop cat command in Linux

You can stop the cat command in Linux by sending an interrupt signal (CTRL + C) to the terminal where the command is running. When you press CTRL + C it sends an interrupt signal to the process running in the terminal. This signal causes the process to terminate immediately. Alternatively, you can also stop … Read more