Btrfs, which stands for "Butter FS" or "B-tree FS," is a modern Linux file system. It was developed to overcome the limitations of older file systems like ext4 or ext3. Btrfs is an excellent choice for efficient storage management on multiple Hard Disk Drivers. It supports Linux file systems with snapshots, subvolumes, and built-in RAID-like capabilities that provide robust data protection. It is designed to handle huge file systems and file sizes. Btrfs incorporates checksumming and COW (Copy-on-write), making it more resilient to data corruption. The COW feature means changes are written to new locations instead of overwriting existing data, enhancing data protection and enabling snapshots. After installation, let us see how to install Btrfs support for Debian Linux 11 or 12 using the CLI.
In my case, the EC2 VM AMI is configured to use ext4 by default at AWS. However, I had to make changes since I needed to store files using EBS (Elastic Block Store) and Python code expected to see BTRFS. Hence, this quick tutorial.
Love this? sudo share_on: Twitter - Facebook - LinkedIn - Whatsapp - Reddit
The post How to install BTRFS on a Debian Linux 12/11 appeared first on nixCraft.
GnuPG2 (or GPG2) is an open-source and free tool that implements the OpenPGP standard. Its primary purpose is to encrypt your sensitive information to protect it from unauthorized access. It also allows you to create digital signatures, guaranteeing that the data hasn't been tampered with while in transit. Many newly created Debian 11/12 cloud VMs and images may not have the gpg/gpg2 command installed. Thus, you will get an error that reads "-bash: gpg: command not found." Here is how to fix this error and install gnupg2 on a Debian Linux 11 or 12. Further, you will learn how to use the gpg command.
Love this? sudo share_on: Twitter - Facebook - LinkedIn - Whatsapp - Reddit
The post How to install GPG (gnupg2) on a Debian Linux to fix gpg command not found error appeared first on nixCraft.
Sometimes, when you try to install specific Debian Linux packages, you might encounter an error message that reads:
Unable to locate package pkg-name-here
In many cases, the required package might already be present in the remote download repos. It would be best to have an additional repository, such as contrib, which adds extra packages to the core Debian Linux system. To enable and use the contrib repository in Debian Linux version 10/11/12 or newer versions, follow the instructions below.
Love this? sudo share_on: Twitter - Facebook - LinkedIn - Whatsapp - Reddit
The post How to enable contrib repo on Debian Linux 10/11/12 appeared first on nixCraft.
The Uncomplicated Firewall (UFW) needs to be configured to allow traffic on UDP ports 67 and 68, regardless of whether the Dynamic Host Configuration Protocol (DHCP) server is local or remote. Additionally, it may be necessary to open both TCP and UDP port 53, which are used for Domain Name Service (DNS). In small business and home environments, typically, both DNS and DHCP services come from a single device. Hence, it would be best if you opened both DHCP and DNS ports using the ufw command.
Love this? sudo share_on: Twitter - Facebook - LinkedIn - Whatsapp - Reddit
The post How to open DHCP port using UFW in Linux appeared first on nixCraft.
I recently had to submit multiple PDF files for government work, but the web form only allowed for the uploading of a single file. This meant that I had to merge the PDF files into one on Linux. To do this, I used a command-line tool called pdfunite, which is a Portable Document Format (PDF) page merger. Let us see how to install and use the pdfunite in Linux.
Love this? sudo share_on: Twitter - Facebook - LinkedIn - Whatsapp - Reddit
The post How to merge all PDF files into one PDF in Linux appeared first on nixCraft.
If you’re using RHEL, CentOS, Rocky, Fedora, or Alma Linux, you may encounter situations where you must list files in a package before installing it. Similarly, there might be instances where you need to locate a specific configuration file after installing the package. In this guide, I’ll provide a quick tip for developers and sysadmins […]
Love this? sudo share_on: Twitter - Facebook - LinkedIn - Whatsapp - Reddit
The post How to list package files with dnf in Linux (RHEL, CentOS, Rocky, Fedora, and Alma Linux) appeared first on nixCraft.
I am migrating an old Perl project from an unsupported OS to Fedora Linux 38. However, I discovered that Perl is not installed by default, while Python 3 is. This seems ridiculous. Anyway, here is how to install Perl in Fedora Linux including latest version of mod_perl with Apache (HTTPD) and get on with your life.
Love this? sudo share_on: Twitter - Facebook - LinkedIn - Whatsapp - Reddit
The post How to install Perl in Fedora Linux appeared first on nixCraft.
When you try to use the xclip command over the ssh-based session to copy and paste data, you will get the following message on screen:
Error: Can't open display: (null)
Here is how to fix this error by editing the ssh client and OpenSSH (SSHD server) configuration file.
Love this? sudo share_on: Twitter - Facebook - LinkedIn - Whatsapp - Reddit
The post How to fix “Error: Can’t open display: (null)” with ssh and xclip command in headless mode appeared first on nixCraft.
Are you a content creator or a blog author who generates unique, high-quality content for a living? Have you noticed that generative AI platforms like OpenAI or CCBot use your content to train their algorithms without your consent? Don't worry! You can block these AI crawlers from accessing your website or blog by using the robots.txt file.
Love this? sudo share_on: Twitter - Facebook - LinkedIn - Whatsapp - Reddit
The post How to block AI Crawler Bots using robots.txt file appeared first on nixCraft.
Wget is a command-line tool to download files from the Internet or local servers. It is not a graphical user interface (GUI) program, and it must be used by typing commands into a terminal application. You can download files from the web. It supports HTTP, HTTPS, FTP, and other protocols. It can mirror entire websites or directories. Wget can resume downloads interrupted due to a network error or a power outage. Wget can start the download again from where it left off. Thus saving you bandwidth and download time. Let us see how to install wget under Fedora Linux.
Love this? sudo share_on: Twitter - Facebook - LinkedIn - Whatsapp - Reddit
The post How to install wget on Fedora Linux using the dnf command appeared first on nixCraft.
Learn how to install Vim, the most popular text editor for server-based environments, on Alpine Linux using the command "apk add vim" command and Docker or LXD (Linux container) image.
Love this? sudo share_on: Twitter - Facebook - LinkedIn - Whatsapp - Reddit
The post How to install vim in Alpine Linux appeared first on nixCraft.
You can use the reboot or shutdown -r now to reboot the Linux system. However, this doesn't scale well if you have many Alpine Linux servers (or clusters based upon Alpine Linux) and need to reboot the server only if a new Linux kernel is installed. Let us see how to use the Ansible IT automation tool to reboot the Alpine Linux VM or server only when a new Linux kernel is installed.
Love this? sudo share_on: Twitter - Facebook - LinkedIn - Whatsapp - Reddit
The post How to reboot Alpine Linux using Ansible when kernel is updated appeared first on nixCraft.
A long time ago, I wrote a script or config file that included BASE64 encoded string like "Le_PreHook='__ACME_BASE64__START_L3Jvb3QvYmluL2xlL2N5YmVyY2l0aS5iaXovcHJlX2JlZm9yZV9vYnRhaW5pbmdfYW55X2NlcnRpZmljYXRlcy5zaA==__ACME_BASE64__END_". So I wanted to know what this string was to update my config script. Here is how to decode BASE64 in Linux or Unix-like systems.
Love this? sudo share_on: Twitter - Facebook - LinkedIn - Whatsapp - Reddit
The post How to decode BASE64 string in Linux and Unix appeared first on nixCraft.
I have a valuable tip for you on extracting the filename and extension in Bash when using Linux, macOS, FreeBSD, or Unix-like systems. It's quick and easy to follow.
Love this? sudo share_on: Twitter - Facebook - LinkedIn - Whatsapp - Reddit
The post How to get and extract filename extension in Bash appeared first on nixCraft.
Are you interested in checking the changelog of a package on Debian or Ubuntu and Linux Mint? You may need to search to see if the particular CVE (Common Vulnerabilities and Exposures) is fixed. Suppose you have installed or upgraded a package in Debian or Ubuntu Linux. In that case, you can easily find out what changes have been made to the package, including new features or bug fixes. Here's how you can view the changelog of a Debian package in Debian or Ubuntu Linux.
Love this? sudo share_on: Twitter - Facebook - LinkedIn - Whatsapp - Reddit
The post Debian/Ubuntu Linux show package changelog command appeared first on nixCraft.
There are a few ways to check your Laptop's battery health in Linux. Here are a few methods that use the upower and acpi commands to check your Laptop's battery health in Linux, such as battery percentage, battery vendor name, current battery state, charge cycles, and more.
Love this? sudo share_on: Twitter - Facebook - LinkedIn - Whatsapp - Reddit
The post How check or see laptop battery health in Linux appeared first on nixCraft.
If you need to execute a shell script or command following the mounting of a particular file system in Linux using systemd, you can do so. For instance, you can run a backup task when a USB hard disk is mounted or adjust specific options at runtime when NFS is mounted.
Love this? sudo share_on: Twitter - Facebook - LinkedIn - Whatsapp - Reddit
The post How to run script after mounting NFS with systemd in Linux appeared first on nixCraft.
Let us see how to check for ssh connectivity in a shell script running under macOS, FreeBSD, or Linux/Unix desktop using BatchMode=yes and ConnectTimeout=$VALUE options. This simple trick helps write a wrapper script that does other things, such as making a backup or running external command agents such as Salt or Ansible to do other tasks.
Love this? sudo share_on: Twitter - Facebook - LinkedIn - Whatsapp - Reddit
The post How to check for ssh connectivity in a shell script appeared first on nixCraft.
Debian Linux project announces the first update of the Debian project's stable distribution, Debian 12 (codename "bookworm") named Debian 12.1. This update mainly addresses security issues and significant problems. Security advisories have been published and are now available to download.
Love this? sudo share_on: Twitter - Facebook - LinkedIn - Whatsapp - Reddit
The post Debian Linux 12.1 released with Security Updates appeared first on nixCraft.
Red Hat launched the Ansible Lightspeed Code Assistant Generative AI with IBM Watson Code Assistant in May 2023. This preview is now available to all Ansible users, allowing them to explore the technology, provide feedback to Red Hat, and further train the AI model. In this brief blog post, I will share my personal experience with installing and utilizing Ansible Lightspeed AI to create playbooks in VSCode using Ubuntu Linux 20.04 LTS desktop.
Love this? sudo share_on: Twitter - Facebook - LinkedIn - Whatsapp - Reddit
The post Setting up VSCode for Ansible Lightspeed AI in Ubuntu 22.04 desktop appeared first on nixCraft.
If you're using Debian 12, you can easily manage your firewall with the help of Uncomplicated Firewall (UFW). UFW interface simplifies firewall management and handles the complexities of packet filtering technologies like iptables and nftables. It's a great option for beginners who want to set up a firewall. In this tutorial, we'll guide you through installing UFW in Debian Linux 12, configuring it to allow SSH, HTTP, HTTPS, and other connections, and enabling it to block unauthorized traffic.
Love this? sudo share_on: Twitter - Facebook - LinkedIn - Whatsapp - Reddit
The post How To Set Up a Firewall with UFW on Debian 12 appeared first on nixCraft.
Sometimes we must kill a process or user account by tty name in Linux. It would be best if you used w command or who command to print users accessing tty and then run the pkill command against processes whose controlling terminal is listed by the -t option.
Love this? sudo share_on: Twitter - Facebook - LinkedIn - Whatsapp - Reddit
The post How to kill process or user by tty name in Linux appeared first on nixCraft.
Do you need to view the open file limit for a Linux process? Try "limits" files in /proc/${PID} directory with its process ID (PID) or ulimit command or prlimit command to see the open file limit for a Linux process.
Love this? sudo share_on: Twitter - Facebook - LinkedIn - Whatsapp - Reddit
The post How to view the open file limit for a Linux process appeared first on nixCraft.
You need to restart the network service in Alpine Linux using "/etc/init.d/networking restart" command to activate the network configuration defined in the /etc/network/interfaces config file. Do not run this command over an ssh-based session.
Love this? sudo share_on: Twitter - Facebook - LinkedIn - Whatsapp - Reddit
The post How to restart network service in Alpine Linux appeared first on nixCraft.
When I try to compile a program on Alpine Linux, it fails with the following error:
app.c:1:10: fatal error: ncurses.h: No such file or directory
1 | #include <ncurses.h>
| ^~~~~~~~~~~
compilation terminated.
Love this? sudo share_on: Twitter - Facebook - LinkedIn - Whatsapp - Reddit
The post Alpine Linux fatal error: ncurses.h: No such file or directory fix appeared first on nixCraft.
Debian Linux 12 "Bookworm" has been released. As of 23/July/2023, Debian 12.1 point was released too. The new version offers updated packages and five years of support. This page provides a step-by-step guide to updating Debian 11 Bullseye to Debian 12 Bookworm using command-line options, including upgrading all installed packages.
Love this? sudo share_on: Twitter - Facebook - LinkedIn - Whatsapp - Reddit
The post How to upgrade Debian 11 to Debian 12 bookworm using CLI appeared first on nixCraft.
The latest version of OpenSUSE Linux, version 15.5 "Leap," has been released. This version offers unparalleled stability due to its use of the SUSE Linux Enterprise (SLE) source and community developments. Hence, this makes it the best choice for a stable Linux experience for users, developers, and system administrators. This page explains how to upgrade from OpenSUSE 15.4 to 15.5 using the CLI.
Love this? sudo share_on: Twitter - Facebook - LinkedIn - Whatsapp - Reddit
The post How to upgrade OpenSUSE 15.4 to 15.5 using the CLI appeared first on nixCraft.
While working on the bash shell script wrapper, I needed to ensure that I only passed an integer in the Bash script under Linux and Unix-like systems. Here is how to check if a number is an integer in Bash Linux or Unix script or at the command-line interface (CLI)
Love this? sudo share_on: Twitter - Facebook - LinkedIn - Whatsapp - Reddit
The post Bash see if an input number is an integer or not appeared first on nixCraft.
The FreeBSD Release Engineering Team is announcing the availability of FreeBSD version 13.2-RELEASE on 11/April/2023. It is the third release of the stable/13 branches. I updated my FreeBSD version 13.1 to 13.2 using the CLI over an ssh-based session. Here are my quick notes.
Love this? sudo share_on: Twitter - Facebook - LinkedIn - Whatsapp - Reddit
The post How to upgrade FreeBSD 13.1 to 13.2 release appeared first on nixCraft.
Do you want to copy a symbolic (soft) link instead of a file using the cp command under Linux? Try passing the -a (--archive) to copy and preserve all soft (symbolic) links. The cp command is a naturally used file copying under Linux and it comes with a few rules for copying symbolic links.
Love this? sudo share_on: Twitter - Facebook - LinkedIn - Whatsapp - Reddit
The post Linux cp command copy symbolic (soft) link tutorial appeared first on nixCraft.
To find or check the NVIDIA driver version on Linux to troubleshoot GPU and graphics card issue, check the /sys/module/nvidia/version and /proc/driver/nvidia/version files. Apart from that, you can try other Linux commands too.
Love this? sudo share_on: Twitter - Facebook - LinkedIn - Whatsapp - Reddit
The post How to find NVIDIA driver version on Linux appeared first on nixCraft.
Debian 11 is an excellent server OS to run the LAMP stack. PHP (Hypertext Preprocessor) is a widely-used open source general-purpose scripting language especially suited for web development. However, Debian 11 comes with PHP version 7.4. Here is how to install PHP 8.2 with Apache server on Debian 11 using the CLI or over ssh based session.
Love this? sudo share_on: Twitter - Facebook - LinkedIn - Whatsapp - Reddit
The post How to install PHP 8.2 with Apache on Debian 11 Linux appeared first on nixCraft.
You can install LXD pure-container hypervisor on Debian 11 Linux to run an unmodified version of Debian, Ubuntu, CentOS, Fedora, Alpine, Arch and many other Linux distro. You can mimic AWS or different cloud instance types with LXD for testing and deployment purposes on your development machine. You can also run a GUI app such as Firefox completely isolated using LXD for security or privacy reasons. Let us see how to set up and use LXD on the Debian Linux 11 server or desktop.
Love this? sudo share_on: Twitter - Facebook - LinkedIn - Whatsapp - Reddit
The post How To Install LXD on Debian 11 Linux appeared first on nixCraft.
Arch Linux uses pacman command to add or remove packages. It is a package management utility that tracks installed packages on Arch. So when you uninstall or remove packages, some dependencies are left behind, taking up disk space. In this quick tutorial, I will explain how to remove ALL orphaned packages installed as a dependency and no longer required by any package on Arch Linux.
Love this? sudo share_on: Twitter - Facebook - LinkedIn - Whatsapp - Reddit
The post How to remove orphaned unused packages in Arch Linux appeared first on nixCraft.
Do you want to refresh and reload the group membership on Linux without rebooting the Linux machine or logging in again? Try the newgrp command to log in to a new group without logging in again or reboot the system.
Love this? sudo share_on: Twitter - Facebook - LinkedIn - Whatsapp - Reddit
The post How to refresh and reload group membership on Linux without a reboot or logging in again appeared first on nixCraft.
Ubuntu 22.04 LTS comes with LXD pure-container hypervisor to run an unmodified version of Debian, Ubuntu, CentOS, Fedora, Alpine, Arch and many other Linux distro. You can mimic AWS or different cloud instance types with LXD for testing and deployment purposes on your development machine. You can also run a GUI app such as Firefox completely isolated using LXD for security or privacy reasons. Let us see how to set up and use LXD on the Ubuntu Linux 22.04 LTS using APT or snap command.
Love this? sudo share_on: Twitter - Facebook - LinkedIn - Whatsapp - Reddit
The post How To Install LXD on Ubuntu 22.04 LTS using apt/snap appeared first on nixCraft.
IP aliasing is nothing but associating more than one IP address to a network interface such as eth0. For example, using the following methods, you can add an IP alias on Amazon Linux 2.
Love this? sudo share_on: Twitter - Facebook - LinkedIn - Whatsapp - Reddit
The post How to add an IP alias on Amazon Linux 2 appeared first on nixCraft.
Let us see how to configure the Let's Encrypt email notification when a TLS/SSL cert is skipped, renewed, or an error is created by "acme.sh" client so developers or sysadmin can investigate the matter further.
Love this? sudo share_on: Twitter - Facebook - LinkedIn - Whatsapp - Reddit
The post How to configure the Let’s Encrypt email notification when a cert is skipped, renewed, or error appeared first on nixCraft.
ChatGPT (short for Chat Generative Pre-trained Transformer) is a chatbot by OpenAI. It provides answers to your queries using learning techniques based on AI/ML. Unfortunately, ChatGPT deny access when connected via VPN (Virtual Private Network) such as WireGuard or OpenVPN, and you will be blocked with the following message:
Let us see how to skip the ChatGPT domain from WireGuard or OpenVPN access while you can access corporate resources behind VPN.
Love this? sudo share_on: Twitter - Facebook - LinkedIn - Whatsapp - Reddit
The post How to skip ChatGPT from WireGuard or OpenVPN on Linux appeared first on nixCraft.