Linux Bash

Providing immersive and explanatory content in a simple way anybody can understand.

  • Posted on
    Featured Image
    In the world of software development, YAML has become a universally accepted format for configuration files, due to its human-readable structure. However, manipulating YAML data directly from the command line or within shell scripts can be complex and error-prone. This is where yq comes into play. Inspired by the functionality of jq (a command-line JSON processor), yq is a powerful tool that allows you to read, write, and modify YAML files with ease. In this blog post, we'll explore the capabilities of yq, provide detailed installation instructions for various Linux distributions, and demonstrate some basic usage. yq is a lightweight and portable command-line YAML processor.
  • Posted on
    Featured Image
    Exploring Interactive Installation with Aptitude: A Deep Dive for Linux Users One of the key aspects of managing a Linux system is handling software packages efficiently. While the standard tools like apt-get for Debian-based systems, dnf for Fedora, or zypper for openSUSE provide robust functionality, sometimes, users seek a more interactive or nuanced approach, particularly when dealing with complex package dependencies or resolving conflicts. That's where aptitude comes into play. Aptitude is a text-based interface using the ncurses library, offering a user-friendly, interactive environment to manage packages on Debian and other Debian-based systems like Ubuntu.
  • Posted on
    Featured Image
    In the realm of command-line tools for processing JSON data, jq stands out as a powerful and flexible solution. Whether you're a developer, a system administrator, or just a tech enthusiast, having jq in your toolkit can dramatically simplify handling JSON-formatted data from APIs, configuration files, or any other source. This blog post provides a comprehensive guide to jq, including installation instructions across various Linux distributions, basic usage examples, and tips to get you started. jq is a lightweight and command-line JSON processor that allows you to slice, filter, map, and transform structured data with the same ease that sed, awk, grep and friends let you play with text.
  • Posted on
    Featured Image
    Navigating the world of package management in Linux can be a daunting task for new and even experienced users alike. Among the variety of tools available, apt and apt-get are two of the most widely used on Debian-based distributions. Their names alone suggest similarity and, indeed, they perform similar functions but with a few nuanced differences. Additionally, other Linux distributions utilize different package managers, such as dnf for Fedora and zypper for openSUSE. In this blog, we’ll uncover the differences between apt install and apt-get install and toss in a primer on using dnf and zypper. Both apt install and apt-get install command lines are used for installing software packages on Debian-based systems (like Ubuntu).
  • Posted on
    Featured Image
    In the realm of web development and API testing, HTTPie stands out as a user-friendly HTTP client, favored for its simplicity and effectiveness over traditional command-line tools like curl and wget. HTTPie is designed to make CLI interaction with web services as human-friendly as possible, offering a straightforward and intuitive syntax. This article will guide you through the installation of HTTPie on various Linux distributions using different package managers and demonstrate basic usage to get you started. HTTPie (pronounced aitch-tee-tee-pie) is a command line HTTP client. It provides a simple http command that allows for sending arbitrary HTTP requests using a simple and natural syntax, and displays colorized responses.
  • Posted on
    Featured Image
    When working with Linux operating systems, software package management is a vital skill for system administrators and enthusiasts alike. One common scenario that users encounter is dealing with "held" packages. In this article, we'll explore what holding packages means, its implications, and how to manage held packages in different package management systems including APT (used in Debian and its derivatives like Ubuntu), DNF (used in Fedora), and Zypper (used in openSUSE). In the context of software management, "holding" a package prevents the package from being automatically installed, upgraded, or removed by the package management system.
  • Posted on
    Featured Image
    When it comes to working with files in a Linux environment, ls has been the go-to command for listing directory contents for decades. It serves its purpose well, but for advanced users and those who crave more detailed and visually appealing output, there's a better tool available. Enter exa, a modern, improved replacement for ls that comes with more features and better defaults. Exa is a command-line tool designed to be a modern replacement for the venerable ls command. It integrates seamlessly with modern workflows, offering features like git integration, tree views, and more informative, color-coded displays. The tool is written in Rust, ensuring it's both fast and reliable.
  • Posted on
    Featured Image
    Linux distributions are supported by their package management systems, crucial tools for managing software applications. While different Linux distributions use different package managers, the core functionalities generally include the installation, upgrade, and removal of software packages and the management of repositories. In this article, we will focus chiefly on managing repositories in openSUSE using Zypper. Additionally, we will also provide guidance for Ubuntu (APT) and Fedora (DNF) for a rounded perspective. A Linux repository is a storage location from where your system retrieves and installs updates and applications. These repositories ensure you get the latest features, security patches, and bug fixes.
  • Posted on
    Featured Image
    Switching between directories is a common task for many Linux users, whether they're system administrators, developers, or just enthusiasts exploring the capabilities of their systems. While the traditional cd command does the job, it can often be cumbersome when you're managing complex directories or bouncing frequently between multiple locations. That’s where zoxide, a smarter and faster way to navigate Linux file systems, comes in. Zoxide is a modern replacement for cd that works across all major shells, including bash, zsh, and fish. It's built in Rust, combining safety and speed. Instead of having to remember and type full directory paths, zoxide learns your habits and indexes directories based on frequency and recency.
  • Posted on
    Featured Image
    Creating a local repository on your Linux system can significantly improve installation time for software packages, reduce bandwidth usage, and provide a reliable backup of software. This is particularly useful in environments where multiple machines need to access the same repository, or a robust setup is required to manage software systematically. Let's dive into how to set up a local repository specifically for Fedora's DNF (or the older YUM), and also touch on settings for APT (used in Debian-based systems) and Zypper (used in openSUSE). First, you'll need an HTTP server to serve the repository files. Here, we'll use Apache HTTP Server as it's widely supported and easy to configure.
  • Posted on
    Featured Image
    If you frequently find yourself working in the Linux terminal, you're probably familiar with cat, a widely-used command for file concatenation and display. However, if you're a programmer or someone who deals with configuration files and logs, you might want something more visually informative, especially when it comes to syntax. Enter bat - a command line tool that serves as a drop-in replacement for cat but with the supercharged features of syntax highlighting, Git integration, and automatic paging. bat is much like cat, but with syntax highlighting and a lot more features. It supports a wide range of programming and markup languages and integrates with Git to show modifications in the file.
  • Posted on
    Featured Image
    In Linux, managing packages efficiently is crucial for system administration and development. Among the various package managers, APT (Advanced Package Tool) is one of the most widely used, particularly in Debian-based systems such as Ubuntu. However, apart from APT, Linux distributions may utilize other package managers like DNF for Fedora and Zypper for openSUSE. In this guide, we'll focus on creating a local repository which can be extremely useful for hosting your own packages, ensuring faster installations, and reducing bandwidth usage. Creating a local repository can be beneficial for multiple reasons: 1. Speed: Access packages faster and install them without internet dependency. 2.
  • Posted on
    Featured Image
    In the wide array of tools available for search operations within Linux, one particularly stands out for its speed and efficiency—ripgrep, often referred to as rg. This command-line utility is built specifically to replace the traditional tools like grep, ack, and ag with a focus on speed and practicality. rg leverages Rust's regular expression library, which is famous for its performance, to conduct searches. ripgrep distinguishes itself with several inbuilt functionalities that make it the first choice for developers and system administrators: Speed: ripgrep is incredibly fast. It is optimised to perform searches quickly by automatically skipping certain directories like .git.
  • Posted on
    Featured Image
    Linux, renowned for its stability and efficiency, is the backbone of many IT infrastructures and personal computing environments. However, like any operating system, it is not immune to problems, particularly concerning filesystems. Filesystem errors can disrupt system operations and lead to data loss. Understanding the nature of these errors and knowing how to address them is critical. In this article, we’ll explore common Linux filesystem errors and outline effective recovery strategies. Filesystem errors on Linux can arise due to a variety of reasons, such as sudden power failures, hardware malfunctions, unsafe system shutdowns, or corrupted blocks.
  • Posted on
    Featured Image
    Package managers in Linux are a crucial component, helping users to install, update, and manage software packages efficiently. However, these tools also tend to accumulate a lot of cached data, which, over time, can consume significant disk space. Cleaning up these cached files is a simple yet effective way to reclaim space and keep your system tidy. In this blog, we’ll guide you through clearing cache in several major package managers: apt (used in Debian and Ubuntu), dnf (used in Fedora), and zypper (used in openSUSE). Each time you install or update software, the package manager downloads package files (.deb, .rpm) to your system. After installation, these files often remain in the cache.
  • Posted on
    Featured Image
    In the sprawling filesystems of modern computers, locating files, directories, and even snippets of text within files can sometimes feel like searching for a needle in a digital haystack. Luckily for Linux users, a tool named fzf comes to the rescue. This powerful command-line utility offers a fast and friendly means to perform fuzzy searches and transform the way you find things on your computer. Here’s a deep dive into what fzf is, why you might want to use it, and how you can get it running on your Linux distribution. fzf is a general-purpose command-line fuzzy finder. It's written in Go and integrates seamlessly with Bash, Zsh, and Vim, among other environments.
  • Posted on
    Featured Image
    Migrating your filesystems between different drives or servers can seem daunting, especially when you're managing critical data and server uptime. Fortunately, with Linux's powerful command-line tools, this process can be streamlined and secured, ensuring minimal downtime and maximum reliability. Here’s your comprehensive guide to migrating filesystems using some of the best practices in Bash. Before diving into the technicalities, let’s understand why one might need to migrate filesystems: Hardware Upgrades: Replacing old disks with newer, faster, or larger ones. Performance Optimization: Distributing load across multiple devices. Data Redundancy: Enhancing data backup strategies and disaster recovery.
  • Posted on
    Featured Image
    When managing the software on a Linux system, it's crucial to keep your system clean and efficient. Over time, as you install and uninstall various packages, you may end up with orphaned packages. Orphaned packages are those that were installed as dependencies for other programs but aren't needed anymore because the original program that required them has been removed. This not only clutters your system but can also consume valuable disk space. In this guide, we'll cover how to identify and remove orphaned packages using three popular package managers: apt (used by Debian and Ubuntu), dnf (used by Fedora), and zypper (used by openSUSE).
  • Posted on
    Featured Image
    In the world of software development, or any field that demands a bit of organization, taking notes is an essential part of daily life. While there are numerous note-taking applications out there, few cater to the specific needs of those who prefer staying within the command-line environment. This is where Dnote shines, a simplistic yet powerful tool designed for developers and terminal enthusiasts. Below, you'll learn more about Dnote and how to get it up and running on different Linux distributions. Dnote is a streamlined, command-line note-taking application that helps you capture and organize your ideas without leaving the terminal.
  • Posted on
    Featured Image
    As we continue to venture into the 2020s, it's clear that the landscape of software development is rapidly evolving. Among the myriad technologies that have come to the forefront, DevOps—a blend of development and operations—has become essential in driving the efficiency and speed of software delivery. What's particularly interesting for Linux enthusiasts and system administrators is the specific role that the Bash shell plays in this shifting terrain. In this blog post, we’ll explore how Bash is continuing to adapt and influence the field of DevOps, and the trends and innovations you should keep an eye on.
  • Posted on
    Featured Image
    For anyone involved in system administration or managing Linux-based IT environments, understanding the performance of your filesystem is crucial. The filesystem is a core component of the operating system that determines how data is stored and retrieved. By measuring its performance, you can make informed decisions to optimise your systems effectively. Fortunately, Linux offers a variety of tools for benchmarking filesystem performance. In this article, we’ll dive into why it's important to measure filesystem performance and explore some of the most popular benchmarking tools available. The primary purpose of benchmarking the filesystem is to quantify how fast the system reads from and writes to disk in various scenarios.
  • Posted on
    Featured Image
    Linux-based systems, known for their stability and flexibility, can accumulate unused packages and dependencies over time. This "digital clutter" can waste valuable disk space and potentially impact performance. Whether you're using Ubuntu, Fedora, or openSUSE, managing these unused components is essential for maintaining a smooth-running system. In this article, we'll navigate through the clean-up processes using three popular package managers: apt, dnf, and zypper. Before diving into the cleanup process, let's briefly understand the tools at our disposal: APT (Advanced Package Tool) - Used primarily by Debian-based distributions like Ubuntu.
  • Posted on
    Featured Image
    For those who delight in adding a bit of whimsy and color to their computing experience, there’s nothing quite like the Nyancat flying through the starry expanse right in your Linux terminal. Whether you’re a long-term Linux enthusiast or new to the platform, the Nyancat CLI application is a fun way to customise your terminal’s appearance and show off a bit of personality in a world of text and commands. Nyancat, also known as Pop-Tart Cat, is an internet meme that became widely popular due to its delightful animation of a cat flying through space, leaving a rainbow trail behind it, combined with a catchy Japanese pop song.
  • Posted on
    Featured Image
    In the era of cloud computing, maximizing resources while minimizing costs has become a pivotal aspect of business strategy. Efficient cloud cost management not only ensures financial health but also enhances the ability to innovate and scale. The FinOps framework, which integrates financial accountability into the variable spend model of cloud, has emerged as a vital methodology to handle this. Coupled with the flexibility and power of Linux Bash scripting, organizations can leverage these tools to optimise cloud usage and spending significantly. Here’s how to navigate cloud cost optimization using Linux Bash scripts aligned with key FinOps principles.
  • Posted on
    Featured Image
    The rapidly expanding data needs of today’s digital ecosystems demand storage solutions that are not only robust but also efficient. On Linux systems, several filesystems offer built-in data compression to help manage space while also potentially boosting performance. The most popular among these are ZFS and Btrfs, but there are other options worth considering too. Let’s dive into the world of filesystem compression on Linux, exploring ZFS, Btrfs, and other solutions to help you make informed decisions. Filesystem compression is a technique that reduces the size of the stored data on disk without losing any information.