bash
This code iterates over all files in the `/etc/rc.*` directory and prints each file's name. This demonstrates a basic `for` loop in Bash for processing files matching a pattern.
bash
This code iterates over all files in the `/etc/rc.*` directory and prints each file's name. This demonstrates a basic `for` loop in Bash for processing files matching a pattern.
bash
linux
Disables lingering for a specified user in the system. Note: Lingering allows a user's processes to continue running even after they log out. Disabling lingering stops this behavior.
loginctl
bash
Removes unused Docker resources forcefully.
docker
bash
linux
Retrieve the total memory size from the output of free -h, focusing on the second-to-last line.
free
bash
linux
The code retrieves the number of CPU cores available on the system by filtering the output of the lscpu command with grep
lscpugrep
bash
This script requires a user@host argument and a USER_PASSWORD environment variable. It uses sshpass to securely pass the password to ssh, allowing password-based authentication to the specified host.
sshpassssh
bash
Generates an RSA SSH key pair.
ssh-keygen
bash
ubuntu
This script sets up Docker on a Ubuntu system by updating the package list, installing necessary dependencies, adding Docker's GPG key, configuring the Docker repository, and installing Docker and related plugins. It also enables Docker to start on boot, adds the current user to the Docker group, and checks the installed Docker and Docker Compose versions.
apt-getinstallgpgchmodteesystemctlusermod
bash
linux
List block devices along with their rotational status (rotational or non-rotational). This code helps identify whether a disk is an SSD (non-rotational) or HDD (rotational).
lsblk