Fading Coder

One Final Commit for the Last Sprint

Practical Sed Strategies for Line Manipulation

Removing Lines Adjacent to Patterns To remove the line immediately preceding and following a specific pattern, combine address ranges with flow control commands. sed -i -e '/ERROR/{n;d}' -e '$!N;/\n.*ERROR/!P;D' system.log Deleting the Preceding Line When only the line before a match is required to...

A Practical Guide to Installing Ubuntu 20.04 and Essential Development Software

System Installation for Ubuntu 20.04 Obtain the Ubuntu 20.04 LTS installation image from the official website. To create bootable media, use tools like dd on Linux or Rufus on Windows. Ensure your system's BIOS/UEFI is configured to boot from the USB drive. Partitioning Strategy When installing, you...

Deploying SmokePing for Network Latency Monitoring

Architecture Overview SmokePing is a latency monitoring tool that visualizes network performance through RRD (Round-Robin Database) graphs. Developed in Perl by Tobi Oetiker, it relies on RRDtool for data storage and graph generation, utilizing probing utilities like fping for ICMP-based measurement...

Understanding the container_of Macro in Linux Kernel Development

The container_of macro, defined in kernel.h, serves a crucial role in Linux kernel programming by enabling retrieval of a structure's address from its member's address: /** * container_of - Get the container structure from a member pointer * @ptr: Pointer to the structure member * @type: Type of the...

Setting Up a Cross-Compiled Qt Development Environment on Linux for ARM64

Prepare Toolchains and Sources Obtain a AArch64 cross-compilation toolchain from Linaro: https://releases.linaro.org/components/toolchain/binaries/7.2-2017.11/aarch64-linux-gnu/ Select gcc-linaro-7.2.1-2017.11-x86_64_aarch64-linux-gnu.tar.xz. Fetch the full Qt source archive: http://download.qt.io/a...

Implementing LVS Cluster with NAT Mode Using LVS, Apache, and NFS

Implementing LVS Cluster with NAT Mode Using LVS, Apache, and NFS
Introduction LVS (Linux Virtual Server) is a high-performance, highly available server clustering system that achieves load balancing for network services through IP load-balancing technology. NAT mode is one of the most commonly used working modes in LVS. In NAT mode, an LVS cluster consists of th...

Shell Command Patterns for System Administration

Automated Service Startup with Password Authentication The following expect script handles services requiring sudo access: #!/usr/bin/expect set timeout 5 spawn mysql.server start echo "MySQL service started successfully" spawn sh /opt/app/tomcat/bin/shutdown.sh spawn sh /opt/app/tomcat/bi...

Configuring External SSH Access to WSL on Windows

Installing OpenSSH in WSL Begin by reinstalling OpenSSH server in your WSL instance: sudo apt-get remove openssh-server sudo apt-get install openssh-server Modify the SSH server configuration: sudo vi /etc/ssh/sshd_config Update these crtiical parameters: Port 22 PermitRootLogin Yes PasswordAuthenti...

Troubleshooting DNS Resolution Issues on Linux Servers

When encountering ping: www.example.com: Name or service not known errors, follow these diagnostic steps: Verify Network Interface Status Check active interfaces and their configurations: ip addr show Example output showing a properly configured interface: 2: eth0: <BROADCAST,MULTICAST,UP> mtu...

Deploying ClamAV for Malware Detection on Linux Systems

Clam AntiVirus is an open-source (GPL licensed) antivirus solution designed for Unix-like systems, particularly effective for email scanning at mail gateways. The toolkit encompasses various utilities including a scalable daemon, command-line scanner, and tools for automated database updates. Its co...