Fading Coder

One Final Commit for the Last Sprint

CPU Context Switching and Linux Scheduler Queues

Registers and Process Context Consider a basic C function: int calculate_total(int a, int b) { int result = 0; result = a + b; return result; } int main() { int value = calculate_total(5, 7); return 0; } Local variables on the stack disappear after the function returns. The fact that callers can sti...

Essential Linux System Commands and Operations

CPU Information Checking CPU Architecture # Determine if the system is 32-bit or 64-bit getconf LONG_BIT Verifying 64-bit Support cat /proc/cpuinfo | grep flags | grep ' lm ' | wc -l Displaying CPU Details lscpu Example Output - 4 cores, 4 threads: Architecture: x86_64 CPU(s): 4 Thread(s) per core:...

Venus CTF Walkthrough: Missions 1-50 from HackMyVM

Venus CTF Walkthrough: Missions 1-50 from HackMyVM
Introduction The Venus VM is suitable for beginners starting CTF and wanting to practice Linux skills. Target URL: https://hackmyvm.eu/venus/ There are 50 missions, submitting these 50 flags counts as completion. (Currently, the top-ranked player has submitted 58 flags.) Login: ssh hacker@venus.hack...

Linux Firewall Administration: firewalld, iptables, and Network Routing

Daemon Control and State Monitoring Manage the background daemon using standard systemd utilities. systemctl enable --now firewalld # Start service and activate on boot systemctl status firewalld # Display runtime state systemctl stop firewalld # Terminate active sessions systemctl restart firewalld...

Understanding File I/O Operations in Linux Systems

In Linux systems, everything is treated as a file. Files consist of content and metadata, and can exist in either opened or unopened states. Unopened files reside on disk storage and are organized for efficient retrieval. When a file is opened, it's loaded into memory by a process. The operating sys...

Automating Recurring Tasks with Cron on Linux

Understanding the Cron Service The crond daemon manages scheduled command execution on Linux systems. It scans three locations every minute to determine which jobs should run: /etc/crontab: The primary system-wide crontab, typically used by administrators for maintenance routines. /etc/cron.d/: A di...

Implementing Circular Queues and Shared Memory Queues in C++ on Linux

A circular queue data structure can be implemented in C++ using an array as the underlying storage. This approach is efficient for handling a fixed number of elements. #ifndef QUEUE_TEMPLATE_HPP #define QUEUE_TEMPLATE_HPP 1 #include <iostream> #include <cstring> using std::cout; template...

CentOS Directory and File Operations: A Practical Reference

Directory Tree Structure The Linux file system follows the Filesystem Hierarchy Standard (FHS). Below are the main directories and their purposes: /bin – Essential user command binaries (e.g., ls, cat, mkdir). /etc – Host-specific configuration files and system‑wide settings. /home – Personal direct...

Linux Signal Handling: Timing, Privilege Levels, and Runtime Behavior

Signals act as asynchronous notifications informing processes of specific events. Before an operating system executes a signal handler, it must verify that the timing is appropriate for safe execution. Generally, signal actions are triggered only when transitioning from kernel space back to user spa...

Essential Linux Shell Commands Cheat Sheet

Hardware and Kernel Insigths uname -m # Display the system's CPU architecture uname -r # Output the active kernel release string dmidecode -q # Extract SMBIOS/DMI hardware component data hdparm -I /dev/sda # Retrieve detailed characteristics of a storage device hdparm -tT /dev/sda # Execute read-spe...