<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:foaf="http://xmlns.com/foaf/0.1/" xmlns:og="http://ogp.me/ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xmlns:schema="http://schema.org/" xmlns:sioc="http://rdfs.org/sioc/ns#" xmlns:sioct="http://rdfs.org/sioc/types#" xmlns:skos="http://www.w3.org/2004/02/skos/core#" xmlns:xsd="http://www.w3.org/2001/XMLSchema#" version="2.0" xml:base="https://www.linuxjournal.com/">
  <channel>
    <title>#HOW-TOs</title>
    <link>https://www.linuxjournal.com/</link>
    <description/>
    <language>en</language>
    
    <item>
  <title>Linux Boot Process? Best Geeks Know It!</title>
  <link>https://www.linuxjournal.com/content/linux-boot-process-best-geeks-know-it</link>
  <description>  &lt;div data-history-node-id="1341324" class="layout layout--onecol"&gt;
    &lt;div class="layout__region layout__region--content"&gt;
      
            &lt;div class="field field--name-field-node-image field--type-image field--label-hidden field--item"&gt;  &lt;img loading="lazy" src="https://www.linuxjournal.com/sites/default/files/nodeimage/story/linux-boot-process-best-geeks-know-it.jpg" width="850" height="500" alt="Linux Boot Process? Best Geeks Know It!" typeof="foaf:Image" class="img-responsive" /&gt;&lt;/div&gt;
      
            &lt;div class="field field--name-node-author field--type-ds field--label-hidden field--item"&gt;by &lt;a title="View user profile." href="https://www.linuxjournal.com/users/nawaz-abbasi" lang="" about="https://www.linuxjournal.com/users/nawaz-abbasi" typeof="schema:Person" property="schema:name" datatype="" xml:lang=""&gt;Nawaz Abbasi&lt;/a&gt;&lt;/div&gt;
      
            &lt;div class="field field--name-body field--type-text-with-summary field--label-hidden field--item"&gt;&lt;p&gt;The Linux boot process is a sequence of events that initializes a Linux system from a powered-off state to a fully operational state. The knowledge of Linux boot process is essential when it comes to technical interviews, but sometimes it becomes difficult to remember or recall the key steps in the process. This article discusses a quick and easy way to remember it - &lt;strong&gt;B&lt;/strong&gt;est &lt;strong&gt;G&lt;/strong&gt;eeks &lt;strong&gt;K&lt;/strong&gt;now &lt;strong&gt;I&lt;/strong&gt;t! Yes, you only need to remember that.&lt;/p&gt;

&lt;p&gt;Best Geeks Know It -&gt; &lt;strong&gt;B – G – K – I &lt;/strong&gt;-&gt; BIOS – GRUB – KERNEL – INIT&lt;/p&gt;

&lt;p&gt;This &lt;strong&gt;BGKI&lt;/strong&gt; acronym provides a high-level overview of the Linux boot process. Each step builds upon the previous one, gradually bringing the system to a fully operational state. Of course, there are more detailed processes within each step, but this simplified version should give you a good foundation for understanding and remembering the Linux boot sequence.&lt;/p&gt;
&lt;img alt="BGKI Process" data-entity-type="file" data-entity-uuid="048eb6b2-3d42-48a2-9fae-f581a723bba6" src="https://www.linuxjournal.com/sites/default/files/inline-images/BGKI-process.jpg" class="align-center" width="800" height="471" loading="lazy" /&gt;&lt;p&gt; &lt;/p&gt;

&lt;p&gt;Here's a concise expansion of &lt;strong&gt;B-G-K-I&lt;/strong&gt;:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;B - BIOS/UEFI&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;&lt;li&gt;Performs Power-On Self-Test (POST)&lt;/li&gt;
	&lt;li&gt;Checks hardware: CPU, RAM, storage&lt;/li&gt;
	&lt;li&gt;Loads MBR (Master Boot Record) or GPT (GUID Partition Table)&lt;/li&gt;
	&lt;li&gt;Transfers control to bootloader&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;&lt;strong&gt;G - GRUB&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;&lt;li&gt;Located in first 512 bytes of boot drive&lt;/li&gt;
	&lt;li&gt;Reads &lt;code&gt;/boot/grub/grub.conf&lt;/code&gt;&lt;/li&gt;
	&lt;li&gt;Shows menu with kernel options&lt;/li&gt;
	&lt;li&gt;Loads selected kernel + &lt;code&gt;initramfs&lt;/code&gt; (temporary root filesystem) into RAM&lt;/li&gt;
	&lt;li&gt;Passes boot parameters to kernel&lt;/li&gt;
	&lt;li&gt;Can handle multiple OS boot options&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;&lt;strong&gt;K - KERNEL&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;&lt;li&gt;Decompresses itself into RAM&lt;/li&gt;
	&lt;li&gt;Initializes hardware and drivers&lt;/li&gt;
	&lt;li&gt;Mounts root filesystem, loads &lt;code&gt;initramfs&lt;/code&gt;&lt;/li&gt;
	&lt;li&gt;Sets up memory management&lt;/li&gt;
	&lt;li&gt;Starts device detection&lt;/li&gt;
	&lt;li&gt;Creates kernel threads&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;&lt;strong&gt;I - INIT&lt;/strong&gt; (systemd in modern systems)&lt;/p&gt;

&lt;ul&gt;&lt;li&gt;PID 1 (first process)&lt;/li&gt;
	&lt;li&gt;Reads &lt;code&gt;/etc/inittab&lt;/code&gt; (traditional) or unit files (&lt;code&gt;systemd&lt;/code&gt;)&lt;/li&gt;
	&lt;li&gt;Sets default runlevel/target&lt;/li&gt;
	&lt;li&gt;Starts essential services in order:
	&lt;ul&gt;&lt;li&gt;System services&lt;/li&gt;
		&lt;li&gt;Network services&lt;/li&gt;
		&lt;li&gt;Display manager&lt;/li&gt;
		&lt;li&gt;User interface (CLI/GUI)&lt;/li&gt;
	&lt;/ul&gt;&lt;/li&gt;
	&lt;li&gt;Reaches default target state&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt; &lt;/p&gt;

&lt;span class="h3-replacement"&gt;&lt;strong&gt;Key files to remember&lt;/strong&gt;&lt;/span&gt;

&lt;p&gt;&lt;code&gt;/boot/grub/grub.conf&lt;/code&gt;  - GRUB configuration&lt;/p&gt;

&lt;p&gt;&lt;code&gt;/etc/systemd/system/&lt;/code&gt;  - systemd unit files&lt;/p&gt;

&lt;p&gt;&lt;code&gt;/etc/inittab&lt;/code&gt;                  - Init configuration (traditional)&lt;/p&gt;&lt;/div&gt;
      
            &lt;div class="field field--name-node-link field--type-ds field--label-hidden field--item"&gt;  &lt;a href="https://www.linuxjournal.com/content/linux-boot-process-best-geeks-know-it" hreflang="en"&gt;Go to Full Article&lt;/a&gt;
&lt;/div&gt;
      
    &lt;/div&gt;
  &lt;/div&gt;

</description>
  <pubDate>Tue, 06 May 2025 16:00:00 +0000</pubDate>
    <dc:creator>Nawaz Abbasi</dc:creator>
    <guid isPermaLink="false">1341324 at https://www.linuxjournal.com</guid>
    </item>
<item>
  <title>How to Build Custom Distributions from Scratch</title>
  <link>https://www.linuxjournal.com/content/how-build-custom-distributions-scratch</link>
  <description>  &lt;div data-history-node-id="1341323" class="layout layout--onecol"&gt;
    &lt;div class="layout__region layout__region--content"&gt;
      
            &lt;div class="field field--name-field-node-image field--type-image field--label-hidden field--item"&gt;  &lt;img loading="lazy" src="https://www.linuxjournal.com/sites/default/files/nodeimage/story/how-to-build-custom-distributions-from-scratch.jpg" width="850" height="500" alt="How to Build Custom Distributions from Scratch" typeof="foaf:Image" class="img-responsive" /&gt;&lt;/div&gt;
      
            &lt;div class="field field--name-node-author field--type-ds field--label-hidden field--item"&gt;by &lt;a title="View user profile." href="https://www.linuxjournal.com/users/george-whittaker" lang="" about="https://www.linuxjournal.com/users/george-whittaker" typeof="schema:Person" property="schema:name" datatype="" xml:lang=""&gt;George Whittaker&lt;/a&gt;&lt;/div&gt;
      
            &lt;div class="field field--name-body field--type-text-with-summary field--label-hidden field--item"&gt;&lt;h2&gt;&lt;strong&gt;Introduction&lt;/strong&gt;&lt;/h2&gt;

&lt;p&gt;In a world teeming with Linux distributions — from Ubuntu to Arch, Debian to Fedora — the idea of building your own may seem daunting, if not redundant. Yet, for many technologists, enthusiasts, and developers, creating a custom Linux distribution isn't just an exercise in reinvention; it's an act of empowerment. Whether your goal is to tailor a lightweight OS for embedded devices, create a secure workstation, develop an education-focused system, or simply understand Linux more intimately, building your own distribution is one of the most fulfilling journeys in open-source computing.&lt;/p&gt;

&lt;p&gt;This guide walks you through every stage of creating your own Linux distribution — from selecting core components to building, customizing, and distributing your personalized operating system.&lt;/p&gt;

&lt;h2&gt;&lt;strong&gt;Understanding the Basics&lt;/strong&gt;&lt;/h2&gt;

&lt;span class="h3-replacement"&gt;&lt;strong&gt;What is a Linux Distribution?&lt;/strong&gt;&lt;/span&gt;

&lt;p&gt;A Linux distribution (or "distro") is a complete operating system built on the Linux kernel. It includes:&lt;/p&gt;

&lt;ul&gt;&lt;li&gt;
	&lt;p&gt;&lt;strong&gt;Kernel&lt;/strong&gt; – The core interface between hardware and software.&lt;/p&gt;
	&lt;/li&gt;
	&lt;li&gt;
	&lt;p&gt;&lt;strong&gt;Init System&lt;/strong&gt; – Handles booting and service management (e.g., systemd, OpenRC).&lt;/p&gt;
	&lt;/li&gt;
	&lt;li&gt;
	&lt;p&gt;&lt;strong&gt;Userland Tools&lt;/strong&gt; – Basic utilities from projects like GNU Coreutils and BusyBox.&lt;/p&gt;
	&lt;/li&gt;
	&lt;li&gt;
	&lt;p&gt;&lt;strong&gt;Package Manager&lt;/strong&gt; – Tool to install, upgrade, and remove software (e.g., APT, Pacman, DNF).&lt;/p&gt;
	&lt;/li&gt;
	&lt;li&gt;
	&lt;p&gt;&lt;strong&gt;Optional GUI&lt;/strong&gt; – A desktop environment or window manager (e.g., GNOME, XFCE, i3).&lt;/p&gt;
	&lt;/li&gt;
&lt;/ul&gt;&lt;span class="h3-replacement"&gt;&lt;strong&gt;Why Create Your Own Distribution?&lt;/strong&gt;&lt;/span&gt;

&lt;p&gt;Reasons vary, but common motivations include:&lt;/p&gt;

&lt;ul&gt;&lt;li&gt;
	&lt;p&gt;&lt;strong&gt;Learning&lt;/strong&gt; – Deepen your understanding of system internals.&lt;/p&gt;
	&lt;/li&gt;
	&lt;li&gt;
	&lt;p&gt;&lt;strong&gt;Performance&lt;/strong&gt; – Remove bloat for a leaner, faster system.&lt;/p&gt;
	&lt;/li&gt;
	&lt;li&gt;
	&lt;p&gt;&lt;strong&gt;Branding&lt;/strong&gt; – Create a branded OS for an organization or product.&lt;/p&gt;
	&lt;/li&gt;
	&lt;li&gt;
	&lt;p&gt;&lt;strong&gt;Customization&lt;/strong&gt; – Tailor software stacks for specific use-cases.&lt;/p&gt;
	&lt;/li&gt;
	&lt;li&gt;
	&lt;p&gt;&lt;strong&gt;Embedded Applications&lt;/strong&gt; – Create firmware or OS images for hardware devices.&lt;/p&gt;
	&lt;/li&gt;
&lt;/ul&gt;&lt;h2&gt;&lt;strong&gt;Planning Your Custom Linux Distro&lt;/strong&gt;&lt;/h2&gt;

&lt;span class="h3-replacement"&gt;&lt;strong&gt;Define Your Goals&lt;/strong&gt;&lt;/span&gt;

&lt;p&gt;Start by asking:&lt;/p&gt;

&lt;ul&gt;&lt;li&gt;
	&lt;p&gt;Who is the target user?&lt;/p&gt;
	&lt;/li&gt;
	&lt;li&gt;
	&lt;p&gt;What hardware should it support?&lt;/p&gt;
	&lt;/li&gt;
	&lt;li&gt;
	&lt;p&gt;Will it be a desktop, server, or headless system?&lt;/p&gt;
	&lt;/li&gt;
	&lt;li&gt;
	&lt;p&gt;Should it boot live or be installed?&lt;/p&gt;
	&lt;/li&gt;
&lt;/ul&gt;&lt;span class="h3-replacement"&gt;&lt;strong&gt;Choose a Foundation&lt;/strong&gt;&lt;/span&gt;

&lt;p&gt;You can either:&lt;/p&gt;

&lt;ul&gt;&lt;li&gt;
	&lt;p&gt;&lt;strong&gt;Build from scratch&lt;/strong&gt;: Using projects like &lt;em&gt;Linux From Scratch (LFS)&lt;/em&gt;.&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;
      
            &lt;div class="field field--name-node-link field--type-ds field--label-hidden field--item"&gt;  &lt;a href="https://www.linuxjournal.com/content/how-build-custom-distributions-scratch" hreflang="en"&gt;Go to Full Article&lt;/a&gt;
&lt;/div&gt;
      
    &lt;/div&gt;
  &lt;/div&gt;

</description>
  <pubDate>Thu, 01 May 2025 16:00:00 +0000</pubDate>
    <dc:creator>George Whittaker</dc:creator>
    <guid isPermaLink="false">1341323 at https://www.linuxjournal.com</guid>
    </item>
<item>
  <title>Linux Data Recovery: How to Salvage Lost or Corrupted Files</title>
  <link>https://www.linuxjournal.com/content/linux-data-recovery-how-salvage-lost-or-corrupted-files</link>
  <description>  &lt;div data-history-node-id="1341322" class="layout layout--onecol"&gt;
    &lt;div class="layout__region layout__region--content"&gt;
      
            &lt;div class="field field--name-field-node-image field--type-image field--label-hidden field--item"&gt;  &lt;img loading="lazy" src="https://www.linuxjournal.com/sites/default/files/nodeimage/story/linux-data-recovery-how-to-salvage-lost-or-corrupted-files.jpg" width="850" height="500" alt="Linux Data Recovery: How to Salvage Lost or Corrupted Files" typeof="foaf:Image" class="img-responsive" /&gt;&lt;/div&gt;
      
            &lt;div class="field field--name-node-author field--type-ds field--label-hidden field--item"&gt;by &lt;a title="View user profile." href="https://www.linuxjournal.com/users/george-whittaker" lang="" about="https://www.linuxjournal.com/users/george-whittaker" typeof="schema:Person" property="schema:name" datatype="" xml:lang=""&gt;George Whittaker&lt;/a&gt;&lt;/div&gt;
      
            &lt;div class="field field--name-body field--type-text-with-summary field--label-hidden field--item"&gt;&lt;p&gt;Data loss is a nightmare for any computer user, and Linux users are no exception. Despite the robust architecture of Linux operating systems, disasters can strike in the form of accidental deletions, corrupted partitions, or failing storage devices. Whether you're a system administrator, developer, or everyday Linux user, understanding how to recover data can be the difference between a minor inconvenience and a major setback.&lt;/p&gt;

&lt;p&gt;This guide will walk you through the practical strategies and essential tools for recovering lost or corrupted files on Linux.&lt;/p&gt;

&lt;h2&gt;&lt;strong&gt;Understanding Data Loss on Linux&lt;/strong&gt;&lt;/h2&gt;

&lt;span class="h3-replacement"&gt;&lt;strong&gt;Common Causes of Data Loss&lt;/strong&gt;&lt;/span&gt;

&lt;p&gt;Data loss can occur for various reasons:&lt;/p&gt;

&lt;ul&gt;&lt;li&gt;
	&lt;p&gt;&lt;strong&gt;Accidental Deletion&lt;/strong&gt;: Files removed with &lt;code&gt;rm&lt;/code&gt; or cleared trash.&lt;/p&gt;
	&lt;/li&gt;
	&lt;li&gt;
	&lt;p&gt;&lt;strong&gt;Filesystem Corruption&lt;/strong&gt;: Caused by improper shutdowns, power failures, or software bugs.&lt;/p&gt;
	&lt;/li&gt;
	&lt;li&gt;
	&lt;p&gt;&lt;strong&gt;Partition Issues&lt;/strong&gt;: Misconfigured or overwritten partition tables.&lt;/p&gt;
	&lt;/li&gt;
	&lt;li&gt;
	&lt;p&gt;&lt;strong&gt;Hardware Failures&lt;/strong&gt;: Hard drive degradation, bad sectors, or failing SSDs.&lt;/p&gt;
	&lt;/li&gt;
&lt;/ul&gt;&lt;span class="h3-replacement"&gt;&lt;strong&gt;How Deletion Works on Linux&lt;/strong&gt;&lt;/span&gt;

&lt;p&gt;Linux filesystems like &lt;code&gt;ext4&lt;/code&gt; don’t immediately erase data when a file is deleted. Instead, the filesystem marks the file's space as free. Until that space is overwritten, the data may be recoverable. This behavior is the cornerstone of most recovery techniques.&lt;/p&gt;

&lt;h2&gt;&lt;strong&gt;First Steps After Data Loss&lt;/strong&gt;&lt;/h2&gt;

&lt;p&gt;The most critical step is to &lt;strong&gt;minimize system activity&lt;/strong&gt; on the affected drive. Any write operation can potentially overwrite recoverable data.&lt;/p&gt;

&lt;span class="h3-replacement"&gt;&lt;strong&gt;Disconnect and Mount Read-Only&lt;/strong&gt;&lt;/span&gt;

&lt;p&gt;If the loss happened on a secondary drive, physically disconnect it and mount it read-only on another machine:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;sudo mount -o ro /dev/sdX1 /mnt/recovery &lt;/code&gt;&lt;/p&gt;

&lt;span class="h3-replacement"&gt;&lt;strong&gt;Create a Disk Image&lt;/strong&gt;&lt;/span&gt;

&lt;p&gt;Use tools like &lt;code&gt;dd&lt;/code&gt; or &lt;code&gt;ddrescue&lt;/code&gt; to create a complete image of the drive for analysis:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;sudo dd if=/dev/sdX of=/mnt/external/backup.img bs=4M status=progress &lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Or with &lt;code&gt;ddrescue&lt;/code&gt;, which handles read errors more gracefully:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;sudo ddrescue /dev/sdX /mnt/external/recovery.img /mnt/external/logfile &lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Work from the image to preserve the original drive.&lt;/p&gt;

&lt;h2&gt;&lt;strong&gt;Boot from a Live Environment&lt;/strong&gt;&lt;/h2&gt;

&lt;p&gt;To avoid using the target system, boot into a &lt;strong&gt;Live Linux distribution&lt;/strong&gt; like:&lt;/p&gt;

&lt;ul&gt;&lt;li&gt;
	&lt;p&gt;&lt;strong&gt;SystemRescueCD&lt;/strong&gt; – tailored for system repair.&lt;/p&gt;
	&lt;/li&gt;
	&lt;li&gt;
	&lt;p&gt;&lt;strong&gt;Ubuntu Live CD&lt;/strong&gt; – user-friendly and widely available.&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;
      
            &lt;div class="field field--name-node-link field--type-ds field--label-hidden field--item"&gt;  &lt;a href="https://www.linuxjournal.com/content/linux-data-recovery-how-salvage-lost-or-corrupted-files" hreflang="en"&gt;Go to Full Article&lt;/a&gt;
&lt;/div&gt;
      
    &lt;/div&gt;
  &lt;/div&gt;

</description>
  <pubDate>Tue, 29 Apr 2025 16:00:00 +0000</pubDate>
    <dc:creator>George Whittaker</dc:creator>
    <guid isPermaLink="false">1341322 at https://www.linuxjournal.com</guid>
    </item>
<item>
  <title>Debugging and Profiling Linux Applications with GDB and strace</title>
  <link>https://www.linuxjournal.com/content/debugging-and-profiling-linux-applications-gdb-and-strace</link>
  <description>  &lt;div data-history-node-id="1341320" class="layout layout--onecol"&gt;
    &lt;div class="layout__region layout__region--content"&gt;
      
            &lt;div class="field field--name-field-node-image field--type-image field--label-hidden field--item"&gt;  &lt;img loading="lazy" src="https://www.linuxjournal.com/sites/default/files/nodeimage/story/debugging-and-profiling-linux-applications-with-gdb-and-strace.jpg" width="850" height="500" alt="Debugging and Profiling Linux Applications with GDB and strace" typeof="foaf:Image" class="img-responsive" /&gt;&lt;/div&gt;
      
            &lt;div class="field field--name-node-author field--type-ds field--label-hidden field--item"&gt;by &lt;a title="View user profile." href="https://www.linuxjournal.com/users/george-whittaker" lang="" about="https://www.linuxjournal.com/users/george-whittaker" typeof="schema:Person" property="schema:name" datatype="" xml:lang=""&gt;George Whittaker&lt;/a&gt;&lt;/div&gt;
      
            &lt;div class="field field--name-body field--type-text-with-summary field--label-hidden field--item"&gt;&lt;p&gt;Debugging and profiling are critical skills in a developer's toolbox, especially when working with low-level system applications. Whether you're tracking down a segmentation fault in a C program or understanding why a daemon fails silently, mastering tools like &lt;strong&gt;GDB (GNU Debugger)&lt;/strong&gt; and &lt;strong&gt;strace&lt;/strong&gt; can dramatically improve your efficiency and understanding of program behavior.&lt;/p&gt;

&lt;p&gt;In this guide, we’ll dive deep into these two powerful tools, exploring how they work, how to use them effectively, and how they complement each other in diagnosing and resolving complex issues.&lt;/p&gt;

&lt;h2&gt;&lt;strong&gt;The Essence of Debugging and Profiling&lt;/strong&gt;&lt;/h2&gt;

&lt;span class="h3-replacement"&gt;&lt;strong&gt;What is Debugging?&lt;/strong&gt;&lt;/span&gt;

&lt;p&gt;Debugging is the systematic process of identifying, isolating, and fixing bugs—errors or unexpected behaviors in your code. It’s an integral part of development that ensures software quality and stability. While high-level languages may offer interactive debuggers, compiled languages like C and C++ often require robust tools like GDB for line-by-line inspection.&lt;/p&gt;

&lt;span class="h3-replacement"&gt;&lt;strong&gt;What is Profiling?&lt;/strong&gt;&lt;/span&gt;

&lt;p&gt;Profiling, on the other hand, is about performance analysis. It helps you understand where your application spends time, which functions are called frequently, and how system resources are being utilized. While GDB can aid in debugging, &lt;strong&gt;strace&lt;/strong&gt; provides a view of how a program interacts with the operating system, making it ideal for performance tuning and root cause analysis of runtime issues.&lt;/p&gt;

&lt;h2&gt;&lt;strong&gt;Getting Hands-On with GDB&lt;/strong&gt;&lt;/h2&gt;

&lt;span class="h3-replacement"&gt;&lt;strong&gt;What is GDB?&lt;/strong&gt;&lt;/span&gt;

&lt;p&gt;&lt;strong&gt;GDB&lt;/strong&gt; is the standard debugger for GNU systems. It allows you to inspect the internal state of a program while it’s running or after it crashes. With GDB, you can set breakpoints, step through code, inspect variables, view call stacks, and even modify program execution flow.&lt;/p&gt;

&lt;span class="h3-replacement"&gt;&lt;strong&gt;Preparing Your Program&lt;/strong&gt;&lt;/span&gt;

&lt;p&gt;To make your program debuggable with GDB, compile it with debug symbols using the &lt;code&gt;-g&lt;/code&gt; flag:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;gcc -g -o myapp myapp.c &lt;/code&gt;&lt;/p&gt;

&lt;p&gt;This embeds symbol information like function names, variable types, and line numbers, which are essential for meaningful debugging.&lt;/p&gt;

&lt;span class="h3-replacement"&gt;&lt;strong&gt;Basic GDB Commands&lt;/strong&gt;&lt;/span&gt;

&lt;p&gt;Here are some fundamental commands you'll use frequently:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;gdb ./myapp # Start GDB with your program run # Start the program inside GDB break main # Set a breakpoint at the 'main' function break filename:line# Break at specific line next # Step over a function step # Step into a function continue # Resume program execution print varname # Inspect the value of a variable backtrace # Show the current function call stack quit # Exit GDB &lt;/code&gt;&lt;/p&gt;&lt;/div&gt;
      
            &lt;div class="field field--name-node-link field--type-ds field--label-hidden field--item"&gt;  &lt;a href="https://www.linuxjournal.com/content/debugging-and-profiling-linux-applications-gdb-and-strace" hreflang="en"&gt;Go to Full Article&lt;/a&gt;
&lt;/div&gt;
      
    &lt;/div&gt;
  &lt;/div&gt;

</description>
  <pubDate>Tue, 22 Apr 2025 16:00:00 +0000</pubDate>
    <dc:creator>George Whittaker</dc:creator>
    <guid isPermaLink="false">1341320 at https://www.linuxjournal.com</guid>
    </item>
<item>
  <title>The Power of Linux Shell Environment Variables</title>
  <link>https://www.linuxjournal.com/content/power-linux-shell-environment-variables</link>
  <description>  &lt;div data-history-node-id="1341316" class="layout layout--onecol"&gt;
    &lt;div class="layout__region layout__region--content"&gt;
      
            &lt;div class="field field--name-field-node-image field--type-image field--label-hidden field--item"&gt;  &lt;img loading="lazy" src="https://www.linuxjournal.com/sites/default/files/nodeimage/story/the-power-of-linux-shell-environment-variables.jpg" width="850" height="500" alt="The Power of Linux Shell Environment Variables" typeof="foaf:Image" class="img-responsive" /&gt;&lt;/div&gt;
      
            &lt;div class="field field--name-node-author field--type-ds field--label-hidden field--item"&gt;by &lt;a title="View user profile." href="https://www.linuxjournal.com/users/george-whittaker" lang="" about="https://www.linuxjournal.com/users/george-whittaker" typeof="schema:Person" property="schema:name" datatype="" xml:lang=""&gt;George Whittaker&lt;/a&gt;&lt;/div&gt;
      
            &lt;div class="field field--name-body field--type-text-with-summary field--label-hidden field--item"&gt;&lt;p&gt;If you're working in a Linux environment, chances are you've encountered environment variables—even if you didn’t realize it at the time. They quietly power much of what goes on behind the scenes in your shell sessions, influencing everything from what shell prompt you see to which programs are available when you type a command. Whether you're an experienced sysadmin or a new Linux user, mastering environment variables is essential for customizing and controlling your shell experience.&lt;/p&gt;

&lt;p&gt;In this guide, we'll take a dive into environment variables in the Linux shell. By the end, you'll not only know how to view and set these variables, but also how to persist them, use them in scripts, and troubleshoot issues effectively.&lt;/p&gt;

&lt;h2&gt;&lt;strong&gt;What Are Environment Variables?&lt;/strong&gt;&lt;/h2&gt;

&lt;p&gt;At a basic level, &lt;strong&gt;environment variables&lt;/strong&gt; are dynamic named values that affect the behavior of running processes on your Linux system. Think of them as configuration settings that your shell (like Bash or Zsh) and applications refer to in order to understand how they should operate.&lt;/p&gt;

&lt;p&gt;For example:&lt;/p&gt;

&lt;ul&gt;&lt;li&gt;
	&lt;p&gt;The &lt;code&gt;PATH&lt;/code&gt; variable tells the shell where to look for executable files.&lt;/p&gt;
	&lt;/li&gt;
	&lt;li&gt;
	&lt;p&gt;The &lt;code&gt;HOME&lt;/code&gt; variable stores the path to your home directory.&lt;/p&gt;
	&lt;/li&gt;
	&lt;li&gt;
	&lt;p&gt;The &lt;code&gt;LANG&lt;/code&gt; variable defines your system’s language and character encoding.&lt;/p&gt;
	&lt;/li&gt;
&lt;/ul&gt;&lt;span class="h3-replacement"&gt;&lt;strong&gt;Environment Variables vs Shell Variables&lt;/strong&gt;&lt;/span&gt;

&lt;p&gt;There is an important distinction between &lt;strong&gt;shell variables&lt;/strong&gt; and &lt;strong&gt;environment variables&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;&lt;li&gt;
	&lt;p&gt;&lt;strong&gt;Shell variables&lt;/strong&gt; are local to the shell session in which they are defined.&lt;/p&gt;
	&lt;/li&gt;
	&lt;li&gt;
	&lt;p&gt;&lt;strong&gt;Environment variables&lt;/strong&gt; are shell variables that have been &lt;em&gt;exported&lt;/em&gt;, meaning they are inherited by child processes spawned from the shell.&lt;/p&gt;
	&lt;/li&gt;
&lt;/ul&gt;&lt;h2&gt;&lt;strong&gt;Viewing Environment Variables&lt;/strong&gt;&lt;/h2&gt;

&lt;p&gt;Before you can modify or use environment variables, it's important to know how to inspect them.&lt;/p&gt;

&lt;span class="h3-replacement"&gt;&lt;strong&gt;View All Environment Variables&lt;/strong&gt;&lt;/span&gt;

&lt;p&gt;&lt;code&gt;printenv &lt;/code&gt;&lt;/p&gt;

&lt;p&gt;or&lt;/p&gt;

&lt;p&gt;&lt;code&gt;env &lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Both commands list environment variables currently set for the session.&lt;/p&gt;

&lt;span class="h3-replacement"&gt;&lt;strong&gt;View a Specific Variable&lt;/strong&gt;&lt;/span&gt;

&lt;p&gt;&lt;code&gt;echo $HOME &lt;/code&gt;&lt;/p&gt;

&lt;p&gt;This will display the current user's home directory.&lt;/p&gt;

&lt;span class="h3-replacement"&gt;&lt;strong&gt;View All Shell Variables&lt;/strong&gt;&lt;/span&gt;

&lt;p&gt;&lt;code&gt;set &lt;/code&gt;&lt;/p&gt;

&lt;p&gt;This command displays all shell variables and functions. It's broader than &lt;code&gt;printenv&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;&lt;strong&gt;Setting and Exporting Environment Variables&lt;/strong&gt;&lt;/h2&gt;

&lt;p&gt;You can define your own variables or temporarily change existing ones within your shell.&lt;/p&gt;&lt;/div&gt;
      
            &lt;div class="field field--name-node-link field--type-ds field--label-hidden field--item"&gt;  &lt;a href="https://www.linuxjournal.com/content/power-linux-shell-environment-variables" hreflang="en"&gt;Go to Full Article&lt;/a&gt;
&lt;/div&gt;
      
    &lt;/div&gt;
  &lt;/div&gt;

</description>
  <pubDate>Tue, 08 Apr 2025 16:00:00 +0000</pubDate>
    <dc:creator>George Whittaker</dc:creator>
    <guid isPermaLink="false">1341316 at https://www.linuxjournal.com</guid>
    </item>
<item>
  <title>Mastering Linux File Permissions and Ownership</title>
  <link>https://www.linuxjournal.com/content/mastering-linux-file-permissions-and-ownership</link>
  <description>  &lt;div data-history-node-id="1341314" class="layout layout--onecol"&gt;
    &lt;div class="layout__region layout__region--content"&gt;
      
            &lt;div class="field field--name-field-node-image field--type-image field--label-hidden field--item"&gt;  &lt;img loading="lazy" src="https://www.linuxjournal.com/sites/default/files/nodeimage/story/mastering-linux-file-permissions-and-ownership.jpg" width="850" height="500" alt="Mastering Linux File Permissions and Ownership" typeof="foaf:Image" class="img-responsive" /&gt;&lt;/div&gt;
      
            &lt;div class="field field--name-node-author field--type-ds field--label-hidden field--item"&gt;by &lt;a title="View user profile." href="https://www.linuxjournal.com/users/george-whittaker" lang="" about="https://www.linuxjournal.com/users/george-whittaker" typeof="schema:Person" property="schema:name" datatype="" xml:lang=""&gt;George Whittaker&lt;/a&gt;&lt;/div&gt;
      
            &lt;div class="field field--name-body field--type-text-with-summary field--label-hidden field--item"&gt;&lt;p&gt;In the world of Linux, where multi-user systems and server security are foundational principles, understanding file permissions and ownership is crucial. Whether you're a beginner exploring your first Linux distribution or a seasoned system administrator managing critical servers, knowing how permissions work is key to ensuring the integrity, privacy, and functionality of your system.&lt;/p&gt;

&lt;p&gt;This guide will take you deep into the core of Linux file permissions and ownership—what they are, how they work, how to modify them, and why they matter.&lt;/p&gt;

&lt;h2&gt;&lt;strong&gt;Why File Permissions and Ownership Matter in Linux&lt;/strong&gt;&lt;/h2&gt;

&lt;p&gt;Linux is built from the ground up as a &lt;strong&gt;multi-user operating system&lt;/strong&gt;. This means:&lt;/p&gt;

&lt;ul&gt;&lt;li&gt;
	&lt;p&gt;Multiple users can operate on the same system simultaneously.&lt;/p&gt;
	&lt;/li&gt;
	&lt;li&gt;
	&lt;p&gt;Different users have different levels of access and control.&lt;/p&gt;
	&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;Without a permissions system, there would be &lt;strong&gt;no way to protect files from unauthorized access&lt;/strong&gt;, modification, or deletion. File permissions and ownership form the first layer of defense against accidental or malicious activity.&lt;/p&gt;

&lt;h2&gt;&lt;strong&gt;Linux Permission Basics: Read, Write, Execute&lt;/strong&gt;&lt;/h2&gt;

&lt;p&gt;Each file and directory in Linux has &lt;strong&gt;three basic types of permissions&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;&lt;li&gt;
	&lt;p&gt;&lt;strong&gt;Read (&lt;code&gt;r&lt;/code&gt;)&lt;/strong&gt; – Permission to view the contents of a file or list the contents of a directory.&lt;/p&gt;
	&lt;/li&gt;
	&lt;li&gt;
	&lt;p&gt;&lt;strong&gt;Write (&lt;code&gt;w&lt;/code&gt;)&lt;/strong&gt; – Permission to modify a file or create, rename, or delete files within a directory.&lt;/p&gt;
	&lt;/li&gt;
	&lt;li&gt;
	&lt;p&gt;&lt;strong&gt;Execute (&lt;code&gt;x&lt;/code&gt;)&lt;/strong&gt; – For files, allows execution as a program or script. For directories, allows entering the directory (&lt;code&gt;cd&lt;/code&gt;).&lt;/p&gt;
	&lt;/li&gt;
&lt;/ul&gt;&lt;h2&gt;&lt;strong&gt;Permission Categories: User, Group, Others&lt;/strong&gt;&lt;/h2&gt;

&lt;p&gt;Permissions are assigned to &lt;strong&gt;three distinct sets of users&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;&lt;li&gt;
	&lt;p&gt;&lt;strong&gt;User (u)&lt;/strong&gt; – The file's owner.&lt;/p&gt;
	&lt;/li&gt;
	&lt;li&gt;
	&lt;p&gt;&lt;strong&gt;Group (g)&lt;/strong&gt; – A group associated with the file.&lt;/p&gt;
	&lt;/li&gt;
	&lt;li&gt;
	&lt;p&gt;&lt;strong&gt;Others (o)&lt;/strong&gt; – Everyone else.&lt;/p&gt;
	&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;So for every file or directory, Linux evaluates &lt;strong&gt;nine permission bits&lt;/strong&gt;, forming three sets of &lt;code&gt;rwx&lt;/code&gt;, like so:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;rwxr-xr-- &lt;/code&gt;&lt;/p&gt;

&lt;p&gt;This breakdown means:&lt;/p&gt;

&lt;ul&gt;&lt;li&gt;
	&lt;p&gt;&lt;code&gt;rwx&lt;/code&gt; for the &lt;strong&gt;owner&lt;/strong&gt;&lt;/p&gt;
	&lt;/li&gt;
	&lt;li&gt;
	&lt;p&gt;&lt;code&gt;r-x&lt;/code&gt; for the &lt;strong&gt;group&lt;/strong&gt;&lt;/p&gt;
	&lt;/li&gt;
	&lt;li&gt;
	&lt;p&gt;&lt;code&gt;r--&lt;/code&gt; for &lt;strong&gt;others&lt;/strong&gt;&lt;/p&gt;
	&lt;/li&gt;
&lt;/ul&gt;&lt;h2&gt;&lt;strong&gt;Understanding the Permission String&lt;/strong&gt;&lt;/h2&gt;

&lt;p&gt;When you list files with &lt;code&gt;ls -l&lt;/code&gt;, you’ll see something like this:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;-rwxr-xr-- 1 alice developers 4096 Apr 4 14:00 script.sh &lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Let’s dissect it:&lt;/p&gt;&lt;/div&gt;
      
            &lt;div class="field field--name-node-link field--type-ds field--label-hidden field--item"&gt;  &lt;a href="https://www.linuxjournal.com/content/mastering-linux-file-permissions-and-ownership" hreflang="en"&gt;Go to Full Article&lt;/a&gt;
&lt;/div&gt;
      
    &lt;/div&gt;
  &lt;/div&gt;

</description>
  <pubDate>Tue, 01 Apr 2025 16:00:00 +0000</pubDate>
    <dc:creator>George Whittaker</dc:creator>
    <guid isPermaLink="false">1341314 at https://www.linuxjournal.com</guid>
    </item>
<item>
  <title>How to List Groups in Linux Like a Pro</title>
  <link>https://www.linuxjournal.com/content/how-list-groups-linux-pro</link>
  <description>  &lt;div data-history-node-id="1341313" class="layout layout--onecol"&gt;
    &lt;div class="layout__region layout__region--content"&gt;
      
            &lt;div class="field field--name-field-node-image field--type-image field--label-hidden field--item"&gt;  &lt;img loading="lazy" src="https://www.linuxjournal.com/sites/default/files/nodeimage/story/how-to-list-groups-in-linux-like-a-pro.jpg" width="850" height="500" alt="How to List Groups in Linux Like a Pro" typeof="foaf:Image" class="img-responsive" /&gt;&lt;/div&gt;
      
            &lt;div class="field field--name-node-author field--type-ds field--label-hidden field--item"&gt;by &lt;a title="View user profile." href="https://www.linuxjournal.com/users/george-whittaker" lang="" about="https://www.linuxjournal.com/users/george-whittaker" typeof="schema:Person" property="schema:name" datatype="" xml:lang=""&gt;George Whittaker&lt;/a&gt;&lt;/div&gt;
      
            &lt;div class="field field--name-body field--type-text-with-summary field--label-hidden field--item"&gt;&lt;p&gt;In Linux, groups play a central role in managing user permissions and access control. Whether you're an experienced system administrator or a curious new user, understanding how to list and analyze group information is a fundamental skill. This guide explores everything you need to know about listing groups in Linux, using a variety of tools and techniques to get exactly the information you need.&lt;/p&gt;

&lt;h2&gt;&lt;strong&gt;What Are Groups in Linux and Why Do They Matter?&lt;/strong&gt;&lt;/h2&gt;

&lt;p&gt;Linux is a multi-user operating system, and one of its strengths lies in the fine-grained control it offers over who can do what. Groups are a way to organize users so that multiple people can share access to files, devices, or system privileges.&lt;/p&gt;

&lt;p&gt;Each group has:&lt;/p&gt;

&lt;ul&gt;&lt;li&gt;
	&lt;p&gt;A &lt;strong&gt;group name&lt;/strong&gt;&lt;/p&gt;
	&lt;/li&gt;
	&lt;li&gt;
	&lt;p&gt;A &lt;strong&gt;Group ID (GID)&lt;/strong&gt;&lt;/p&gt;
	&lt;/li&gt;
	&lt;li&gt;
	&lt;p&gt;A list of users who are members of the group&lt;/p&gt;
	&lt;/li&gt;
&lt;/ul&gt;&lt;span class="h3-replacement"&gt;Types of Groups:&lt;/span&gt;

&lt;ul&gt;&lt;li&gt;
	&lt;p&gt;&lt;strong&gt;Primary group&lt;/strong&gt;: Each user has one primary group defined in &lt;code&gt;/etc/passwd&lt;/code&gt;. Files the user creates are associated with this group by default.&lt;/p&gt;
	&lt;/li&gt;
	&lt;li&gt;
	&lt;p&gt;&lt;strong&gt;Secondary (or supplementary) groups&lt;/strong&gt;: Users can belong to additional groups, which allow access to other resources.&lt;/p&gt;
	&lt;/li&gt;
&lt;/ul&gt;&lt;h2&gt;&lt;strong&gt;How to List All Groups on a Linux System&lt;/strong&gt;&lt;/h2&gt;

&lt;p&gt;To see every group that exists on the system, you can use the following methods:&lt;/p&gt;

&lt;span class="h3-replacement"&gt;&lt;code&gt;getent group&lt;/code&gt;&lt;/span&gt;

&lt;p&gt;&lt;code&gt;getent group &lt;/code&gt;&lt;/p&gt;

&lt;p&gt;This is the preferred method on modern systems because it queries the system’s name service switch configuration (NSS). It includes local and possibly remote group sources (like LDAP or NIS).&lt;/p&gt;

&lt;p&gt;Example output:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;sudo:x:27: docker:x:999:user1,user2 developers:x:1001:user3 &lt;/code&gt;&lt;/p&gt;

&lt;span class="h3-replacement"&gt;&lt;code&gt;cat /etc/group&lt;/code&gt;&lt;/span&gt;

&lt;p&gt;&lt;code&gt;cat /etc/group &lt;/code&gt;&lt;/p&gt;

&lt;p&gt;This command prints the content of the &lt;code&gt;/etc/group&lt;/code&gt; file, which is the local group database. It’s simple and fast, but it only shows local groups.&lt;/p&gt;

&lt;p&gt;Each line is formatted as:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;group_name:password_placeholder:GID:user1,user2,... &lt;/code&gt;&lt;/p&gt;

&lt;span class="h3-replacement"&gt;&lt;code&gt;compgen -g&lt;/code&gt; (Bash built-in)&lt;/span&gt;

&lt;p&gt;&lt;code&gt;compgen -g &lt;/code&gt;&lt;/p&gt;

&lt;p&gt;This command outputs only the group names, which is helpful for scripting or cleaner views.&lt;/p&gt;

&lt;h2&gt;&lt;strong&gt;How to List Groups for a Specific User&lt;/strong&gt;&lt;/h2&gt;

&lt;p&gt;You might want to know which groups a particular user belongs to. Here’s how:&lt;/p&gt;

&lt;span class="h3-replacement"&gt;&lt;code&gt;groups username&lt;/code&gt;&lt;/span&gt;

&lt;p&gt;&lt;code&gt;groups john &lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Outputs a space-separated list of groups that &lt;code&gt;john&lt;/code&gt; belongs to. If no username is given, it shows groups for the current user.&lt;/p&gt;

&lt;span class="h3-replacement"&gt;&lt;code&gt;id username&lt;/code&gt;&lt;/span&gt;

&lt;p&gt;&lt;code&gt;id alice &lt;/code&gt;&lt;/p&gt;&lt;/div&gt;
      
            &lt;div class="field field--name-node-link field--type-ds field--label-hidden field--item"&gt;  &lt;a href="https://www.linuxjournal.com/content/how-list-groups-linux-pro" hreflang="en"&gt;Go to Full Article&lt;/a&gt;
&lt;/div&gt;
      
    &lt;/div&gt;
  &lt;/div&gt;

</description>
  <pubDate>Thu, 27 Mar 2025 16:00:00 +0000</pubDate>
    <dc:creator>George Whittaker</dc:creator>
    <guid isPermaLink="false">1341313 at https://www.linuxjournal.com</guid>
    </item>
<item>
  <title>Essential Tools and Frameworks for Mastering Ethical Hacking on Linux</title>
  <link>https://www.linuxjournal.com/content/essential-tools-and-frameworks-mastering-ethical-hacking-linux</link>
  <description>  &lt;div data-history-node-id="1341304" class="layout layout--onecol"&gt;
    &lt;div class="layout__region layout__region--content"&gt;
      
            &lt;div class="field field--name-field-node-image field--type-image field--label-hidden field--item"&gt;  &lt;img loading="lazy" src="https://www.linuxjournal.com/sites/default/files/nodeimage/story/essential-tools-and-frameworks-for-mastering-ethical-hacking-on-linux.jpg" width="850" height="500" alt="Essential Tools and Frameworks for Mastering Ethical Hacking on Linux" typeof="foaf:Image" class="img-responsive" /&gt;&lt;/div&gt;
      
            &lt;div class="field field--name-node-author field--type-ds field--label-hidden field--item"&gt;by &lt;a title="View user profile." href="https://www.linuxjournal.com/users/george-whittaker" lang="" about="https://www.linuxjournal.com/users/george-whittaker" typeof="schema:Person" property="schema:name" datatype="" xml:lang=""&gt;George Whittaker&lt;/a&gt;&lt;/div&gt;
      
            &lt;div class="field field--name-body field--type-text-with-summary field--label-hidden field--item"&gt;&lt;h2&gt;&lt;strong&gt;Introduction&lt;/strong&gt;&lt;/h2&gt;

&lt;p&gt;In today's digital world, cybersecurity threats are ever-growing, making ethical hacking and penetration testing crucial components of modern security practices. Ethical hacking involves legally testing systems, networks, and applications for vulnerabilities before malicious hackers can exploit them. Among the various operating systems available, Linux has established itself as the preferred choice for ethical hackers due to its flexibility, security, and extensive toolkit.&lt;/p&gt;

&lt;p&gt;This article explores the most powerful ethical hacking tools and penetration testing frameworks available for Linux users, providing a guide to help ethical hackers and penetration testers enhance their skills and secure systems effectively.&lt;/p&gt;

&lt;h2&gt;&lt;strong&gt;Understanding Ethical Hacking and Penetration Testing&lt;/strong&gt;&lt;/h2&gt;

&lt;span class="h3-replacement"&gt;&lt;strong&gt;What is Ethical Hacking?&lt;/strong&gt;&lt;/span&gt;

&lt;p&gt;Ethical hacking, also known as penetration testing, is the practice of assessing computer systems for security vulnerabilities. Unlike malicious hackers, ethical hackers follow legal and ethical guidelines to identify weaknesses before cybercriminals can exploit them.&lt;/p&gt;

&lt;span class="h3-replacement"&gt;&lt;strong&gt;Difference Between Ethical Hacking and Malicious Hacking&lt;/strong&gt;&lt;/span&gt;

&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;th&gt;Ethical Hacking&lt;/th&gt;
			&lt;th&gt;Malicious Hacking&lt;/th&gt;
		&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Authorized and legal&lt;/td&gt;
			&lt;td&gt;Unauthorized and illegal&lt;/td&gt;
		&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Aims to improve security&lt;/td&gt;
			&lt;td&gt;Aims to exploit security flaws&lt;/td&gt;
		&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Conducted with consent&lt;/td&gt;
			&lt;td&gt;Conducted without permission&lt;/td&gt;
		&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Reports vulnerabilities to system owners&lt;/td&gt;
			&lt;td&gt;Exploits vulnerabilities for personal gain&lt;/td&gt;
		&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;span class="h3-replacement"&gt;&lt;strong&gt;The Five Phases of Penetration Testing&lt;/strong&gt;&lt;/span&gt;

&lt;ol start="1"&gt;&lt;li&gt;
	&lt;p&gt;&lt;strong&gt;Reconnaissance&lt;/strong&gt; – Gathering information about the target system.&lt;/p&gt;
	&lt;/li&gt;
	&lt;li&gt;
	&lt;p&gt;&lt;strong&gt;Scanning&lt;/strong&gt; – Identifying active hosts, open ports, and vulnerabilities.&lt;/p&gt;
	&lt;/li&gt;
	&lt;li&gt;
	&lt;p&gt;&lt;strong&gt;Exploitation&lt;/strong&gt; – Attempting to breach the system using known vulnerabilities.&lt;/p&gt;
	&lt;/li&gt;
	&lt;li&gt;
	&lt;p&gt;&lt;strong&gt;Privilege Escalation &amp; Post-Exploitation&lt;/strong&gt; – Gaining higher privileges and maintaining access.&lt;/p&gt;
	&lt;/li&gt;
	&lt;li&gt;
	&lt;p&gt;&lt;strong&gt;Reporting &amp; Remediation&lt;/strong&gt; – Documenting findings and suggesting fixes.&lt;/p&gt;
	&lt;/li&gt;
&lt;/ol&gt;&lt;p&gt;Now, let's explore the essential tools used by ethical hackers and penetration testers.&lt;/p&gt;

&lt;h2&gt;&lt;strong&gt;Essential Ethical Hacking Tools for Linux&lt;/strong&gt;&lt;/h2&gt;

&lt;span class="h3-replacement"&gt;&lt;strong&gt;Reconnaissance &amp; Information Gathering&lt;/strong&gt;&lt;/span&gt;

&lt;p&gt;These tools help gather information about a target before launching an attack.&lt;/p&gt;

&lt;ul&gt;&lt;li&gt;
	&lt;p&gt;&lt;strong&gt;Nmap (Network Mapper)&lt;/strong&gt; – A powerful tool for network scanning, host discovery, and port scanning.&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;
      
            &lt;div class="field field--name-node-link field--type-ds field--label-hidden field--item"&gt;  &lt;a href="https://www.linuxjournal.com/content/essential-tools-and-frameworks-mastering-ethical-hacking-linux" hreflang="en"&gt;Go to Full Article&lt;/a&gt;
&lt;/div&gt;
      
    &lt;/div&gt;
  &lt;/div&gt;

</description>
  <pubDate>Tue, 18 Mar 2025 16:00:00 +0000</pubDate>
    <dc:creator>George Whittaker</dc:creator>
    <guid isPermaLink="false">1341304 at https://www.linuxjournal.com</guid>
    </item>
<item>
  <title>Stay Ahead of the Game: Essential Tools and Techniques for Linux Server Monitoring</title>
  <link>https://www.linuxjournal.com/content/stay-ahead-game-essential-tools-and-techniques-linux-server-monitoring</link>
  <description>  &lt;div data-history-node-id="1341299" class="layout layout--onecol"&gt;
    &lt;div class="layout__region layout__region--content"&gt;
      
            &lt;div class="field field--name-field-node-image field--type-image field--label-hidden field--item"&gt;  &lt;img loading="lazy" src="https://www.linuxjournal.com/sites/default/files/nodeimage/story/stay-ahead-of-the-game-essential-tools-and-techniques-for-linux-server-monitoring.jpg" width="850" height="500" alt="Stay Ahead of the Game: Essential Tools and Techniques for Linux Server Monitoring" typeof="foaf:Image" class="img-responsive" /&gt;&lt;/div&gt;
      
            &lt;div class="field field--name-node-author field--type-ds field--label-hidden field--item"&gt;by &lt;a title="View user profile." href="https://www.linuxjournal.com/users/george-whittaker" lang="" about="https://www.linuxjournal.com/users/george-whittaker" typeof="schema:Person" property="schema:name" datatype="" xml:lang=""&gt;George Whittaker&lt;/a&gt;&lt;/div&gt;
      
            &lt;div class="field field--name-body field--type-text-with-summary field--label-hidden field--item"&gt;&lt;h2&gt;&lt;strong&gt;Introduction&lt;/strong&gt;&lt;/h2&gt;

&lt;p&gt;In the ever-evolving digital world, Linux servers form the backbone of enterprises, web applications, and cloud infrastructure. Whether hosting websites, databases, or critical applications, ensuring the smooth operation of Linux servers is crucial. Effective monitoring and alerting help system administrators maintain performance, security, and uptime while proactively identifying potential issues before they escalate into major outages.&lt;/p&gt;

&lt;p&gt;This guide explores essential Linux server monitoring tools, key performance metrics, and alerting techniques to keep your systems running optimally.&lt;/p&gt;

&lt;h2&gt;&lt;strong&gt;Understanding Linux Server Monitoring&lt;/strong&gt;&lt;/h2&gt;

&lt;span class="h3-replacement"&gt;&lt;strong&gt;Why is Monitoring Important?&lt;/strong&gt;&lt;/span&gt;

&lt;p&gt;Monitoring Linux servers is not just about tracking resource usage; it plays a crucial role in:&lt;/p&gt;

&lt;ul&gt;&lt;li&gt;
	&lt;p&gt;&lt;strong&gt;Performance Optimization&lt;/strong&gt;: Identifying bottlenecks in CPU, memory, disk, or network usage.&lt;/p&gt;
	&lt;/li&gt;
	&lt;li&gt;
	&lt;p&gt;&lt;strong&gt;Security Enhancement&lt;/strong&gt;: Detecting unauthorized access attempts, abnormal activities, or potential vulnerabilities.&lt;/p&gt;
	&lt;/li&gt;
	&lt;li&gt;
	&lt;p&gt;&lt;strong&gt;Resource Management&lt;/strong&gt;: Ensuring efficient use of hardware and system resources.&lt;/p&gt;
	&lt;/li&gt;
	&lt;li&gt;
	&lt;p&gt;&lt;strong&gt;Preventing Downtime&lt;/strong&gt;: Alerting administrators before issues become critical failures.&lt;/p&gt;
	&lt;/li&gt;
	&lt;li&gt;
	&lt;p&gt;&lt;strong&gt;Compliance &amp; Auditing&lt;/strong&gt;: Maintaining logs and metrics for regulatory or internal auditing.&lt;/p&gt;
	&lt;/li&gt;
&lt;/ul&gt;&lt;span class="h3-replacement"&gt;&lt;strong&gt;Key Metrics to Monitor&lt;/strong&gt;&lt;/span&gt;

&lt;ol start="1"&gt;&lt;li&gt;
	&lt;p&gt;&lt;strong&gt;System Performance Metrics&lt;/strong&gt;:&lt;/p&gt;

	&lt;ul&gt;&lt;li&gt;
		&lt;p&gt;&lt;strong&gt;CPU Usage&lt;/strong&gt;: Load percentage, idle time, and context switching.&lt;/p&gt;
		&lt;/li&gt;
		&lt;li&gt;
		&lt;p&gt;&lt;strong&gt;Memory Usage&lt;/strong&gt;: RAM consumption, swap utilization, and buffer/cache metrics.&lt;/p&gt;
		&lt;/li&gt;
		&lt;li&gt;
		&lt;p&gt;&lt;strong&gt;Disk I/O&lt;/strong&gt;: Read/write speeds, latency, and disk queue length.&lt;/p&gt;
		&lt;/li&gt;
	&lt;/ul&gt;&lt;/li&gt;
	&lt;li&gt;
	&lt;p&gt;&lt;strong&gt;Network Metrics&lt;/strong&gt;:&lt;/p&gt;

	&lt;ul&gt;&lt;li&gt;
		&lt;p&gt;&lt;strong&gt;Bandwidth Usage&lt;/strong&gt;: Incoming and outgoing traffic statistics.&lt;/p&gt;
		&lt;/li&gt;
		&lt;li&gt;
		&lt;p&gt;&lt;strong&gt;Latency &amp; Packet Loss&lt;/strong&gt;: Connectivity health and round-trip time.&lt;/p&gt;
		&lt;/li&gt;
		&lt;li&gt;
		&lt;p&gt;&lt;strong&gt;Open Ports &amp; Connections&lt;/strong&gt;: Identifying unauthorized or excessive connections.&lt;/p&gt;
		&lt;/li&gt;
	&lt;/ul&gt;&lt;/li&gt;
	&lt;li&gt;
	&lt;p&gt;&lt;strong&gt;System Health Metrics&lt;/strong&gt;:&lt;/p&gt;

	&lt;ul&gt;&lt;li&gt;
		&lt;p&gt;&lt;strong&gt;Load Average&lt;/strong&gt;: A measure of CPU demand over time.&lt;/p&gt;
		&lt;/li&gt;
		&lt;li&gt;
		&lt;p&gt;&lt;strong&gt;Disk Space Usage&lt;/strong&gt;: Preventing full partitions that could disrupt services.&lt;/p&gt;
		&lt;/li&gt;
		&lt;li&gt;
		&lt;p&gt;&lt;strong&gt;System Temperature&lt;/strong&gt;: Avoiding hardware failures due to overheating.&lt;/p&gt;
		&lt;/li&gt;
	&lt;/ul&gt;&lt;/li&gt;
	&lt;li&gt;
	&lt;p&gt;&lt;strong&gt;Security Metrics&lt;/strong&gt;:&lt;/p&gt;

	&lt;ul&gt;&lt;li&gt;
		&lt;p&gt;&lt;strong&gt;Failed Login Attempts&lt;/strong&gt;: Signs of brute-force attacks.&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;
      
            &lt;div class="field field--name-node-link field--type-ds field--label-hidden field--item"&gt;  &lt;a href="https://www.linuxjournal.com/content/stay-ahead-game-essential-tools-and-techniques-linux-server-monitoring" hreflang="en"&gt;Go to Full Article&lt;/a&gt;
&lt;/div&gt;
      
    &lt;/div&gt;
  &lt;/div&gt;

</description>
  <pubDate>Thu, 27 Feb 2025 17:00:00 +0000</pubDate>
    <dc:creator>George Whittaker</dc:creator>
    <guid isPermaLink="false">1341299 at https://www.linuxjournal.com</guid>
    </item>
<item>
  <title>Linux Memory Management: Understanding Page Tables, Swapping, and Memory Allocation</title>
  <link>https://www.linuxjournal.com/content/linux-memory-management-understanding-page-tables-swapping-and-memory-allocation</link>
  <description>  &lt;div data-history-node-id="1341297" class="layout layout--onecol"&gt;
    &lt;div class="layout__region layout__region--content"&gt;
      
            &lt;div class="field field--name-field-node-image field--type-image field--label-hidden field--item"&gt;  &lt;img loading="lazy" src="https://www.linuxjournal.com/sites/default/files/nodeimage/story/linux-memory-management-understanding-page-tables-swapping-and-memory-allocation.jpg" width="850" height="500" alt="Linux Memory Management: Understanding Page Tables, Swapping, and Memory Allocation" typeof="foaf:Image" class="img-responsive" /&gt;&lt;/div&gt;
      
            &lt;div class="field field--name-node-author field--type-ds field--label-hidden field--item"&gt;by &lt;a title="View user profile." href="https://www.linuxjournal.com/users/george-whittaker" lang="" about="https://www.linuxjournal.com/users/george-whittaker" typeof="schema:Person" property="schema:name" datatype="" xml:lang=""&gt;George Whittaker&lt;/a&gt;&lt;/div&gt;
      
            &lt;div class="field field--name-body field--type-text-with-summary field--label-hidden field--item"&gt;&lt;h2&gt;&lt;strong&gt;Introduction&lt;/strong&gt;&lt;/h2&gt;

&lt;p&gt;Memory management is a critical aspect of modern operating systems, ensuring efficient allocation and deallocation of system memory. Linux, as a robust and widely used operating system, employs sophisticated techniques for managing memory efficiently. Understanding key concepts such as page tables, swapping, and memory allocation is crucial for system administrators, developers, and anyone working with Linux at a low level.&lt;/p&gt;

&lt;p&gt;This article provides a look into Linux memory management, exploring the intricacies of page tables, the role of swapping, and different memory allocation mechanisms. By the end, readers will gain a deep understanding of how Linux handles memory and how to optimize it for better performance.&lt;/p&gt;

&lt;h2&gt;&lt;strong&gt;Understanding Linux Page Tables&lt;/strong&gt;&lt;/h2&gt;

&lt;span class="h3-replacement"&gt;&lt;strong&gt;What is Virtual Memory?&lt;/strong&gt;&lt;/span&gt;

&lt;p&gt;Linux, like most modern operating systems, implements virtual memory to provide processes with an illusion of a vast contiguous memory space. Virtual memory enables efficient multitasking, isolation between processes, and access to more memory than is physically available. The core mechanism facilitating virtual memory is the &lt;strong&gt;page table&lt;/strong&gt;, which maps virtual addresses to physical memory locations.&lt;/p&gt;

&lt;span class="h3-replacement"&gt;&lt;strong&gt;How Page Tables Work&lt;/strong&gt;&lt;/span&gt;

&lt;p&gt;A page table is a data structure used by the Linux kernel to translate virtual addresses into physical addresses. Since memory is managed in fixed-size blocks called &lt;strong&gt;pages&lt;/strong&gt; (typically 4KB in size), each process maintains a page table that keeps track of which virtual pages correspond to which physical pages.&lt;/p&gt;

&lt;h4&gt;&lt;strong&gt;Multi-Level Page Tables&lt;/strong&gt;&lt;/h4&gt;

&lt;p&gt;Due to large address spaces in modern computing (e.g., 64-bit architectures), a single-level page table would be inefficient and consume too much memory. Instead, Linux uses a hierarchical &lt;strong&gt;multi-level page table&lt;/strong&gt; approach:&lt;/p&gt;

&lt;ol start="1"&gt;&lt;li&gt;
	&lt;p&gt;&lt;strong&gt;Single-Level Page Table&lt;/strong&gt; (Used in older 32-bit systems with small memory)&lt;/p&gt;
	&lt;/li&gt;
	&lt;li&gt;
	&lt;p&gt;&lt;strong&gt;Two-Level Page Table&lt;/strong&gt; (Improves efficiency by breaking down page tables into smaller chunks)&lt;/p&gt;
	&lt;/li&gt;
	&lt;li&gt;
	&lt;p&gt;&lt;strong&gt;Three-Level Page Table&lt;/strong&gt; (Used in some architectures for better scalability)&lt;/p&gt;
	&lt;/li&gt;
	&lt;li&gt;
	&lt;p&gt;&lt;strong&gt;Four-Level Page Table&lt;/strong&gt; (Standard in modern 64-bit Linux systems, breaking addresses into even smaller sections)&lt;/p&gt;
	&lt;/li&gt;
&lt;/ol&gt;&lt;p&gt;Each level helps locate the next portion of the page table until the final entry, which contains the actual physical address.&lt;/p&gt;

&lt;span class="h3-replacement"&gt;&lt;strong&gt;Page Table Entries (PTEs) and Their Components&lt;/strong&gt;&lt;/span&gt;

&lt;p&gt;A &lt;strong&gt;Page Table Entry (PTE)&lt;/strong&gt; contains essential information, such as:&lt;/p&gt;

&lt;ul&gt;&lt;li&gt;
	&lt;p&gt;The &lt;strong&gt;physical page frame&lt;/strong&gt; number.&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;
      
            &lt;div class="field field--name-node-link field--type-ds field--label-hidden field--item"&gt;  &lt;a href="https://www.linuxjournal.com/content/linux-memory-management-understanding-page-tables-swapping-and-memory-allocation" hreflang="en"&gt;Go to Full Article&lt;/a&gt;
&lt;/div&gt;
      
    &lt;/div&gt;
  &lt;/div&gt;

</description>
  <pubDate>Thu, 20 Feb 2025 17:00:00 +0000</pubDate>
    <dc:creator>George Whittaker</dc:creator>
    <guid isPermaLink="false">1341297 at https://www.linuxjournal.com</guid>
    </item>

  </channel>
</rss>
